diff --git a/assets/js/theme/nav/mainMenu.js b/assets/js/theme/nav/mainMenu.js index 34b592aa6d9961b4aa2d89156b83634f7d51fe10..3847abf27386dea7ba3551ee4ed5384a8f053c59 100644 --- a/assets/js/theme/nav/mainMenu.js +++ b/assets/js/theme/nav/mainMenu.js @@ -68,7 +68,11 @@ class MainMenu { classAction = this.state.isOpened ? 'add' : 'remove'; this.mainButton.setAttribute('aria-expanded', this.state.isOpened); this.menu.classList[classAction](CLASSES.mainMenuOpened); - document.documentElement.classList[classAction](CLASSES.menusOpened); + + // Close dropdown to avoid keeping overlay when mobile and menu closed + if (this.state.isMobile && !this.state.isOpened) { + this.state.hasDropdownOpened = false; + } // Update global overlay this.updateOverlay(); @@ -123,7 +127,7 @@ class MainMenu { y = window.scrollY, isNearTop = y < offset; - if (isNearTop) { + if (isNearTop) { this.element.classList.remove(CLASSES.sticky); } else { this.element.classList.add(CLASSES.sticky); diff --git a/assets/sass/_theme/_configuration.sass b/assets/sass/_theme/_configuration.sass index 035afd5f8b366488cf8aef150d1d7364cac4c741..0d55a256d36ff8e346d330b4427531f498dcb940 100644 --- a/assets/sass/_theme/_configuration.sass +++ b/assets/sass/_theme/_configuration.sass @@ -26,16 +26,29 @@ $line-height-base: 1.4 !default $body-font-size: 16px !default $small-font-size: 14px !default -$h1-size: px2rem(60) !default -$h2-size: px2rem(40) !default -$h3-size: px2rem(30) !default -$h4-size: px2rem(20) !default +$h1-size-md: px2rem(60) !default +$h2-size-md: px2rem(40) !default +$h3-size-md: px2rem(30) !default +$h4-size-md: px2rem(20) !default +$h5-size-md: px2rem(18) !default +$h6-size-md: px2rem(16) !default + +$h1-size: px2rem(30) !default +$h2-size: px2rem(24) !default +$h3-size: px2rem(20) !default +$h4-size: px2rem(18) !default $h5-size: px2rem(18) !default $h6-size: px2rem(16) !default // Font weight $heading-font-weight: normal !default +// Line-height +$h1-line-height: 120 !default +$h2-line-height: 110 !default +$h3-line-height: 110 !default +$h4-line-height: 130 !default + $h1-weight: $heading-font-weight !default $h2-weight: $heading-font-weight !default $h3-weight: $heading-font-weight !default @@ -162,6 +175,8 @@ $block-testimonials-pagination-progress-background: $main-color !default $block-key_figures-number-font-size: px2rem(60) !default // Sections +$article-title-size: $h4-size !default +$article-title-size-md: $h4-size-md !default $article-media-background: color-contrast($main-background-color, 3%) !default $article-title-size: $h4-size !default @@ -179,7 +194,9 @@ $persons-avatar-background-color: $main-light-color !default // Program $program-essential-font-size: $h5-size !default +$program-essential-font-size-md: $h5-size-md !default $program-share-font-size: $h4-size !default +$program-share-font-size-md: $h4-size-md !default $program-zindex-toc: $zindex-toc !default // MISC diff --git a/assets/sass/_theme/_utils.sass b/assets/sass/_theme/_utils.sass index 60a32717992d824b3cefb10f2e27abf4f695373e..509a9a489034672f1ec0acaac3acb6f199fcbfce 100644 --- a/assets/sass/_theme/_utils.sass +++ b/assets/sass/_theme/_utils.sass @@ -133,6 +133,8 @@ .title font-size: $article-title-size margin-bottom: px2rem(5) + @include media-breakpoint-up(md) + font-size: $widget-title-size-md a @include stretched-link p diff --git a/assets/sass/_theme/blocks/pages.sass b/assets/sass/_theme/blocks/pages.sass index 00a3d1eb3c67dc0d8e3841861524ce8bf20307d4..7c70ade7817e7d7b5b6f036ebe7dbc7711f5a412 100644 --- a/assets/sass/_theme/blocks/pages.sass +++ b/assets/sass/_theme/blocks/pages.sass @@ -45,7 +45,7 @@ padding-bottom: $grid-gutter padding-top: $grid-gutter .pages - @include grid(3) + @include grid(3, md) .page aspect-ratio: 0.887 background-color: $block-pages-card-page-background diff --git a/assets/sass/_theme/blocks/posts.sass b/assets/sass/_theme/blocks/posts.sass index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..ae6aa28c13780ba18318646ab336561f81691937 100644 --- a/assets/sass/_theme/blocks/posts.sass +++ b/assets/sass/_theme/blocks/posts.sass @@ -0,0 +1,4 @@ +.posts__page + aside + @include container + margin-top: $spacing1 \ No newline at end of file diff --git a/assets/sass/_theme/design-system/grid.sass b/assets/sass/_theme/design-system/grid.sass index cdba7df48aeb889fed69b651b12c45f41c754e67..452a8a8c4d1527f9c5d587c79090f40520820840 100644 --- a/assets/sass/_theme/design-system/grid.sass +++ b/assets/sass/_theme/design-system/grid.sass @@ -21,7 +21,9 @@ > .blocks .block-content padding-left: col(5) - + @include media-breakpoint-down(md) + aside + display: none // TODO: mieux gérer la gestion de l'aside dans l'html body.full-width & aside diff --git a/assets/sass/_theme/design-system/nav.sass b/assets/sass/_theme/design-system/nav.sass index c5bf00ee2d2b46e7104089f1152ef23db18c95a7..3d3a648cf2856d1adfe46055b5e1c6cd1e243fa0 100644 --- a/assets/sass/_theme/design-system/nav.sass +++ b/assets/sass/_theme/design-system/nav.sass @@ -178,6 +178,8 @@ body border: 1px solid $hero-color padding: $spacing0 $spacing1 font-size: $program-share-font-size + @include media-breakpoint-up(md) + font-size: $program-share-font-size-md @include icon(social, after) margin-left: px2rem(10) .dropdown-menu diff --git a/assets/sass/_theme/design-system/typography.sass b/assets/sass/_theme/design-system/typography.sass index b7298641a861ccd1e9f6ed788d610ce9bf624edb..23fe143b4f242cd5c7a2c94a947650b5a8f50b9b 100644 --- a/assets/sass/_theme/design-system/typography.sass +++ b/assets/sass/_theme/design-system/typography.sass @@ -6,21 +6,29 @@ h1, .h1 @extend %heading font-size: $h1-size font-weight: $h1-weight + @include media-breakpoint-up(md) + font-size: $h1-size-md h2, .h2, .lead @extend %heading font-size: $h2-size font-weight: $h2-weight + @include media-breakpoint-up(md) + font-size: $h2-size-md h3, .h3 @extend %heading font-size: $h3-size font-weight: $h3-weight + @include media-breakpoint-up(md) + font-size: $h3-size-md h4, .h4 @extend %heading font-size: $h4-size font-weight: $h4-weight + @include media-breakpoint-up(md) + font-size: $h4-size-md h5, .h5 @extend %heading diff --git a/assets/sass/_theme/sections/diplomas.sass b/assets/sass/_theme/sections/diplomas.sass index 5f63b7c6edb3e32c8447f6d15f440604eb0284e2..1e9b335b2580a06d144d8d461c46db2510bf4b09 100644 --- a/assets/sass/_theme/sections/diplomas.sass +++ b/assets/sass/_theme/sections/diplomas.sass @@ -66,10 +66,12 @@ ul.diplomas // vertical-align: middle .essential - @include grid(12, false, 0) flex-wrap: wrap font-size: $program-essential-font-size margin-bottom: 0 + @include media-breakpoint-up(md) + @include grid(12, false, 0) + font-size: $program-essential-font-size-md dt, dd margin: 0 diff --git a/assets/sass/_theme/sections/persons.sass b/assets/sass/_theme/sections/persons.sass index 5ae7c191a6632232e47cfff50d09ba81d142026b..4e08d28f0aebee28feec25917a6f7ebc0fbd11cc 100644 --- a/assets/sass/_theme/sections/persons.sass +++ b/assets/sass/_theme/sections/persons.sass @@ -59,6 +59,7 @@ ol.persons @include aspect-ratio(50, 50, 'img') background-color: $persons-avatar-background-color border-radius: 50% + margin-bottom: $spacing2 overflow: hidden position: relative width: 100% @@ -96,16 +97,16 @@ ol.persons a @extend .link-more - -.persons__page - .informations - @include grid - margin-bottom: $spacing2 - > div - &:first-of-type - grid-column: 1 / 9 - &:nth-of-type(2) - grid-column: 9 / 13 - - .lead + div - margin-top: $spacing2 +@include media-breakpoint-up(lg) + .persons__page + .informations + @include grid + margin-bottom: $spacing2 + > div + &:first-of-type + grid-column: 1 / 9 + &:nth-of-type(2) + grid-column: 9 / 13 + + .lead + div + margin-top: $spacing2 diff --git a/assets/sass/_theme/sections/posts.sass b/assets/sass/_theme/sections/posts.sass index e74bfa054e387d31f9ae95b372263f61633f8183..565480f01a977c74187cdfa341e7f0bb7b25c267 100644 --- a/assets/sass/_theme/sections/posts.sass +++ b/assets/sass/_theme/sections/posts.sass @@ -15,6 +15,7 @@ font-size: px2rem(14) .posts + @include grid(1) @include grid(2, md) @include grid(3, xl) diff --git a/assets/sass/_theme/sections/programs.sass b/assets/sass/_theme/sections/programs.sass index 3ff49ebaa8c6bfbf9f8ce89b3f7bb46eedfa735b..6f2c8203d54328ccea0b9bf012b54861274af1e2 100644 --- a/assets/sass/_theme/sections/programs.sass +++ b/assets/sass/_theme/sections/programs.sass @@ -115,7 +115,8 @@ ol.programs margin-bottom: 0 .blocks .block-content - padding-left: col(5) + @include media-breakpoint-up(md) + padding-left: col(5) @include media-breakpoint-up(md) article diff --git a/assets/sass/_theme/sections/sitemap.sass b/assets/sass/_theme/sections/sitemap.sass index b52730394e6b1466077b16467600dca7c594c6a0..460db7ac30ed304dc281c6943f9b46a330af0b19 100644 --- a/assets/sass/_theme/sections/sitemap.sass +++ b/assets/sass/_theme/sections/sitemap.sass @@ -5,5 +5,7 @@ padding-left: col(5) ul list-style: none - margin-bottom: 7.5rem - padding: 0 \ No newline at end of file + margin-bottom: calc(7.5rem / 2) + padding: 0 + @include media-breakpoint-up(md) + margin-bottom: 7.5rem \ No newline at end of file