feat(theme): add hero_theme crate — shared Hero CSS #5

Merged
timur merged 1 commit from development_timur into development 2026-05-19 15:28:19 +00:00
Owner

Summary

Adds the new hero_theme crate at theme/ — the single source of truth for shared Hero CSS across all web frontends. Implements hero_web_template#4; approach locked in comment 34224.

What ships

theme/
├── Cargo.toml          # crate "hero_theme"
├── README.md           # framework + non-framework + raw-link inclusion snippets
├── src/lib.rs          # rust-embed bundle + axum::Router helper
└── static/
    ├── css/
    │   ├── hero-tokens.css     # brand tokens (light + dark)
    │   ├── hero-admin.css      # navbar / admin-tabs / admin-container / stat-box / admin-card / footer / responsive
    │   ├── hero-forms.css      # Bootstrap form / button / badge / alert polish
    │   └── hero-content.css    # code, log-row-*, dark scrollbar, theme-toggle, fade-in, transitions
    └── favicon.svg

Dark mode uses Bootstrap 5.3's native data-bs-theme attribute. Hero tokens are namespaced --hero-* so they never collide with --bs-*. Bootstrap itself is not shipped — consumers bring their own.

Companion PR

hero_website_framework#6 (TBD link) wires hero_admin_lib and hero_website_lib up to consume hero_theme and drops the 805-line inline <style> block from admin/base.html. Merge order: this one first, then the framework PR (which currently pins to branch = "development_timur"; switches to development once this lands).

Test plan

  • cargo check inside theme/ (no workspace context required) — already verified locally
  • Framework PR uses the new git dep and the workspace compiles
  • After merge: admin renders identically light + dark (visual regression check)

🤖 Generated with Claude Code

## Summary Adds the new `hero_theme` crate at `theme/` — the single source of truth for shared Hero CSS across all web frontends. Implements [hero_web_template#4](https://forge.ourworld.tf/lhumina_code/hero_web_template/issues/4); approach locked in [comment 34224](https://forge.ourworld.tf/lhumina_code/hero_web_template/issues/4#issuecomment-34224). ### What ships ``` theme/ ├── Cargo.toml # crate "hero_theme" ├── README.md # framework + non-framework + raw-link inclusion snippets ├── src/lib.rs # rust-embed bundle + axum::Router helper └── static/ ├── css/ │ ├── hero-tokens.css # brand tokens (light + dark) │ ├── hero-admin.css # navbar / admin-tabs / admin-container / stat-box / admin-card / footer / responsive │ ├── hero-forms.css # Bootstrap form / button / badge / alert polish │ └── hero-content.css # code, log-row-*, dark scrollbar, theme-toggle, fade-in, transitions └── favicon.svg ``` Dark mode uses Bootstrap 5.3's native `data-bs-theme` attribute. Hero tokens are namespaced `--hero-*` so they never collide with `--bs-*`. Bootstrap itself is **not** shipped — consumers bring their own. ### Companion PR [hero_website_framework#6](https://forge.ourworld.tf/lhumina_code/hero_website_framework/pulls/6) (TBD link) wires `hero_admin_lib` and `hero_website_lib` up to consume `hero_theme` and drops the 805-line inline `<style>` block from `admin/base.html`. Merge order: this one first, then the framework PR (which currently pins to `branch = "development_timur"`; switches to `development` once this lands). ## Test plan - [ ] `cargo check` inside `theme/` (no workspace context required) — already verified locally - [ ] Framework PR uses the new git dep and the workspace compiles - [ ] After merge: admin renders identically light + dark (visual regression check) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
feat(theme): add hero_theme crate — shared Hero CSS
Some checks failed
Build and Test / build (pull_request) Failing after 34s
0a3df5691c
Single source of truth for Hero brand tokens, admin shell (navbar /
tabs / stat-boxes / cards), Bootstrap form polish, and content
styling (code, log highlights, theme toggle, scrollbar).

Dark mode uses Bootstrap 5.3's native data-bs-theme attribute. All
Hero tokens namespaced --hero-* so they never collide with --bs-*.
Ships rust-embed + an axum router helper at hero_theme::router("...").

Refs: #4
Parent: hero_skills#262
timur merged commit de4712aaa4 into development 2026-05-19 15:28:19 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lhumina_code/hero_web_template!5
No description provided.