fix(web): add Log out to the persistent nav header
Logout was only reachable from /welcome. Users who are logged in had no way to sign out from any app page (list, detail, account). Added to the shared nav alongside Account.
This commit is contained in:
@@ -22,7 +22,7 @@ templ Layout(title string) {
|
|||||||
<body>
|
<body>
|
||||||
<header>
|
<header>
|
||||||
<a href="/" class="brand">Tapir</a>
|
<a href="/" class="brand">Tapir</a>
|
||||||
<nav class="nav"><a href="/account">Account</a></nav>
|
<nav class="nav"><a href="/account">Account</a><a href="/auth/logout">Log out</a></nav>
|
||||||
</header>
|
</header>
|
||||||
<main>
|
<main>
|
||||||
{ children... }
|
{ children... }
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ func Layout(title string) templ.Component {
|
|||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ_7745c5c3_Err
|
return templ_7745c5c3_Err
|
||||||
}
|
}
|
||||||
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 3, "</head><body><header><a href=\"/\" class=\"brand\">Tapir</a><nav class=\"nav\"><a href=\"/account\">Account</a></nav></header><main>")
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 3, "</head><body><header><a href=\"/\" class=\"brand\">Tapir</a><nav class=\"nav\"><a href=\"/account\">Account</a><a href=\"/auth/logout\">Log out</a></nav></header><main>")
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ_7745c5c3_Err
|
return templ_7745c5c3_Err
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user