// Command writeestilo re-writes the files internal/calendar/static takes from // the estilo this module pins: theme.css (Calma, with Calendar's accent), // and rastrillo's busy rule as estilo carries it — rastrillo.js without // the old rule, busy.js and busy.css — and the sign-in door's chrome.css // and sky.css, and the shared chrome's base.css, menu.css and chrome.js. Run it from the repository root // after upgrading estilo; the pin tests in internal/calendartest fail until you do. package main import ( "os" "amadan.net/oficina/estilo.git/base" "amadan.net/oficina/estilo.git/busy" "amadan.net/oficina/estilo.git/chrome" "amadan.net/oficina/estilo.git/menu" "amadan.net/oficina/estilo.git/sky" "amadan.net/oficina/estilo.git/theme" ) func main() { css, ok := theme.ForApp("calendar") if !ok { panic("estilo's theme ring has no calendar") } for name, body := range map[string][]byte{ "theme.css": css, "rastrillo.js": busy.ShimJS(), "busy.js": busy.JS(), "busy.css": busy.CSS(), "chrome.css": chrome.CSS(), "sky.css": sky.CSS(), "base.css": base.CSS(), "menu.css": menu.CSS(), "chrome.js": chrome.JS(), } { if err := os.WriteFile("internal/calendar/static/"+name, body, 0o644); err != nil { panic(err) } } }