Refactor + UI Overhaul Plan
Refactor + UI Overhaul Plan
Two-phase work on branch refactor-and-ui-overhaul. Both phases are complete, with one round of regression fixes and a small batch of visual tweaks applied on top. This document records what was done at each checkpoint and what remains for follow-on work.
STATUS: Phase 1 ✅ Phase 2 ✅ Regression-fix + tweaks ✅ (remaining items in TODO.md)
PHASE 1 — Refactor (no visible change)
Goal: every styling rule lives in _sass/, every layout rule lives in _layouts/, and pages/*.md files contain only content. Dead theme code removed. Masthead, fonts, and config deduplicated. After Phase 1, every page renders pixel-identically to main.
Checkpoints (commit per checkpoint, bisectable)
- 1.1 + 1.2 — Repo hygiene + dead theme leftovers. Untracked
.DS_Store, removed the masthead SVG draft fromREADME.md, deleted the unused gemspec, removed unused layouts (frontpage.html), unused includes (_frontpage-widget.html,_pagination.html,_sidebar.html,alert,gallery,list-posts,list-collection,next-previous-post-in-category,__INSTRUCTIONS.md), the asciidoc partial + plugin + config, the Twitter plugin gem + commented timeline, and the dead RSS/Atom XSLT scaffolding. - 1.3 — SCSS consolidation. Created
_sass/_08_pages.scsswith all<style>blocks moved out ofpages/people.md,publications.md,science.md. Deduplicated.peoplewrapper/.peoplephotoand the doubled Foundation@imports. - 1.4 + 1.6 — Masthead + font cleanup. Masthead text now driven from
site.masthead.{title,subtitle,description}in_config.yml. Google WebFontLoader + Lato fallback removed; Adobe Typekit retained. - 1.5 — File reorganization. Moved stray PNGs from
pages/intoimages/; flattenedpages/pages-root-folder/to repo root. Unlinked pages (blog_how_I_organize2025.md) kept by design. - 1.7 — Documentation refresh. Updated
STYLE.mdandTODO.md.
Decisions baked in at Phase 1 start (recorded for posterity):
- Remove asciidoc, Twitter plugin, Google WebFontLoader.
- Keep unlinked pages as-is (quasi-private URL sharing).
- Keep Adobe Typekit (
supria-sans). - Flatten
pages-root-folder/.
PHASE 2 — UI modernization (Option B: replace Foundation with CSS Grid + Flexbox)
Goal: drop the Foundation 5 framework entirely, replace its grid + top-bar with modern CSS Grid + Flexbox primitives consuming a CSS-custom-property design-token layer, and apply visible polish.
Checkpoints
-
2.A — Design tokens + modern layout primitives. New partials
_sass/_12_tokens.scss(CSS custom properties for color, type, spacing, container widths, radius, shadow) and_sass/_13_layout_modern.scss(composable.container*,.stack*,.cluster,.grid*,.split-*,.text-*,.visually-hidden). Wired into the main stylesheet; no markup changes yet. -
2.B — Migrate page layouts and masthead off Foundation grid. Rewrote
_includes/_masthead.htmlfrom a 5-deep<div>table-cell nest to a single<header class="site-masthead">with a flexbox-centred anchor. Dropped the five unused masthead branches (header.title,header.image_fullwidth,header.pattern,header.background-color,header == false). Rewrote_layouts/page.html,page-wide.html,page-extrawide.htmlto use<main class="container[…] stack">instead of.row+.columns+.medium-offset-N. Tuned--container-*widths to 36 / 48 / 64 / 80 rem. -
2.C — Replace navigation; introduce site-footer; drop Foundation top-bar. Rewrote
_includes/_navigation.htmlwith semantic<nav>,aria-current="page"on the active link, and an inline 5-line script that togglesaria-expandedfor the mobile menu. Rewrote_includes/_footer.html(which previously emitted an orphan</footer>close tag) with a proper<footer>element. Added the_sass/_14_chrome.scsspartial styling both, with sticky nav, hamburger toggle, focus-visible outlines, hover/active states. -
2.D — Migrate content pages to modern utilities. Replaced every
.row/.columns/.small-N/.medium-N/.large-Nwrapper inindex.md,pages/science.md,pages/people.md,pages/software.md,pages/contact.mdwith the new layout primitives. Addedalt=andloading="lazy"to gallery and content images. Layouts now skip the article<header>entirely ifpage.title/page.subheadline/page.image.titleare all unset, removing empty<h1></h1>elements. -
2.E — Strip unused Foundation, dead includes, legacy JS. Deleted
_sass/foundation-components/(39 partials),_sass/_03_settings_mixins_media_queries.scss,_sass/_04_settings_global.scss. Moved the one still-used variable,$global-radius, into_sass/_02_settings_typography.scss. Stripped the$topbar-*and$footer-*/$subfooter-*blocks from_sass/_01_settings_colors.scss. Rewrote_07_layout.scssto masthead-only, rewrote_06_typography.scssand_09_elements.scssto only their actually-used rules (drops@font-faceiconfont,.icon-*,.alert-box,.button,.side-nav,.accordion,.lazy,.big-teaser,.sans,.serif,.t10–.pr20). Deleted the dead includes (_breadcrumb.html,_comments.html,_meta_information.html,_google_search.html,_improve_content.html,_footer_scripts.html), the dead conditionals in page layouts, the Modernizr script from_head.html, the Twitter Card meta block, and the defaults block + socialmedia entry from_config.yml. Deletedassets/js/javascript.{js,min.js}(jQuery 2.1.1 + Foundation),assets/js/modernizr*.js,assets/mediaelement_js/,assets/fonts/(the iconfont set).Net effect: compiled stylesheet drops from ~270KB to ~15KB; no JS ships on any page except the 5-line inline menu toggle.
-
2.F — Visible polish. Smaller masthead heights (12/14/16rem at the breakpoints, down from 280/310/380px), inset cyan accent at the bottom edge, fluid
clamp()typography. Cyan underline accent under the active nav link on tablet+..text-justifynow useshyphens: autoon desktop and falls back to left-align on mobile. People photos are circular avatars with shadows. Publications list uses border-hairlines instead of margin gaps. Photo gallery year-headers redesigned with cyan underline. Body links have explicit cyan color and visible focus-visible outlines. -
2.G — Refresh documentation. Updated
STATUS.md,APPEARANCE.md,STYLE.md, thisPLAN.mdto reflect the post-Foundation state.
Post-Phase-2 regression fixes and tweaks
After review, four regressions were identified and fixed in one commit (1bbfe80):
-
Light mode regression — deleting Foundation’s
_04_settings_global.scssin 2.E also removed thebody { background; color }rule that consumed$body-bg/$body-font-color. The site reverted to default white background with black text. Fixed by adding an explicitbodybase block in_sass/_09_elements.scss. This is now a load-bearing block that must not be lost again. -
Masthead row widths broken — the three masthead rows (22 / 46 / 31 chars) had been manually tuned to render at approximately equal pixel width in supria-sans using fixed
22.9pt / 10pt / 14.9ptfont sizes. Phase 2.F replaced those withclamp()ranges that scaled the rows independently, breaking the design intent. Restored the original pt sizes and documented the constraint with a comment in_sass/_07_layout.scss. -
Publications “unstyled” — same root cause as #1. The
.publisthairlines (rgba(255, 255, 255, .08)) and.paper-title(color: #fff) were invisible on a white background. Fixing #1 fixed this implicitly. -
Topbar overflow — two scenarios: on narrow mobile the long brand “ALLARD LAB @ UC IRVINE” plus the “Menu” text pushed the menu button off-screen; on narrow desktop (40–64em) the six links at desktop padding could push Contact past the right edge. Fixed by using
site.title(“Allard Lab”, 10 chars) for the nav brand, swapping the “Menu” text for a 22×16 hamburger icon, and adding a second nav breakpoint at 64em so the 40–64em range uses tighter link padding.
Then two small visual tweaks landed (be52b94, 1cae338):
- Title→subtitle gap loosened:
.masthead-titlemargin-bottom changed from-5pxto0.5remandline-heightfrom1.1to0.7so the first masthead pair reads visibly looser than the second pair without floating off-baseline. - Trailing commas in
pages/publications.mdmoved inside the<span class="paper-title">so they inherit the title’s white color and font weight.
Acceptance criteria (met)
bundle exec jekyll buildbuilds with no errors (Foundation Sass division deprecation warnings are pre-existing in_functions.scssand only emit warnings, not failures).- No
class="row",.columns,.small-N,.medium-N,.large-Nin any rendered HTML. - No
<style>blocks in anypages/*.md. - Every page renders correctly at the three responsive breakpoints (mobile, tablet, desktop).
- Visible focus rings on all interactive elements.
aria-current="page"on active nav link,aria-expandedon the mobile menu button,aria-labelon the nav and the masthead anchor.
REMAINING WORK (not in scope for this branch)
Tracked in TODO.md. The biggest pending items:
- Migrate
pages/people.md,pages/publications.md,pages/software.mddata into_data/*.ymlso the markup can be templated and the lists can grow without hand-editing. - Replace the brittle
cdn.jsdelivr.net/github-cardswidget on the Software page with server-side cards from_data/software.yml. - Sticky year headers / client-side filter / preprint badges on Publications.
- Optimise photos to webp; add
<picture>with multiple sources. - CI: GitHub Action that runs
bundle exec jekyll buildon every PR. - Fix the pre-existing Sass
/division deprecation warnings in_functions.scss(replace withmath.div).