From 9cfc2d873f359aba9b49bb2532ade23b69db64bb Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 13 Oct 2026 21:03:43 +0000 Subject: [PATCH] docs: update theme to latest bx-sites, drop the home page version switcher The version switcher now lives in the left nav, so the home page no longer renders it. Re-ejected the bootstrap theme from the latest bx-sites and kept cbGenesis's tooltips, icon set and home page. Theme assets are fingerprinted now, so they are referenced through themeAssetUrl()/moduleAssetUrl(). Also escape the literal # in the home page's footer entity so it compiles. Co-Authored-By: Claude Sonnet 5.5 Claude-Session: https://claude.ai/code/session_01HuRUU5gmWh38E9FYfHxaTP --- docs/.theme/assets/style.css | 59 ++++++++++++++++++++++-- docs/.theme/blog.bxm | 59 ++++++++++++++---------- docs/.theme/home.bxm | 13 ++---- docs/.theme/includes/page-helpers.bxm | 4 +- docs/.theme/includes/site-helpers.bxm | 19 +------- docs/.theme/layout.bxm | 66 ++++++++++++++++----------- 6 files changed, 138 insertions(+), 82 deletions(-) diff --git a/docs/.theme/assets/style.css b/docs/.theme/assets/style.css index 44f8e63..aef80a3 100644 --- a/docs/.theme/assets/style.css +++ b/docs/.theme/assets/style.css @@ -364,10 +364,43 @@ body { } .sidebar { + display: flex; + flex-direction: column; padding-top: 1.5rem; background: var(--bxsites-sidebar-bg); } +.sidebar-version-switcher { + width: auto; + max-width: none; + height: auto; + margin: 0 0 1rem; + padding: 0.4rem 0.6rem; +} + +@media (min-width: 992px) { + .sidebar { + flex: 0 0 280px; + max-width: 280px; + position: sticky; + top: 56px; + height: calc(100vh - 56px); + overflow-y: auto; + } + + .row:not(.bxsites-nav-collapsed) .content { + flex: 0 0 calc(100% - 280px); + max-width: calc(100% - 280px); + } +} + +@media (min-width: 1200px) { + .row:not(.bxsites-nav-collapsed):has(.toc-sidebar) .content { + flex: 0 0 calc(100% - 280px - 16.66667%); + max-width: calc(100% - 280px - 16.66667%); + } +} + /* The toggler is Alpine-driven (layout.bxm's own `navOpen`) at every width now, not just below `lg` - overrides Bootstrap's own `.navbar-expand-lg .navbar-toggler { display: none }` (same @@ -1071,6 +1104,9 @@ dd { } .toc-title { + display: flex; + align-items: center; + gap: 0.4rem; font-weight: 600; text-transform: uppercase; font-size: 0.75rem; @@ -1078,6 +1114,16 @@ dd { margin-bottom: 0.25rem; } +.toc-title svg { + flex: 0 0 auto; + opacity: 0.8; +} + +.toc, +.toc-mobile { + font-size: 0.875rem; +} + .toc li, .toc-mobile li { margin: 0.35rem 0; @@ -1085,9 +1131,14 @@ dd { } .toc .toc-level-3, -.toc-mobile .toc-level-3 { - padding-left: 1rem; +.toc .toc-level-4, +.toc-mobile .toc-level-3, +.toc-mobile .toc-level-4 { + padding-left: 0.85rem; + margin-left: 0.15rem; + border-left: 2px solid var(--bxsites-border); font-size: 0.9em; + color: var(--bxsites-muted); } /* `theme.options.tocPosition: "sticky"` renders the same TOC list in its @@ -2981,7 +3032,7 @@ a.button.primary { display: flex; align-items: center; gap: 0.5rem; - margin: 1.5rem 0 0.5rem; + margin: auto 0 0.5rem; padding: 0.7rem 0.85rem; border: 1px solid currentColor; border-radius: 0.75rem; @@ -2996,7 +3047,7 @@ a.button.primary { opacity: 1; } -.bxsites-powered-by .bxsites-icon { +.bxsites-powered-by__logo { width: 1.25rem; height: 1.25rem; flex: 0 0 auto; diff --git a/docs/.theme/blog.bxm b/docs/.theme/blog.bxm index 1f59093..0f374d6 100644 --- a/docs/.theme/blog.bxm +++ b/docs/.theme/blog.bxm @@ -38,6 +38,8 @@ variables.pageActionsPosition = variables.siteConfig.theme.options.pageActionsPosition ?: "top" variables.accentColor = trim( variables.siteConfig.theme.options.accentColor ?: "" ) variables.accentColorDark = trim( variables.siteConfig.theme.options.accentColorDark ?: "" ) + variables.navAccentLine = ( variables.siteConfig.theme.options.navAccentLine ?: true ) ? true : false + variables.navAccentLineColor = trim( variables.siteConfig.theme.options.navAccentLineColor ?: "" ) // page.bxm (this layout's own default body) reads variables.tocPosition // directly for its inline "On this page" rendering - still needed here // even though this layout drops the sticky-rail aside, since a listing @@ -97,7 +99,7 @@ - + #renderExtraCss( variables.siteConfig.extraCss ?: [] )# @@ -124,6 +126,17 @@ + + + + + @@ -150,7 +163,7 @@ - + @@ -194,11 +207,6 @@ - - - #renderVersionSwitcher( variables.versions, variables.currentVersion )# - - #renderLocaleDropdown( variables.locales, variables.currentLocale )# @@ -235,8 +243,12 @@
@@ -263,41 +275,41 @@ - + - - - - - - - - - - + + + + + + + + + + - + - + - + - + @@ -340,7 +352,6 @@ - #renderExtraJs( variables.siteConfig.extraJs ?: [] )# diff --git a/docs/.theme/home.bxm b/docs/.theme/home.bxm index 39839aa..7a95ce5 100644 --- a/docs/.theme/home.bxm +++ b/docs/.theme/home.bxm @@ -88,8 +88,8 @@ - - + + #renderExtraCss( variables.siteConfig.extraCss ?: [] )# @@ -140,7 +140,7 @@ - + @@ -173,9 +173,6 @@
- - #renderVersionSwitcher( variables.versions, variables.currentVersion )# - #renderLocaleDropdown( variables.locales, variables.currentLocale )# @@ -839,14 +836,14 @@ - + #renderExtraJs( variables.siteConfig.extraJs ?: [] )# diff --git a/docs/.theme/includes/page-helpers.bxm b/docs/.theme/includes/page-helpers.bxm index 4ceb4e8..1ecbbdf 100644 --- a/docs/.theme/includes/page-helpers.bxm +++ b/docs/.theme/includes/page-helpers.bxm @@ -117,10 +117,10 @@ listHtml &= '' if ( arguments.hideAtXl ) { - return '
' & encodeForHTML( variables.strings.onThisPage ) & '' & listHtml & '
' + return '
' & bxsitesIcon( "outline" ) & ' ' & encodeForHTML( variables.strings.onThisPage ) & '' & listHtml & '
' } - return '' + return '' } /** diff --git a/docs/.theme/includes/site-helpers.bxm b/docs/.theme/includes/site-helpers.bxm index 37cf1cd..4580fa4 100644 --- a/docs/.theme/includes/site-helpers.bxm +++ b/docs/.theme/includes/site-helpers.bxm @@ -56,7 +56,7 @@ * `navExpandAll` is on. `nested`/`collapsed` track recursion state. */ function renderNavList( required array nodes, boolean nested = false, boolean collapsed = false ) { - var html = sb{ "
    " } + var html = sb{ "
      " } for ( var node in arguments.nodes ) { var isActive = len( node.url ) && ( node.url == variables.page.urlPath || ( len( variables.page.course.id ) && node.url == variables.page.course.indexUrl ) ) var linkClass = "nav-link" & ( isActive ? " active" : "" ) @@ -118,23 +118,6 @@ return html } - /** - * Renders the docs version switcher - a plain ' } - for ( var v in arguments.versions ) { - var selected = v.label == arguments.currentVersion ? " selected" : "" - html &= '' - } - html &= '' - return html - } - /** * A flag-icon dropdown - the trigger button shows the * current locale's own flag, opening a menu listing every locale by diff --git a/docs/.theme/layout.bxm b/docs/.theme/layout.bxm index 38738d1..4c2f2d8 100644 --- a/docs/.theme/layout.bxm +++ b/docs/.theme/layout.bxm @@ -31,6 +31,8 @@ variables.pageActionsPosition = variables.siteConfig.theme.options.pageActionsPosition ?: "top" variables.accentColor = trim( variables.siteConfig.theme.options.accentColor ?: "" ) variables.accentColorDark = trim( variables.siteConfig.theme.options.accentColorDark ?: "" ) + variables.navAccentLine = ( variables.siteConfig.theme.options.navAccentLine ?: true ) ? true : false + variables.navAccentLineColor = trim( variables.siteConfig.theme.options.navAccentLineColor ?: "" ) @@ -84,7 +86,7 @@ - + #renderExtraCss( variables.siteConfig.extraCss ?: [] )# @@ -111,6 +113,17 @@ + + + + + @@ -137,7 +150,7 @@ - + @@ -181,11 +194,6 @@ - - - #renderVersionSwitcher( variables.versions, variables.currentVersion )# - - #renderLocaleDropdown( variables.locales, variables.currentLocale )# @@ -225,9 +233,15 @@
      @@ -266,51 +280,51 @@ - + - - - - - - - - - - + + + + + + + + + + - + - + - + - + - + - + @@ -353,8 +367,8 @@ - #renderExtraJs( variables.siteConfig.extraJs ?: [] )# +