diff --git a/assets/scss/_styles_project.scss b/assets/scss/_styles_project.scss index 6c56006acdf..0a55fb1df16 100644 --- a/assets/scss/_styles_project.scss +++ b/assets/scss/_styles_project.scss @@ -464,6 +464,28 @@ img { } } + /* Olu - Position the mobile close button and remove extra top spacing so content aligns */ + #td-sidebar-menu > .d-flex.d-md-none { + position: absolute; + top: 0.5rem; + right: 0.5rem; + z-index: 1060; + } + + #td-sidebar-menu { + padding-top: 0; + } + + #td-sidebar-menu .td-sidebar__search { + margin-top: 0; /* ensure search sits at top level */ + padding-top: 0; + } + + #td-sidebar-menu nav.td-sidebar-nav { + margin-top: 0; + padding-top: 0.25rem; + } + // Responsive tables // // Generate series of `.table-responsive-*` classes for configuring the screen @@ -607,4 +629,54 @@ img.ToC-icon{ &:hover { background-color: $gray-light; }; +} + +// Olu - Mobile sidebar open/close behaviour (apply to small and medium screens) +@include media-breakpoint-down(md) { + body.td-sidebar-open { + overflow: hidden; + } + + .td-sidebar { + display: block !important; + position: fixed; + top: 0; + left: 0; + height: 100vh; + width: 80%; + max-width: 340px; + z-index: 1055; + background-color: $td-sidebar-bg-color; + transform: translateX(-100%); + transition: transform .25s ease-in-out; + box-shadow: 0 0 0.5rem rgba(0,0,0,0.2); + } + + body.td-sidebar-open .td-sidebar { + transform: translateX(0); + } + + .td-sidebar-overlay { + display: none; + position: fixed; + inset: 0; + z-index: 1050; + background: rgba(0,0,0,0.45); + } + + body.td-sidebar-open .td-sidebar-overlay { + display: block; + } + + /* adjustment for the close button in the sidebar */ + #td-mobile-sidebar-close { + font-size: 1.1rem; + } + + // Ensure the scrolling container inside the off-canvas sidebar fills more of the viewport + .td-sidebar__inner { + height: calc(100vh - 1.5rem) !important; + overflow-y: auto; + padding-top: 1.25rem; + } } \ No newline at end of file diff --git a/config/_default/hugo.toml b/config/_default/hugo.toml index 60a3108f001..3b5d4b9f6ed 100644 --- a/config/_default/hugo.toml +++ b/config/_default/hugo.toml @@ -84,7 +84,7 @@ replacements = "github.com/FortAwesome/Font-Awesome -> ., github.com/twbs/bootst # Olu - Minification configuration [minify] - minifyOutput = true + minifyOutput = false # Everything below this are Site Params # ====================================== diff --git a/layouts/docs/baseof.html b/layouts/docs/baseof.html index 55ed62111b6..4f342609732 100644 --- a/layouts/docs/baseof.html +++ b/layouts/docs/baseof.html @@ -1,56 +1,70 @@ - - {{ partial "head.html" . }} - - - -{{/* NK - deactivation of original navbar -
- {{ partial "navbar.html" . }} -
+ + {{ partial "head.html" . }} + + + +{{/* NK - deactivation of original navbar +
+ {{ partial "navbar.html" . }} +
*/}} -
-
-
- - -
- - {{ if not .Title }} - {{ warnf "File %s \n\t\t\t\thas no title in the front matter\n " .Page.File.Path }} - {{ end }} - - {{ if .Site.Params.versions }} - - {{ end }} - - - {{ if not .Site.Params.ui.breadcrumb_disable }}{{ partial "breadcrumb.html" . }}{{ end }} - - {{ partial "version-banner.html" . }} - - {{ block "main" . }}{{ end }} -
-
-
- {{ partial "footer.html" . }} -
- {{ partial "scripts.html" . }} - +
+
+
+
+ +
+ +
+ {{ if not .Site.Params.ui.breadcrumb_disable }}{{ partial "breadcrumb.html" . }}{{ end }} + {{ partial "version-banner.html" . }} +
+
+ + {{ if not .Title }} + {{ warnf "File %s \n\t\t\t\thas no title in the front matter\n " .Page.File.Path }} + {{ end }} + + {{ if .Site.Params.versions }} + + {{ end }} + + +
+ {{ if not .Site.Params.ui.breadcrumb_disable }}{{ partial "breadcrumb.html" . }}{{ end }} + {{ partial "version-banner.html" . }} +
+ + {{ block "main" . }}{{ end }} +
+ + +
+
+ + {{ partial "footer.html" . }} +
+ {{ partial "scripts.html" . }} + + diff --git a/layouts/landingpage/landingpage.html b/layouts/landingpage/landingpage.html index ef878da727f..2c069685f64 100644 --- a/layouts/landingpage/landingpage.html +++ b/layouts/landingpage/landingpage.html @@ -16,6 +16,13 @@
+ +
+ +
diff --git a/layouts/partials/scripts.html b/layouts/partials/scripts.html index 26ebc430441..ea4a2b7fbea 100644 --- a/layouts/partials/scripts.html +++ b/layouts/partials/scripts.html @@ -106,4 +106,29 @@ {{ end -}} + + {{ partial "hooks/body-end.html" . -}} \ No newline at end of file diff --git a/layouts/partials/sidebar-tree.html b/layouts/partials/sidebar-tree.html index 6bff0f47d78..d9a5b3e87d2 100644 --- a/layouts/partials/sidebar-tree.html +++ b/layouts/partials/sidebar-tree.html @@ -2,18 +2,25 @@ {{ $sidebarCacheLimit := cond (isset .Site.Params.ui "sidebar_cache_limit") .Site.Params.ui.sidebar_cache_limit 2000 -}} {{ $shouldDelayActive := ge (len .Site.Pages) $sidebarCacheLimit -}}
+ +
+ +
{{ if not .Site.Params.ui.sidebar_search_disable -}} {{ else -}}
- +
{{ end -}}