Bootstrapped during the 2026-06-06 BlockNinja consolidation. Was previously an unversioned directory inside ~/src/blockninja-themes/terminal. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
34 lines
988 B
Plaintext
34 lines
988 B
Plaintext
package main
|
|
|
|
func footerLinkHref(url string) string {
|
|
if url == "" {
|
|
return "#"
|
|
}
|
|
return url
|
|
}
|
|
|
|
templ footerComponent(data FooterData) {
|
|
<div class="terminal-footer" data-block="terminal:footer">
|
|
<div class="terminal-footer-rule">{ "===========================================" }</div>
|
|
if data.Motd != "" {
|
|
<div class="terminal-footer-motd">{ "-- " }{ data.Motd }</div>
|
|
}
|
|
if len(data.Links) > 0 {
|
|
<div class="terminal-footer-links">
|
|
for _, l := range data.Links {
|
|
<a href={ templ.SafeURL(footerLinkHref(l.URL)) }>{ "[ " + l.Label + " ]" }</a>
|
|
}
|
|
</div>
|
|
}
|
|
if data.ShowSignup {
|
|
<form class="terminal-footer-signup" method="post" action="#">
|
|
<label class="terminal-mono">{ "$ subscribe " }
|
|
<input type="email" name="email" placeholder="you@example.com" required/>
|
|
</label>
|
|
</form>
|
|
}
|
|
<div class="terminal-footer-rule">{ "===========================================" }</div>
|
|
<div class="terminal-mono">{ "EOF" }</div>
|
|
</div>
|
|
}
|