git-svn-id: svn://losandesgames.com/alfheim-website@9 15359d88-9307-4e75-a9c1-e5686e5897df
This commit is contained in:
Vicente Ferrari Smith 2024-05-17 07:20:26 +00:00
parent 537455a5d4
commit 8052fa330e
2 changed files with 2 additions and 1 deletions

View File

@ -51,7 +51,7 @@ func home(w http.ResponseWriter, r *http.Request) {
id := authenticated_user(r) id := authenticated_user(r)
account, err := users.Get_account(id) account, err := users.Get_account(id)
text, err := template.ParseFiles("base.html", "index.html") text, err := template.ParseFiles("ui/base.html", "ui/index.html")
if err != nil { if err != nil {
http.Error(w, "Internal Server Error", 500) http.Error(w, "Internal Server Error", 500)
log.Fatal(err) log.Fatal(err)

View File

@ -20,6 +20,7 @@
<a href="/"><h1 class="maintitle">Alfheim</h1></a> <a href="/"><h1 class="maintitle">Alfheim</h1></a>
<div class="navbuttons"> <div class="navbuttons">
{{if .AuthenticatedUser}} {{if .AuthenticatedUser}}
<a href="/account"><div class="loginbutton"><strong>Account</strong></div></a>
<a href="/logout"><div class="loginbutton"><strong>Log out</strong></div></a> <a href="/logout"><div class="loginbutton"><strong>Log out</strong></div></a>
{{else}} {{else}}
<a href="/login"><div class="loginbutton"><strong>Log in</strong><span class="material-symbols-outlined">login</span></div></a> <a href="/login"><div class="loginbutton"><strong>Log in</strong><span class="material-symbols-outlined">login</span></div></a>