35 lines
784 B
Plaintext
35 lines
784 B
Plaintext
package bulma
|
|
|
|
templ Button(color string, isLight, isDark bool) {
|
|
if isLight {
|
|
<button type="button" class={ "button", "is-light", color }>
|
|
{ children... }
|
|
</button>
|
|
}
|
|
if isDark {
|
|
<button type="button" class={ "button", "is-dark", color }>
|
|
{ children... }
|
|
</button>
|
|
}
|
|
if !isLight && !isDark {
|
|
<button type="button" class={ "button", color }>
|
|
{ children... }
|
|
</button>
|
|
}
|
|
}
|
|
|
|
templ ButtonNewTab(url, text string) {
|
|
<button type="button" class="button">
|
|
<a href={ templ.SafeURL(url) } target="_blank" rel="noopener noreferrer">{ text }</a>
|
|
</button>
|
|
}
|
|
|
|
|
|
templ ALink(url, title string) {
|
|
<a href={ templ.SafeURL(url) }>{ title }</a>
|
|
}
|
|
|
|
templ ANewTab(url, text string) {
|
|
<a href={ templ.SafeURL(url) } target="_blank" rel="noopener noreferrer">{ text }</a>
|
|
}
|