diff src/lib/Shared.luan @ 9:88f425d261b3

add menu
author Franklin Schmidt <fschmidt@gmail.com>
date Wed, 25 Oct 2023 18:38:07 -0600
parents 9534dd5eda89
children 62dd23f0b549
line wrap: on
line diff
--- a/src/lib/Shared.luan	Tue Oct 24 19:31:33 2023 -0600
+++ b/src/lib/Shared.luan	Wed Oct 25 18:38:07 2023 -0600
@@ -30,7 +30,13 @@
 <%	if get_user() == nil then %>
 			<a href="login1.red">login</a>
 <%	else %>
-			<a href="javascript:logout()"><script>document.write(`<img src="https://cdn.discordapp.com/avatars/${localStorage.user_id}/${localStorage.user_avatar}.png">`)</script></a>
+			<span right pulldown>
+				<script>document.write(`<img src="https://cdn.discordapp.com/avatars/${localStorage.user_id}/${localStorage.user_avatar}.png" onclick="clickMenu(this)">`)</script>
+				<div pulldown_menu>
+					<span username><script>document.write(localStorage.user_name)</script></span>
+					<a href="javascript:logout()">Log out</a>
+				</div>
+			</span>
 <%	end %>
 		</div>
 		<hr>