this repo has no description
1{{ define "layouts/topbar" }}
2 <nav class="space-x-4 px-6 py-2 rounded bg-white dark:bg-gray-800 dark:text-white drop-shadow-sm">
3 <div class="flex justify-between p-0 items-center">
4 <div id="left-items">
5 <a href="/" hx-boost="true" class="flex gap-2 font-semibold italic">
6 tangled<sub>alpha</sub>
7 </a>
8 </div>
9
10 <div id="right-items" class="flex items-center gap-2">
11 {{ with .LoggedInUser }}
12 <a href="/repo/new" hx-boost="true" class="btn-create hover:no-underline hover:text-white">
13 {{ i "plus" "w-4 h-4" }}
14 </a>
15 {{ block "dropDown" . }} {{ end }}
16 {{ else }}
17 <a href="/login">login</a>
18 <span class="text-gray-500 dark:text-gray-400">or</span>
19 <a href="/signup" class="btn-create py-0 hover:no-underline hover:text-white flex items-center gap-2">
20 join now {{ i "arrow-right" "size-4" }}
21 </a>
22 {{ end }}
23 </div>
24 </div>
25 </nav>
26{{ end }}
27
28{{ define "dropDown" }}
29<details class="relative inline-block text-left">
30 <summary
31 class="cursor-pointer list-none flex items-center"
32 >
33 {{ $user := didOrHandle .Did .Handle }}
34 {{ template "user/fragments/picHandle" $user }}
35 </summary>
36 <div
37 class="absolute flex flex-col right-0 mt-4 p-4 rounded w-48 bg-white dark:bg-gray-800 dark:text-white border border-gray-200 dark:border-gray-700"
38 >
39 <a href="/{{ $user }}">profile</a>
40 <a href="/{{ $user }}?tab=repos">repositories</a>
41 <a href="/knots">knots</a>
42 <a href="/spindles">spindles</a>
43 <a href="/settings">settings</a>
44 <a href="#"
45 hx-post="/logout"
46 hx-swap="none"
47 class="text-red-400 hover:text-red-700 dark:text-red-400 dark:hover:text-red-300">
48 logout
49 </a>
50 </div>
51</details>
52{{ end }}