refactor(css): consume shared hero_theme; drop inline admin theme #6
No reviewers
Labels
No labels
prio_critical
prio_low
type_bug
type_contact
type_issue
type_lead
type_question
type_story
type_task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lhumina_code/hero_website_framework!6
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "development_timur"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Wires both framework crates to consume the new
hero_theme(see hero_web_template#5) and drops the 805-line inline<style>block from the default admin template. Implements hero_web_template#4.Changes
hero_themegit dep pinned todevelopment_timur(switch todevelopmentafter the companion PR lands).hero_admin_lib—shared_static_handlertransparently servestheme/*fromhero_theme::ThemeAssets. One router, both sets of assets, zero new wiring for downstream consumers. Doc-comment updated with the<link>snippets.hero_website_liblib_static_files_routerdoes the same thing for/lib-static/theme/*.default_templates/admin/base.html:<style>block (now lives inhero_theme)<link>s the fourhero-*.cssfiles[data-theme]attribute to Bootstrap 5.3 native[data-bs-theme](theme toggle JS + initial-paint shim both updated)Net diff: +81 / −822.
Merge order
hero_theme)branch = "development_timur"→branch = "development", then merge.Test plan
cargo check --workspacepasses locallydemo_websiterenders identically in light + dark mode (visual regression — base.html restructured)hero_admin_libregresses (no consumer relies ontheme/*not being a reserved path)🤖 Generated with Claude Code
hero_website_lib#4Verified end-to-end on
demo_websiteBuilt and ran
demo_websiteagainst the feature branch (livehero_themegit dep fromhero_web_template@development_timur):Theme assets
Rendered
/admin(authenticated)Zero inline
<style>blocks emitted byadmin/base.html(awk '/<style/,/<\/style>/' | wc -l == 0). The 805-line inline cascade is fully gone.Hero classes still present after refactor
/adminrendered DOM contains all expected Hero theme classes:So the dashboard markup picks up styles from the externalised CSS — no rules were lost in the port.
Other admin pages
<link>/admin/admin/users/admin/visits/admin/contacts/admin/blogsdemo_website; pre-existing, not caused by this PROut of scope (explicitly left alone)
/admin/loginstill ships its own 286-line inline<style>block — single-consumer page, per the rule agreed in hero_web_template#4 (≥2 consumers → centralize; 1 consumer → stays). Extracting it is a code-hygiene pass for a separate issue.Test plan checklist
cargo check --workspacepassescargo build -p demo_websitepassesadmin/base.html-extending pages render withdata-bs-theme+ theme<link>tagsadmin-card,admin-tabs,stat-box.*,stat-number,fade-in) still emitted<style>block on renderedadmin/base.htmlReady for merge once hero_web_template#5 lands and I flip the git-dep branch from
development_timur→development.