Files
vctp2/components/core/ui.templ
T
nathan 98e92a8264
continuous-integration/drone/push Build is passing
updated UI
2026-04-17 15:21:27 +10:00

54 lines
1.1 KiB
Plaintext

package core
type ActionLink struct {
Label string
Href string
Class string
}
type SegmentedLink struct {
Label string
Href string
Class string
}
templ PageHeader(pill string, title string, subtitle string, actions []ActionLink) {
<div class="web2-page-head-row">
<div class="web2-head-copy">
if pill != "" {
<div class="web2-pill">{ pill }</div>
}
<h1 class="web2-page-title">{ title }</h1>
if subtitle != "" {
<p class="web2-page-subtitle">{ subtitle }</p>
}
</div>
if len(actions) > 0 {
<div class="web2-actions">
for _, action := range actions {
<a class={ action.Class } href={ action.Href }>{ action.Label }</a>
}
</div>
}
</div>
}
templ SegmentedActions(actions []SegmentedLink) {
if len(actions) > 0 {
<div class="web3-button-group">
for _, action := range actions {
<a class={ action.Class } href={ action.Href }>{ action.Label }</a>
}
</div>
}
}
templ SectionHead(title string, badge string) {
<div class="web2-section-head">
<h2>{ title }</h2>
if badge != "" {
<span class="web2-badge">{ badge }</span>
}
</div>
}