Skip to content

Commit

Permalink
Don’t hide banner style titles unless there is a sidebar there
Browse files Browse the repository at this point in the history
  • Loading branch information
dragonstyle committed Apr 30, 2022
1 parent f66cd5f commit e1a9c37
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
8 changes: 8 additions & 0 deletions src/project/types/website/website-navigation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,7 @@ export async function websiteNavigationExtras(
[kHtmlPostprocessors]: [
navigationHtmlPostprocessor(
project,
format,
source,
markdownPipeline,
format.language,
Expand Down Expand Up @@ -362,6 +363,7 @@ export function writeRedirectPage(path: string, href: string) {

function navigationHtmlPostprocessor(
project: ProjectContext,
format: Format,
source: string,
markdownPipeline: MarkdownPipeline,
language: FormatLanguage,
Expand All @@ -374,6 +376,12 @@ function navigationHtmlPostprocessor(
// Process any markdown rendered through the render envelope
markdownPipeline.processRenderedMarkdown(doc);

// Mark the body with a sidebar, if present
const sidebar = sidebarForHref(href, format);
if (sidebar) {
doc.body.classList.add("nav-sidebar");
}

// Note sidebar style on body
// TODO: Should we compute this using the using project instead?
// It is slightly complicated since we need to compute the sidebar
Expand Down
3 changes: 1 addition & 2 deletions src/resources/formats/html/bootstrap/_bootstrap-rules.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1573,8 +1573,7 @@ nav.quarto-secondary-nav.color-navbar .quarto-btn-toggle {
}
}

body.floating,
body.docked {
body.nav-sidebar {
@include media-breakpoint-down(lg) {
.quarto-title-banner,
.quarto-title-banner {
Expand Down

0 comments on commit e1a9c37

Please sign in to comment.