- CSS 73.5%
- HTML 9.5%
- Python 9.2%
- JavaScript 6.4%
- Dockerfile 1.4%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| .forgejo/workflows | ||
| assets | ||
| demo | ||
| docker | ||
| scripts | ||
| src | ||
| ui | ||
| .gitignore | ||
| CHANGELOG.md | ||
| README.md | ||
| VERSION | ||
Bifrost UI
The shared theme for every web app and frontend in jriyuu-labs: one set of colours, fonts, components and a sidebar app layout, so every app looks like part of the same family.
Apps don't keep their own copy. They pull a tagged version of this repo in at build time, so a change here reaches every app on its next build, the same way ci-actions works.
Layout
bifrost-ui/
├── .forgejo/workflows/release.yml # check, move the major tag, build the demo image
├── assets/ # repo icon (also the Unraid template icon)
├── src/
│ ├── tokens.json # source of truth: colours, type, spacing, radii
│ └── bifrost.css # source: components and the sidebar shell
├── ui/ # WHAT APPS GET: built theme, fonts, icons, starter page
├── demo/
│ ├── index.html # component gallery (ui.jriyuu.io)
│ └── app/index.html # Stackwatch, the working example app (ui.jriyuu.io/app/)
├── docker/ # demo image: Dockerfile, nginx.conf, compose.yaml
├── scripts/build.py # src/ → ui/
├── VERSION
└── CHANGELOG.md
Only ui/ is copied into apps. Everything else is for maintaining the theme and the demo.
Making a change
- Edit
src/tokens.json(colours, sizes) orsrc/bifrost.css(components, layout). - Run
python3 scripts/build.pyto regenerateui/. - Open
demo/index.htmlin a browser and check both themes. - Commit. CI fails if you forgot step 2.
Releasing
- On a branch, bump
VERSIONand add a line toCHANGELOG.md, then open a PR tomain. - Once it's merged, tag
mainand push the tag:git checkout main && git pull && git tag v1.1.0 && git push origin v1.1.0 - CI moves
v1to the new release and publishes the demo image. Pull the new image on Unraid to update ui.jriyuu.io.
Apps pinned to v1 get the change on their next build. Use a new major version (v2) only for changes that break existing apps, such as renamed classes or tokens; apps move to it when you change their .bifrost-ui file.
How apps get it
Each app repo has a .bifrost-ui file containing the version to use (normally v1), and assets/ui/ is git-ignored.
- In CI: the
bifrost-uiaction inci-actionsruns before the build and fillsassets/ui/. - On your machine:
scripts/fetch-ui.sh(orfetch-ui.ps1on Windows) does the same.
template-default already includes all of this.
Demo site
The demo image is nidavellir.jriyuu.io/jriyuu-labs/bifrost-ui-demo, a static nginx site serving the gallery at /, the example app at /app/ and the theme at /ui/. Run it on Unraid and put it behind SWAG as ui.jriyuu.io. No app depends on it being up.