+5
-9
appview/pages/templates/layouts/fragments/topbar.html
+5
-9
appview/pages/templates/layouts/fragments/topbar.html
···
15
15
{{ with .LoggedInUser }}
16
16
{{ block "newButton" . }} {{ end }}
17
17
{{ template "notifications/fragments/bell" }}
18
-
{{ block "dropDown" . }} {{ end }}
18
+
{{ block "profileDropdown" . }} {{ end }}
19
19
{{ else }}
20
20
<a href="/login">login</a>
21
21
<span class="text-gray-500 dark:text-gray-400">or</span>
···
33
33
<summary class="btn-create py-0 cursor-pointer list-none flex items-center gap-2">
34
34
{{ i "plus" "w-4 h-4" }} <span class="hidden md:inline">new</span>
35
35
</summary>
36
-
<div 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">
36
+
<div class="absolute flex flex-col right-0 mt-3 p-4 rounded w-48 bg-white dark:bg-gray-800 dark:text-white border border-gray-200 dark:border-gray-700">
37
37
<a href="/repo/new" class="flex items-center gap-2">
38
38
{{ i "book-plus" "w-4 h-4" }}
39
39
new repository
···
46
46
</details>
47
47
{{ end }}
48
48
49
-
{{ define "dropDown" }}
49
+
{{ define "profileDropdown" }}
50
50
<details class="relative inline-block text-left nav-dropdown">
51
-
<summary
52
-
class="cursor-pointer list-none flex items-center gap-1"
53
-
>
51
+
<summary class="cursor-pointer list-none flex items-center gap-1">
54
52
{{ $user := .Did }}
55
53
<img
56
54
src="{{ tinyAvatar $user }}"
···
59
57
/>
60
58
<span class="hidden md:inline">{{ $user | resolve | truncateAt30 }}</span>
61
59
</summary>
62
-
<div
63
-
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"
64
-
>
60
+
<div 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">
65
61
<a href="/{{ $user }}">profile</a>
66
62
<a href="/{{ $user }}?tab=repos">repositories</a>
67
63
<a href="/{{ $user }}?tab=strings">strings</a>