1
0
mirror of https://github.com/axzilla/templui.git synced 2025-02-23 15:44:07 +00:00
templui/internals/ui/modules/sidebar.templ

29 lines
778 B
Plaintext

package modules
import "github.com/axzilla/templui/internals/shared"
templ Sidebar() {
<aside class="h-full">
<div class="h-full overflow-y-auto">
<nav class="px-4 py-6">
<ul class="space-y-2">
for _, section := range shared.Sections {
<li class="pb-4">
<h3 class="px-4 text-sm font-bold text-gray-600">{ section.Title }</h3>
<ul class="mt-2 space-y-1">
for _, link := range section.Links {
<li>
<a href={ templ.SafeURL(link.Href) } class="text-sm flex items-center px-4 py-2 rounded-md text-gray-700 dark:text-gray-200 hover:bg-gray-100 dark:hover:bg-gray-700">
<span>{ link.Text }</span>
</a>
</li>
}
</ul>
</li>
}
</ul>
</nav>
</div>
</aside>
}