mirror of
https://github.com/hanzoai/ci.git
synced 2026-10-27 09:19:34 +00:00
cicd.yml / test (${{ fromJson(inputs.runner) }}) (push) Canceled after 0s
Hanzo CI/CD / cicd (push) Canceled after 0s
CI/CD / gate (push) Canceled after 0s
The bytes here already were brand's current sheet; the hash named the 1.4.9 Geist one, because brand changed the file without a version. Brand is 1.4.10 now and this pins it. Co-authored-by: Hanzo Dev <[email protected]>
53 lines
2.3 KiB
Go
53 lines
2.3 KiB
Go
package ci
|
|
|
|
import (
|
|
_ "embed"
|
|
"html/template"
|
|
)
|
|
|
|
// brand.go — where this page's design values come from.
|
|
//
|
|
// They come from @hanzo/brand, the one place the fleet's palette, radii, type
|
|
// scale and spacing are defined, and they arrive as that package's OWN
|
|
// published artifact rather than as hex codes retyped here. The distinction is
|
|
// the entire point: a template carrying its own :root block is a hand-copy, and
|
|
// a palette that is copied is a palette that diverges — one status colour off,
|
|
// a surface black a shade wrong, a hairline solid where the house says a wash.
|
|
// None of that is visible in a diff, and all of it is visible on the page.
|
|
//
|
|
// Vendored, not fetched at build time, and compiled in rather than served off
|
|
// disk. @hanzo/brand publishes this file as a plain custom-property sheet
|
|
// (`exports["./styles/*"]`, documented for a bare <link>), so consuming it
|
|
// costs no npm, no bundler and no React — the image build stays `go build`
|
|
// against an empty go.mod, and the page stays one request that returns the
|
|
// answer. That matters here more than anywhere: this dashboard is read when
|
|
// the build system is broken, which is the worst possible moment for it to
|
|
// need the build system in order to draw itself.
|
|
//
|
|
// Refreshing is a deliberate, reviewed act — fetch, then update the pin:
|
|
//
|
|
// curl -sSfo brand/variables.css https://unpkg.com/@hanzo/brand@<version>/styles/variables.css
|
|
//
|
|
//go:embed brand/variables.css
|
|
var brandCSS string
|
|
|
|
// brandCSSVersion and brandCSSSHA256 record WHICH @hanzo/brand the bytes above
|
|
// are, and a test rejects any other bytes. This is go.sum's argument, not
|
|
// ceremony: without it, "just darken that one border" is a one-character local
|
|
// edit that silently restores the second source of truth this file removed, and
|
|
// nothing would ever catch it.
|
|
const (
|
|
brandCSSVersion = "1.4.10"
|
|
brandCSSSHA256 = "a1e611f581a98bccb7fcef6e926e33a51d3ed50ec86430d9ab0b470721b4efc5"
|
|
)
|
|
|
|
// dashboardCSS is what this page adds on top: layout, not design. Every colour,
|
|
// radius and size in it is a var() into the sheet above.
|
|
//
|
|
//go:embed dashboard.css
|
|
var dashboardCSS string
|
|
|
|
// pageCSS is the <style> body: tokens first, then the rules that spend them.
|
|
// template.CSS because these are two compile-time constants, never input.
|
|
func pageCSS() template.CSS { return template.CSS(brandCSS + dashboardCSS) }
|