themes-terminal/boot_log.templ
Alex Dunmow 0a9b177f7c initial: theme plugin terminal
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>
2026-06-06 14:11:44 +08:00

26 lines
655 B
Plaintext

package main
import (
"fmt"
"strconv"
)
func bootLineStyle(idx int) string {
// Stagger reveal: 80ms per line so each delay is strictly greater
// than the previous, per UAT 13.12.
return fmt.Sprintf("animation-delay: %dms;", 80*(idx+1))
}
templ bootLogComponent(data BootLogData) {
<div class="boot-log" data-block="terminal:boot_log">
for idx, line := range data.Lines {
<span class="boot-line" data-line-index={ strconv.Itoa(idx) } style={ bootLineStyle(idx) }>
{ "[ "+strconv.Itoa(idx)+" ] " + line }
</span>
}
if cursorGlyph(data.Cursor) != "" {
<span class="boot-cursor">{ cursorGlyph(data.Cursor) }</span>
}
</div>
}