|
5 | 5 | * Created Date: 2024-03-23 12:52:57
|
6 | 6 | * Author: 3urobeat
|
7 | 7 | *
|
8 |
| - * Last Modified: 2024-03-30 13:03:32 |
| 8 | + * Last Modified: 2024-03-30 13:32:56 |
9 | 9 | * Modified By: 3urobeat
|
10 | 10 | *
|
11 | 11 | * Copyright (c) 2024 3urobeat <https://github.com/3urobeat>
|
|
21 | 21 | <!-- Title bar -->
|
22 | 22 | <PhList :class="!showNavbar ? 'block' : 'opacity-0'" class="fixed z-30 cursor-pointer left-3 top-2 lg:hidden block transition-opacity" size="25px" @click="showNavbar = !showNavbar"></PhList>
|
23 | 23 |
|
24 |
| - |
25 | 24 | <header
|
26 | 25 | id="titlebar"
|
27 |
| - :class="showNavbar ? 'bg-slate-100 opacity-30 lg:bg-white lg:opacity-100' : ''" |
28 |
| - class="fixed z-20 top-0 left-0 w-screen h-fit mb-5 pb-1.5 bg-white border-y-2 border-y-gray-500 border-t-0 transition-opacity duration-500" |
29 |
| - > <!-- The extra lg: tags in :class fix a bg color bug when the window is resized while the navbar was open --> |
30 |
| - <div class="pt-2 w-full text-center select-none flex items-center justify-center font-semibold"> |
| 26 | + :class="showNavbar ? 'bg-slate-100 lg:bg-white border-opacity-30 lg:border-opacity-100' : ''" |
| 27 | + class="fixed z-20 top-0 left-0 w-screen h-fit mb-5 pb-1.5 bg-white border-y-2 border-y-gray-500 border-t-0 transition-color duration-500" |
| 28 | + > <!-- The extra lg: tags in :class fix a bg color bug when the window is resized while the navbar was open. The opacities are applied seperately here to avoid page elements fading through --> |
| 29 | + <div :class="showNavbar ? 'opacity-30 lg:opacity-100' : ''" class="pt-2 w-full text-center select-none flex items-center justify-center font-semibold transition-opacity duration-500"> |
31 | 30 | <PhDetective class="mr-2 size-5"></PhDetective>
|
32 | 31 | Git Anonymous
|
33 | 32 | </div>
|
|
40 | 39 | <!-- Left navigation bar which offsets everything else to the right on desktop and overlays everything on mobile -->
|
41 | 40 | <nav
|
42 | 41 | id="navbar"
|
43 |
| - :class="showNavbar ? 'absolute backdrop-blur-sm bg-white/50 lg:bg-white' : 'absolute w-0 min-w-0 opacity-0'" |
| 42 | + :class="showNavbar ? 'absolute backdrop-blur-sm bg-white/50 lg:bg-white' : 'absolute invisible w-0 min-w-0 opacity-0'" |
44 | 43 | class="z-40 top-0 left-0 h-screen lg:w-1/6 w-1/2 max-w-60 min-w-48 lg:relative lg:block lg:opacity-100 bg-white border-x-2 border-x-gray-500 border-l-0 select-none duration-500 transition-all"
|
45 | 44 | >
|
46 | 45 | <PhCaretLeft :class="showNavbar ? 'block' : 'opacity-0'" class="relative z-30 cursor-pointer left-3 top-2 mb-5 lg:hidden block transition-all" size="25px" @click="showNavbar = !showNavbar"></PhCaretLeft>
|
|
92 | 91 |
|
93 | 92 | <!-- The main content itself, pushed to the side by the navbar -->
|
94 | 93 | <main :class="showNavbar ? 'bg-slate-200 opacity-30 lg:bg-white lg:opacity-100' : ''" class="z-10 w-screen h-screen px-5 pt-3 bg-white transition-opacity duration-500" @click="showNavbar = false"> <!-- The extra lg: tags in :class fix a bg color bug when the window is resized while the navbar was open -->
|
95 |
| - <NuxtPage></NuxtPage> <!-- Links to index.vue --> |
| 94 | + <div :class="showNavbar ? 'absolute w-screen h-screen opacity-0' : ''"></div> <!-- Dummy to prevent NuxtPage button presses when the navbar is open --> |
| 95 | + <NuxtPage></NuxtPage> <!-- Links to index.vue --> |
96 | 96 | </main>
|
97 | 97 |
|
98 | 98 | </div>
|
|
0 commit comments