package main import "strings" // hashPrefix returns the markdown-style hash prefix for a heading level. func hashPrefix(level int) string { if level < 1 { level = 1 } if level > 6 { level = 6 } return strings.Repeat("#", level) + " " } func terminalHeadingClass(level int) string { switch level { case 1: return "terminal-heading terminal-heading-1 text-3xl font-bold" case 2: return "terminal-heading terminal-heading-2 text-2xl font-bold" case 3: return "terminal-heading terminal-heading-3 text-xl font-semibold" case 4: return "terminal-heading terminal-heading-4 text-lg font-semibold" case 5: return "terminal-heading terminal-heading-5 text-base font-medium" case 6: return "terminal-heading terminal-heading-6 text-base font-medium" default: return "terminal-heading terminal-heading-2 text-2xl font-bold" } } templ terminalHeadingComponent(level int, text, textClass string) { switch level { case 1:

{ hashPrefix(1) + text }

case 2:

{ hashPrefix(2) + text }

case 3:

{ hashPrefix(3) + text }

case 4:

{ hashPrefix(4) + text }

case 5:
{ hashPrefix(5) + text }
case 6:
{ hashPrefix(6) + text }
default:

{ hashPrefix(2) + text }

} }