Skip to content

Fix empty sidebar on pages without matching section#86

Merged
ronaldtse merged 1 commit intomainfrom
fix/sidebar-no-section-pages
May 6, 2026
Merged

Fix empty sidebar on pages without matching section#86
ronaldtse merged 1 commit intomainfrom
fix/sidebar-no-section-pages

Conversation

@ronaldtse
Copy link
Copy Markdown
Contributor

Pages like /about/ and /resources/links/ had no matching sidebar section in navigation_sidebar.yml but still rendered the full sidebar structure — empty container, backdrop, and a vertical hamburger toggle spanning page height on narrow screens.

Changes:

  • _layouts/toc-type.html: Conditionally render sidebar/backdrop/toggle only when a section matches the current URL. Adds .no-sidebar class when no match.
  • _frontend/entrypoints/application.css: Add .documentation.no-sidebar > article rule to remove max-width constraint.

Requires jekyll-calconnect-theme ~> 0.4 (theme's default.html also has this fix).

Pages like /about/ and /resources/links/ had no matching sidebar section
but still rendered an empty sidebar container with a full-height mobile
hamburger toggle. Now uses conditional rendering with .no-sidebar class.

Also adds .no-sidebar CSS rule to remove article max-width when no sidebar.
@ronaldtse ronaldtse merged commit e7efa61 into main May 6, 2026
3 checks passed
@ronaldtse ronaldtse deleted the fix/sidebar-no-section-pages branch May 6, 2026 06:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant