oficina / memoria Public

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

Plain git — no account needed to clone.

Download

Download this file

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