oficina / calendar Public

Clone
git clone https://amadan.net/oficina/calendar

Plain git — no account needed to clone.

Download

Download this file

1// Command writeestilo re-writes the files internal/calendar/static takes from
2// the estilo this module pins: theme.css (Calma, with Calendar's accent),
3// and rastrillo's busy rule as estilo carries it — rastrillo.js without
4// the old rule, busy.js and busy.css — and the sign-in door's chrome.css
5// and sky.css, and the shared chrome's base.css, menu.css and chrome.js. Run it from the repository root
6// after upgrading estilo; the pin tests in internal/calendartest fail until you do.
7package main
8
9import (
10 "os"
11
12 "amadan.net/oficina/estilo.git/base"
13 "amadan.net/oficina/estilo.git/busy"
14 "amadan.net/oficina/estilo.git/chrome"
15 "amadan.net/oficina/estilo.git/menu"
16 "amadan.net/oficina/estilo.git/sky"
17 "amadan.net/oficina/estilo.git/theme"
18)
19
20func main() {
21 css, ok := theme.ForApp("calendar")
22 if !ok {
23 panic("estilo's theme ring has no calendar")
24 }
25 for name, body := range map[string][]byte{
26 "theme.css": css,
27 "rastrillo.js": busy.ShimJS(),
28 "busy.js": busy.JS(),
29 "busy.css": busy.CSS(),
30 "chrome.css": chrome.CSS(),
31 "sky.css": sky.CSS(),
32 "base.css": base.CSS(),
33 "menu.css": menu.CSS(),
34 "chrome.js": chrome.JS(),
35 } {
36 if err := os.WriteFile("internal/calendar/static/"+name, body, 0o644); err != nil {
37 panic(err)
38 }
39 }
40}
41