Style: BodyMaps brand alignment for home.html landing + viewer accent#7
Open
andyy-yang wants to merge 1 commit into
Open
Style: BodyMaps brand alignment for home.html landing + viewer accent#7andyy-yang wants to merge 1 commit into
andyy-yang wants to merge 1 commit into
Conversation
Additive-only styling pass that aligns the PanTS-Viewer landing page with the BodyMaps brand (https://thebodymaps.com) for visitors who arrive at the viewer from there. Zero changes to any <script> block, existing CSS class, React component logic, routing, or backend code. PanTS-Demo/public/home.html - <link rel="icon"> -> /logo.png - <title> "CT Finder · Search + Viewer (Dark)" -> "PanTS Viewer · BodyMaps" - <meta name="description"> added for share / SEO previews - --brand token #2a6cff -> #E76F51 (BodyMaps "agreement band" orange). Cascades to .btnSearch background and #inferProgressBar fill. - --accent token #febb02 -> #E76F51 (unified with brand). - ~100 lines of new bm-*-prefixed CSS appended to the existing <style> block. Does not override or touch any existing class. - Sticky top header with BodyMaps logo + wordmark + a single link back to thebodymaps.com. - Hero intro section above the existing #inferenceSection panel (eyebrow + H1 with one orange-accented word + lead). - Footer at the bottom with one attribution line linking to thebodymaps.com. PanTS-Demo/src/index.css - Same --brand and --accent swap so the React viewer (reachable from home.html via /case/<id>, /session/<id>, /reconstruction/<id>) inherits the same orange. PanTS-Demo/src/components/SnakeGame/SnakeGame.tsx - One-line cosmetic change: snake-game apple color bg-red-600 border-red-600 -> bg-[#E76F51] border-[#E76F51]. Snake body color unchanged. The game is a loading-state amusement, so this is purely visual. New assets - public/logo.png BodyMaps mark, transparent, used as favicon. - public/logo-light.png Same mark with white bars + orange band, used in the dark header. Untouched - All <script> blocks in home.html (search / filter / browse / upload / viewer JS). - All existing CSS classes in home.html (.hero, .searchRail, .recBar, .main, .filters, .viewer, .modal, etc.). - All React components except the one SnakeGame color line. - flask-server/, helpers/, contexts/, types/. - package.json (no new dependencies).
|
Someone is attempting to deploy a commit to the eireawerawer's projects Team on Vercel. A member of the Team first needs to authorize it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TLDR
Additive brand-alignment for visitors arriving at PanTS Viewer from thebodymaps.com: adds a sticky header, hero intro, footer, BodyMaps orange accent, and favicon to
home.html(with the same accent token in the React viewer). Zero changes to any<script>, existing CSS class, React component logic, routing, or backend. Strictly visual/text additions.Major decisions
home.htmldirectly rather than swap it outhome.html, not the ReactHomepage— confirmed by tracing navigation and reading the file. Editing in place keeps your search/filter/viewer JS intact.bm-*-prefixed CSS, never touch existing classes--brandand--accenttokens at the:rootinstead of overriding individual elements.btnSearchand#inferProgressBar(the only two visible token consumers). No!important, no specificity tricks.PanTS-Demo/src/index.css/case/<id>,/session/<id>,/reconstruction/<id>) is the only React page reachable fromhome.html, so matching its accent preserves continuity when visitors cross over.thebodymaps.comlinkVisualizationPageWhat changed
PanTS-Demo/public/home.html<link rel="icon">,<title>("PanTS Viewer · BodyMaps"),<meta description>;--brand#2a6cff→#E76F51and--accent#febb02→#E76F51; ~100 lines of newbm-*-prefixed CSS appended to the existing<style>block; sticky header, hero intro, and footer HTML inserted at boundaries between existing sectionsPanTS-Demo/index.html(React entry)/logo.png;<title>matcheshome.htmlPanTS-Demo/src/index.css--brand/--accenttoken swap so the React viewer inherits the orangePanTS-Demo/src/components/SnakeGame/SnakeGame.tsxbg-red-600 border-red-600→bg-[#E76F51] border-[#E76F51]. Snake body unchangedPanTS-Demo/public/logo.png(new)PanTS-Demo/public/logo-light.png(new)Testing
Verified correct (no change needed)
<script>blocks inhome.html— search / filter / browse / upload / viewer JS untouched and not selected by any new CSS rule..hero,.searchRail,.recBar,.main,.filters,.viewer,.modal, …) — unmodified; new classes are allbm-*-prefixed./case/<id>(line ~2922) — unaffected by header insertion.#inferenceSectionJS untouched; only inherits orange progress-bar color via the--brandtoken./case/<id>,/session/<id>,/reconstruction/<id>) — no changes; backend (flask-server/) — no changes.package.json— no new dependencies.Edge cases / robustness
position: sticky; top: 0; z-index: 100) overlays nothing at scroll; the existing.herosearch row scrolls naturally under it.bm-*rules consume existing tokens (var(--brand),var(--ink),var(--sub),var(--line)) so they inherit your dark palette. Only one new hardcoded color —#08111efor header/footer background, one shade deeper than--bgfor separation.logo-light.pngwith white bars).Lower-severity deferred (not in this PR)
.chip.activeuses hardcoded#6ea8ff(a light blue) for its outline — slightly out of tune with the new orange. Touching it means editing an existing class, so left for a separate follow-up if desired.VisualizationPage:toggleCrosshairTool(true)fires before the Cornerstone tool group is created byrenderVisualization, so the first Crosshair-Mode click silently no-ops. Unrelated to brand alignment; happy to file separately if helpful.Out of scope
<script>block in any filebm-*rules added)flask-server/), routing, hooks, contexts, helpers, typespackage.jsonand dependenciesTest plan for reviewers
cd PanTS-Demo npm install npm run devhttp://localhost:5173/home.html— sticky header with BodyMaps logo + wordmark +thebodymaps.comlinkPanTS Viewer · BodyMaps, favicon shows BodyMaps mark#E76F51)/case/<id>(production behavior unchanged)thebodymaps.comhttp://localhost:5173/case/1(loads from HuggingFace, no Flask backend needed) — tab favicon + title matchhome.html; any UI elements usingvar(--brand)are orangeNotes
This PR is additive only and easy to drop or narrow:
Happy to iterate or close — whatever fits the upstream direction.
Thanks for building PanTS Viewer — really nice example of how an academic imaging tool can be made approachable to a wider audience. Pleasure to contribute even this small a piece.