This commit is contained in:
metacryst
2026-04-28 20:05:00 -05:00
commit 0d6c7683ff
123 changed files with 20922 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
class MonthHeaderRow extends Shadow {
constructor(weekStartsOn) {
super()
this.weekStartsOn = weekStartsOn;
}
render() {
const dayNames = ["S", "M", "T", "W", "T", "F", "S"];
const ordered = Array.from({ length: 7}, (_, i) => dayNames[(this.weekStartsOn + i) % 7]);
HStack(() => {
ordered.forEach(name => {
p(name)
.margin(0)
.fontSize(.8, em)
.fontWeight("500")
.letterSpacing(0.04, em)
.color("var(--headertext)")
.opacity(0.5)
.flex(1)
.textAlign("center")
.paddingVertical(0.6, em)
.boxSizing("border-box")
})
})
.width(100, pct)
.borderBottom("1px solid var(--divider)")
}
}
register(MonthHeaderRow)