31 lines
671 B
Go
31 lines
671 B
Go
package snippets
|
|
|
|
import (
|
|
"github.com/maddalax/htmgo/framework/h"
|
|
)
|
|
|
|
func SnippetSidebar() *h.Element {
|
|
return h.Div(
|
|
h.Class("px-3 py-2 pr-6 md:min-h-screen pb-4 mb:pb-0 bg-neutral-50 border-r border-r-slate-300 overflow-y-auto"),
|
|
h.Div(
|
|
h.Div(
|
|
h.Class("mb-3"),
|
|
h.A(
|
|
h.Href("#"),
|
|
h.Text("Snippets"),
|
|
h.Class("md:mt-4 text-xl text-slate-900 font-bold"),
|
|
),
|
|
),
|
|
h.Div(
|
|
h.Class("flex flex-col gap-4"),
|
|
h.List(Snippets, func(entry Snippet, index int) *h.Element {
|
|
return h.A(
|
|
h.Href(entry.path),
|
|
h.Text(entry.sidebarName),
|
|
h.Class("text-slate-900 hover:text-rose-400"),
|
|
)
|
|
}),
|
|
),
|
|
),
|
|
)
|
|
}
|