@@ -0,0 +1,53 @@
|
||||
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>
|
||||
}
|
||||
Reference in New Issue
Block a user