feat(layout): remove unnecessary divs
Some checks failed
Build Docker Image / Build-Docker-Image (push) Has been cancelled
Some checks failed
Build Docker Image / Build-Docker-Image (push) Has been cancelled
This commit is contained in:
@@ -29,31 +29,27 @@ templ Layout(slot templ.Component, user templ.Component, loggedIn bool, path str
|
|||||||
</head>
|
</head>
|
||||||
<body class="h-screen flex flex-col" hx-headers='{"csrf-token": "CSRF_TOKEN"}'>
|
<body class="h-screen flex flex-col" hx-headers='{"csrf-token": "CSRF_TOKEN"}'>
|
||||||
// Header
|
// Header
|
||||||
<div class="">
|
<nav class="flex bg-white items-center gap-2 py-1 px-2 h-12 md:gap-10 md:px-10 md:py-2">
|
||||||
<nav class="flex bg-white items-center gap-2 py-1 px-2 h-12 md:gap-10 md:px-10 md:py-2">
|
<a href="/" class="flex gap-2 mr-20">
|
||||||
<a href="/" class="flex gap-2 mr-20">
|
<img class="w-6" src="/static/favicon.svg" alt="SpendSparrow logo"/>
|
||||||
<img class="w-6" src="/static/favicon.svg" alt="SpendSparrow logo"/>
|
<span class="text-4xl font-bold font-pirata">SpendSparrow</span>
|
||||||
<span class="text-4xl font-bold font-pirata">SpendSparrow</span>
|
</a>
|
||||||
</a>
|
if loggedIn {
|
||||||
if loggedIn {
|
<a class={ layoutLinkClass(path == "/") } href="/">Dashboard</a>
|
||||||
<a class={ layoutLinkClass(path == "/") } href="/">Dashboard</a>
|
<a class={ layoutLinkClass(path == "/transaction") } href="/transaction">Transaction</a>
|
||||||
<a class={ layoutLinkClass(path == "/transaction") } href="/transaction">Transaction</a>
|
<a class={ layoutLinkClass(path == "/account") } href="/account">Account</a>
|
||||||
<a class={ layoutLinkClass(path == "/account") } href="/account">Account</a>
|
}
|
||||||
}
|
<div class="ml-auto">
|
||||||
<div class="ml-auto">
|
@user
|
||||||
@user
|
</div>
|
||||||
</div>
|
</nav>
|
||||||
</nav>
|
<div class="h-12 fixed top-12 mr-4 inset-0 bg-linear-0 from-transparent to-white"></div>
|
||||||
<div class="h-12 fixed top-12 mr-4 inset-0 bg-linear-0 from-transparent to-white"></div>
|
|
||||||
</div>
|
|
||||||
// Content
|
// Content
|
||||||
<div class="flex-1 overflow-auto">
|
<main class="flex-1 overflow-auto">
|
||||||
<main class="h-full">
|
if slot != nil {
|
||||||
if slot != nil {
|
@slot
|
||||||
@slot
|
}
|
||||||
}
|
</main>
|
||||||
</main>
|
|
||||||
</div>
|
|
||||||
// Footer
|
// Footer
|
||||||
<!-- </div> -->
|
<!-- </div> -->
|
||||||
<div id="toasts" class="fixed bottom-4 right-4 ml-4 max-w-96 flex flex-col gap-2 z-50">
|
<div id="toasts" class="fixed bottom-4 right-4 ml-4 max-w-96 flex flex-col gap-2 z-50">
|
||||||
|
|||||||
Reference in New Issue
Block a user