summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2025-04-28 14:55:07 -0600
committermo khan <mo@mokhan.ca>2025-04-28 14:55:07 -0600
commit353699fc3ab34d62289e6af10598e2c7dcf1a09b (patch)
tree3cd1cdb42453ae8d05132bf546fa4351a8060d51
parentbae54a9df4a50fec9576895624f0f474d7816764 (diff)
feat: convert nav to dropdown
-rw-r--r--app/views/dashboard/nav.html.tmpl25
1 files changed, 15 insertions, 10 deletions
diff --git a/app/views/dashboard/nav.html.tmpl b/app/views/dashboard/nav.html.tmpl
index 59ff68b..a420773 100644
--- a/app/views/dashboard/nav.html.tmpl
+++ b/app/views/dashboard/nav.html.tmpl
@@ -5,18 +5,23 @@
<ul>
{{ if .IsLoggedIn }}
<li>
- <a href="{{ .CurrentUser.ProfileURL }}">
- <img src="{{ .CurrentUser.Picture }}" />
- {{ .CurrentUser.Username }}
- </a>
- </li>
- <li>
- <form action="/session/destroy" method="post">
- <input type="submit" value="Logout">
- </form>
+ <details class="dropdown">
+ <summary>
+ {{ .CurrentUser.Username }}
+ </summary>
+ <ul dir="rtl">
+ <li><a href="{{ .CurrentUser.ProfileURL }}">Profile</a></li>
+ <li><a href="#">Settings</a></li>
+ <li>
+ <form action="/session/destroy" method="post">
+ <input type="submit" value="Logout">
+ </form>
+ </li>
+ </ul>
+ </details>
</li>
{{ else }}
- <li><a href="/session/new">Login</a></li>
+ <li><a href="/session/new" class="secondary">Login</a></li>
{{ end }}
</ul>
</nav>