Files
nib-v1/internal/display/glyph.go
T
lerko aa7c9aef7d feat: implement nib design system — warm amber palette, dual themes, new typography
Replace Tokyonight/Catppuccin blue palette with warm amber/ink identity.
Dual theme support (noir + paper) via data-theme attribute with
localStorage persistence. Space Grotesk for chrome, Monaspace Neon for
content. Updated glyph set (Strokes: — ○ ◇) across web and CLI.
2026-05-14 17:02:11 -04:00

37 lines
647 B
Go

package display
import "github.com/lerko/nib/internal/db"
var glyphMap = map[db.Glyph]string{
db.GlyphNote: "—",
db.GlyphTodo: "○",
db.GlyphEvent: "◇",
}
var cardGlyphMap = map[db.CardType]string{
db.CardSnippet: "◆",
db.CardTemplate: "◈",
db.CardChecklist: "☐",
db.CardDecision: "⚖",
db.CardLink: "↗",
}
func DisplayGlyph(glyph db.Glyph, cardType *db.CardType) string {
if cardType != nil {
if g, ok := cardGlyphMap[*cardType]; ok {
return g
}
}
if g, ok := glyphMap[glyph]; ok {
return g
}
return "—"
}
func FormatID(id string) string {
if len(id) > 12 {
return id[:12]
}
return id
}