initial commit
This commit is contained in:
36
internal/view/component/nav/navbar.templ
Normal file
36
internal/view/component/nav/navbar.templ
Normal file
@@ -0,0 +1,36 @@
|
||||
package nav
|
||||
|
||||
type NavItem struct {
|
||||
name string // Label to display
|
||||
href string // Link reference
|
||||
}
|
||||
|
||||
// Return the list of navbar links
|
||||
func getNavItems() []NavItem {
|
||||
return []NavItem{}
|
||||
}
|
||||
|
||||
// Returns the navbar template fragment
|
||||
templ Navbar() {
|
||||
{{ navItems := getNavItems() }}
|
||||
<div x-data="{ open: false }">
|
||||
<header class="bg-crust">
|
||||
<div
|
||||
class="mx-auto flex h-16 max-w-7xl items-center gap-8
|
||||
px-4 sm:px-6 lg:px-8"
|
||||
>
|
||||
<a class="block" href="/">
|
||||
<!-- logo here -->
|
||||
<span class="text-3xl font-bold transition hover:text-green">
|
||||
OSL Stats
|
||||
</span>
|
||||
</a>
|
||||
<div class="flex flex-1 items-center justify-end sm:justify-between">
|
||||
@navLeft(navItems)
|
||||
@navRight()
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
@sideNav(navItems)
|
||||
</div>
|
||||
}
|
||||
Reference in New Issue
Block a user