diff --git a/assets/sass/_theme/design-system/table_of_contents.sass b/assets/sass/_theme/design-system/table_of_contents.sass index 98432680497360b833455f3753feccb07acab870..86bbe70f2f8bdb876787ce181e0a0603967a4529 100644 --- a/assets/sass/_theme/design-system/table_of_contents.sass +++ b/assets/sass/_theme/design-system/table_of_contents.sass @@ -65,7 +65,8 @@ justify-content: end text-align: right @include in-page-with-sidebar - display: none + body:not(.offcanvas-toc) & + display: none @include media-breakpoint-down(md) border-top: 1px solid $color-border position: fixed @@ -99,14 +100,21 @@ .toc-container // in full width page or under md breakpoint (mobile) + @include in-page-without-sidebar @include offcanvas-toc @include media-breakpoint-down(md) @include offcanvas-toc + // Program tweak : use offcanvas + body.offcanvas-toc & + @include offcanvas-toc // Only desktop and in page with sidebar @include media-breakpoint-up(md) @include in-page-with-sidebar + + // Program tweak : use offcanvas + body:not(.offcanvas-toc) & @include container-margin-left pointer-events: none top: 0 diff --git a/assets/sass/_theme/sections/programs.sass b/assets/sass/_theme/sections/programs.sass index aa0b6d764c37c085bee7cd60e583b8af8a39be0b..a494cdbc2317a08952958427a693fe1fdb5a9b0b 100644 --- a/assets/sass/_theme/sections/programs.sass +++ b/assets/sass/_theme/sections/programs.sass @@ -95,10 +95,14 @@ ol.programs .document-content .content padding-top: $spacing2 + > div > * + * + margin-top: 1em .blocks .container padding-left: 0 padding-right: 0 + .block-content + padding-left: 0 @include media-breakpoint-up(md) .document-content @@ -107,7 +111,7 @@ ol.programs border-top: 1px solid $color-border position: relative > * - grid-column: 6/13 + grid-column: 5/13 > h2 $sticky-top-offset: 90px @include sticky($sticky-top-offset) @@ -117,8 +121,8 @@ ol.programs grid-column: 1/5 margin-bottom: 0 section:first-of-type - .content - border-top: none + .content + border-top: none table margin-block-start: 2em diff --git a/layouts/partials/GetBodyclass b/layouts/partials/GetBodyclass index f1aa0bef5d8e45a0f8a3fa8c95e8ca2044f8e5e0..8663c304c5ed0d448370c09f9751fccb55dbe543 100644 --- a/layouts/partials/GetBodyclass +++ b/layouts/partials/GetBodyclass @@ -4,8 +4,12 @@ {{- $bodyclass = printf "page-%s" $bodyclass -}} {{- end -}} -{{- if or (or .Params.full_width .Params.diplomas) (and (eq .Kind "section") (eq .Type "posts")) -}} +{{- if or .Params.full_width (and (eq .Kind "section") (eq .Type "posts")) -}} {{- $bodyclass = printf "full-width %s" $bodyclass -}} {{- end -}} +{{- if .Params.diplomas -}} + {{- $bodyclass = printf "offcanvas-toc %s" $bodyclass -}} +{{- end -}} + {{- return $bodyclass -}} \ No newline at end of file