oficina / fichas Public

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

Plain git — no account needed to clone.

Download

Download this file

1// Command writeestilo re-writes the files internal/fichas/static takes from
2// the estilo this module pins: theme.css (Calma, with Fichas'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 two
5// stylesheets, chrome.css and sky.css; and the account menu in the rail,
6// menu.css and chrome.js. Run it from the repository root
7// after upgrading estilo; the pin tests in internal/fichastest fail until you do.
8package main
9
10import (
11 "os"
12
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/savestatus"
17 "amadan.net/oficina/estilo.git/sky"
18 "amadan.net/oficina/estilo.git/theme"
19)
20
21func main() {
22 css, ok := theme.ForApp("fichas")
23 if !ok {
24 panic("estilo's theme ring has no fichas")
25 }
26 for name, body := range map[string][]byte{
27 "theme.css": css,
28 "rastrillo.js": busy.ShimJS(),
29 "busy.js": busy.JS(),
30 "busy.css": busy.CSS(),
31 "chrome.css": chrome.CSS(),
32 "sky.css": sky.CSS(),
33 "menu.css": menu.CSS(),
34 "chrome.js": chrome.JS(),
35 "savestatus.css": savestatus.CSS(),
36 } {
37 if err := os.WriteFile("internal/fichas/static/"+name, body, 0o644); err != nil {
38 panic(err)
39 }
40 }
41}
42