Add htmx to the project

This commit is contained in:
2024-06-13 17:20:57 +07:00
parent c5c697a84c
commit 276d62af3d
7 changed files with 16 additions and 13 deletions

View File

@ -13,9 +13,12 @@ templ Base(title string){
<meta name="author" content="Filekeeper" />
<link href="/public/output.css" rel="stylesheet"/>
<title>{ title }</title>
<script src="https://unpkg.com/htmx.org@1.9.12"></script>
</head>
<body>
{ children... }
<div id="content">
{ children... }
</div>
</body>
</html>
}
@ -70,10 +73,10 @@ templ Navbar(user types.User) {
</div>
</div>
} else {
<a href="/signup" class="text-gray-600 hover:text-gray-800">
<a href="/signup" class="text-gray-600 hover:text-gray-800" hx-get="/signup" hx-swap="outerHTML" hx-push-url="true" hx-target="#content">
Sign up
</a>
<a href="/signin" class="text-gray-600 hover:text-gray-800">
<a href="/signin" class="text-gray-600 hover:text-gray-800" hx-get="/signin" hx-swap="outerHTML" hx-push-url="true" hx-target="#content">
Sign in
</a>
}