Skip to content

Commit

Permalink
Added support to disable the left navigation on a specific page.
Browse files Browse the repository at this point in the history
  • Loading branch information
david-waltermire committed Sep 21, 2023
1 parent b82f458 commit 3c6b82f
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion dist/css/styles.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/css/styles.css.map

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion layouts/partials/site-content.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
{{- $displayToc := .Param "toc.display" | default false -}}
{{- $displaySideNav := .Param "sidenav.display" | default true -}}
<div class="site-content-container">
{{- if $displaySideNav -}}
<aside id="page-side-navigation" class="sidenav site-sidenav" aria-label="Section navigation">
{{ partial "components/usa-sidenav.html" . }}
</aside>
{{- $displayToc := .Param "toc.display" | default false -}}
{{- end -}}
{{- with .Page.Params.toc -}}
{{- if isset . "enabled" -}}
{{- $displayToc = .enabled -}}
Expand Down
10 changes: 6 additions & 4 deletions sass/hugo-uswds/src/styles/site/custom-styles/_main-content.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ body{
text-rendering: optimizeLegibility;
}

.site-sidenav + .main-content {
@include at-media("desktop") {
width: calc(100% - #{units($width-nav-sidebar)});
}
}

.main-content {
@include u-pin("right");
@include u-pin("bottom");
Expand All @@ -18,10 +24,6 @@ body{
width: 100%;
max-width: units($theme-grid-container-max-width);

@include at-media("desktop") {
width: calc(100% - #{units($width-nav-sidebar)});
}

.lt-ie9 & {
width: 75%;
}
Expand Down

0 comments on commit 3c6b82f

Please sign in to comment.