|
72 | 72 | </script> |
73 | 73 |
|
74 | 74 | <main class="mx-auto flex min-h-dvh max-w-312 flex-col gap-2 p-3 sm:p-4 lg:p-6"> |
75 | | - <header class="panel-elevated mx-auto w-full p-3 sm:p-4"> |
76 | | - <div class="flex items-center justify-between gap-4 px-8"> |
77 | | - <div> |
78 | | - <p class="m-0 text-xs font-semibold tracking-widest text-zinc-500"> |
79 | | - INF-UCT: RAMTUN |
80 | | - </p> |
81 | | - <h1 class="mt-0.5 mb-0 text-xl leading-tight text-black sm:text-2xl"> |
82 | | - Cuestionarios en línea |
83 | | - </h1> |
84 | | - </div> |
| 75 | + <header |
| 76 | + class="panel-elevated mx-auto flex w-full items-center justify-between gap-2 px-2 py-2 sm:grid sm:grid-cols-[1fr_auto_1fr] sm:gap-4 sm:px-8 sm:py-3.5 lg:gap-8" |
| 77 | + > |
| 78 | + <div class="min-w-0"> |
| 79 | + <p class="m-0 text-xs font-semibold tracking-widest text-zinc-500">INF-UCT: RAMTUN</p> |
| 80 | + <h1 class="mt-0.5 mb-0 text-base leading-tight text-black sm:text-2xl"> |
| 81 | + Cuestionarios en línea |
| 82 | + </h1> |
| 83 | + </div> |
85 | 84 |
|
86 | | - <div class="mt-2.5 flex items-center gap-1"> |
87 | | - <a class="action-tab justify-center" data-active={isActive("/join")} href="/join"> |
88 | | - <DoorOpen size={16} aria-hidden="true" /> |
89 | | - <span class="hidden lg:inline">Unirse</span> |
90 | | - </a> |
| 85 | + <nav class="flex items-center sm:gap-2 lg:gap-6" aria-label="Principal"> |
| 86 | + <a |
| 87 | + class="text-tab min-h-11 min-w-11 justify-center lg:min-w-0" |
| 88 | + data-active={isActive("/join")} |
| 89 | + href="/join" |
| 90 | + title="Unirse" |
| 91 | + > |
| 92 | + <DoorOpen size={16} aria-hidden="true" /> |
| 93 | + <span class="hidden lg:inline">Unirse</span> |
| 94 | + </a> |
| 95 | + <a |
| 96 | + class="text-tab min-h-11 min-w-11 justify-center lg:min-w-0" |
| 97 | + data-active={isActive("/results")} |
| 98 | + href="/results" |
| 99 | + title="Resultados" |
| 100 | + > |
| 101 | + <ClipboardList size={16} aria-hidden="true" /> |
| 102 | + <span class="hidden lg:inline">Resultados</span> |
| 103 | + </a> |
| 104 | + {#if showCoursesNav} |
91 | 105 | <a |
92 | | - class="action-tab justify-center" |
93 | | - data-active={isActive("/results")} |
94 | | - href="/results" |
| 106 | + class="text-tab min-h-11 min-w-11 justify-center lg:min-w-0" |
| 107 | + data-active={isActive("/courses")} |
| 108 | + href="/courses" |
| 109 | + title="Cursos" |
95 | 110 | > |
96 | | - <ClipboardList size={16} aria-hidden="true" /> |
97 | | - <span class="hidden lg:inline">Resultados</span> |
| 111 | + <Layers size={16} aria-hidden="true" /> |
| 112 | + <span class="hidden lg:inline">Cursos</span> |
98 | 113 | </a> |
99 | | - {#if showCoursesNav} |
100 | | - <a |
101 | | - class="action-tab justify-center" |
102 | | - data-active={isActive("/courses")} |
103 | | - href="/courses" |
104 | | - > |
105 | | - <Layers size={16} aria-hidden="true" /> |
106 | | - <span class="hidden lg:inline">Cursos</span> |
107 | | - </a> |
108 | | - {/if} |
109 | | - |
110 | | - <span class="mx-1 h-6 w-px bg-zinc-300" aria-hidden="true"></span> |
111 | | - |
112 | | - <div class="flex shrink-0 items-stretch gap-1.5 sm:gap-2"> |
113 | | - <div |
114 | | - class="flex h-10 min-w-0 flex-col justify-center rounded-md border border-zinc-200 bg-zinc-50 px-2.5 text-left sm:min-w-44 sm:px-3 sm:text-right" |
115 | | - > |
116 | | - <p class="truncate text-sm font-semibold text-zinc-800"> |
117 | | - {authStore.user?.name} |
118 | | - </p> |
119 | | - <p class="text-xs text-zinc-600">{authStore.user?.role.toDisplay()}</p> |
120 | | - </div> |
121 | | - <button |
122 | | - class="inline-flex size-10 cursor-pointer items-center justify-center self-stretch rounded-[4px] border border-zinc-900 bg-zinc-900 text-white transition-colors duration-200 hover:bg-zinc-800" |
123 | | - type="button" |
124 | | - onclick={handleLogout} |
125 | | - title="Cerrar sesión" |
126 | | - > |
127 | | - <LogOut size={14} aria-hidden="true" /> |
128 | | - </button> |
129 | | - </div> |
| 114 | + {/if} |
| 115 | + </nav> |
| 116 | + |
| 117 | + <div class="flex min-w-0 items-center gap-2.5 justify-self-end"> |
| 118 | + <div class="hidden min-w-0 leading-tight sm:block"> |
| 119 | + <p class="m-0 max-w-56 truncate text-sm font-semibold text-zinc-800"> |
| 120 | + {authStore.user?.name} |
| 121 | + </p> |
| 122 | + <p class="m-0 text-xs text-zinc-600">{authStore.user?.role.toDisplay()}</p> |
130 | 123 | </div> |
| 124 | + <button |
| 125 | + class="btn-close size-11 cursor-pointer" |
| 126 | + type="button" |
| 127 | + onclick={handleLogout} |
| 128 | + title="Cerrar sesión" |
| 129 | + > |
| 130 | + <LogOut size={16} aria-hidden="true" /> |
| 131 | + </button> |
131 | 132 | </div> |
132 | 133 | </header> |
133 | 134 |
|
|
0 commit comments