comparison 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
comparison
equal deleted inserted replaced
8:9534dd5eda89 9:88f425d261b3
28 <div header> 28 <div header>
29 <h1><a href="/">Disearch</a></h1> 29 <h1><a href="/">Disearch</a></h1>
30 <% if get_user() == nil then %> 30 <% if get_user() == nil then %>
31 <a href="login1.red">login</a> 31 <a href="login1.red">login</a>
32 <% else %> 32 <% else %>
33 <a href="javascript:logout()"><script>document.write(`<img src="https://cdn.discordapp.com/avatars/${localStorage.user_id}/${localStorage.user_avatar}.png">`)</script></a> 33 <span right pulldown>
34 <script>document.write(`<img src="https://cdn.discordapp.com/avatars/${localStorage.user_id}/${localStorage.user_avatar}.png" onclick="clickMenu(this)">`)</script>
35 <div pulldown_menu>
36 <span username><script>document.write(localStorage.user_name)</script></span>
37 <a href="javascript:logout()">Log out</a>
38 </div>
39 </span>
34 <% end %> 40 <% end %>
35 </div> 41 </div>
36 <hr> 42 <hr>
37 <% 43 <%
38 end 44 end