fix: layouts cleanup

This commit is contained in:
efim 2023-11-27 05:58:37 +00:00
parent 4e5c6b4bd8
commit e3f7a38dba
4 changed files with 5 additions and 2 deletions

View File

@ -2,6 +2,7 @@ package routes
type baseData struct {
Title string
LoggedIn bool
}
type headerData struct {

View File

@ -269,6 +269,7 @@ func roomPageRoute(
data := pageData{
Base: baseData{
Title: "room-lala-from-base",
LoggedIn: true,
},
Content: contentData,
Header: headerData{

View File

@ -24,7 +24,9 @@
<a href="https://git.sunshine.industries/efim/some-automoderation">
<img src="/static/images/agplv3-with-text-100x42.png" alt="AGPLv3 Free as in Freedom" title="Link to source code of this program, as required by AGPLv3" />
</a>
{{ if .Base.LoggedIn }}
<a class="bg-white border-2 rounded py-1 px-2 h-8" href="/logout">Logout</a>
{{ end }}
</nav>
<!--[if lt IE 8]>
<p class="browserupgrade">

View File

@ -18,8 +18,7 @@
>
</section>
{{ else }}
<section class="border">
<h2>hoho, the session is missing. let's do the auth section</h2>
<section class="border grid place-content-center">
<div class="h-fit w-fit">
{{ template "loginSection" .LoginSectionData }}
</div>