This commit is contained in:
@@ -32,30 +32,33 @@ 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
|
||||||
<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-blue-50 items-center gap-2 p-4 rounded-b-4xl">
|
||||||
<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 == "/dashboard") } href="/dashboard">Dashboard</a>
|
|
||||||
<a class={ layoutLinkClass(path == "/transaction") } href="/transaction">Transaction</a>
|
|
||||||
<a class={ layoutLinkClass(path == "/treasurechest") } href="/treasurechest">Treasure Chest</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>
|
|
||||||
// Content
|
// Content
|
||||||
<main class="flex-1 overflow-auto">
|
<div class="flex overflow-hidden">
|
||||||
if slot != nil {
|
<nav class="flex flex-col bg-gray-50 text-lg mt-5 px-5 pt-2 rounded-r-4xl">
|
||||||
@slot
|
<a class={ layoutLinkClass(path == "/dashboard") } href="/dashboard">Dashboard</a>
|
||||||
}
|
<a class={ layoutLinkClass(path == "/transaction") } href="/transaction">Transaction</a>
|
||||||
</main>
|
<a class={ layoutLinkClass(path == "/treasurechest") } href="/treasurechest">Treasure Chest</a>
|
||||||
|
<a class={ layoutLinkClass(path == "/account") } href="/account">Account</a>
|
||||||
|
</nav>
|
||||||
|
<main class="flex-1 overflow-auto">
|
||||||
|
if slot != nil {
|
||||||
|
@slot
|
||||||
|
}
|
||||||
|
</main>
|
||||||
|
</div>
|
||||||
// Footer
|
// Footer
|
||||||
<!-- </div> -->
|
<div class="bg-red-900">MyFooter</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">
|
||||||
<div
|
<div
|
||||||
id="toast"
|
id="toast"
|
||||||
|
|||||||
Reference in New Issue
Block a user