diff --git a/assets/js/theme/blocks/draggableBlocks.js b/assets/js/theme/blocks/draggableBlocks.js new file mode 100644 index 0000000000000000000000000000000000000000..fcde80907af054d6068d5a757e9358fadcd7e148 --- /dev/null +++ b/assets/js/theme/blocks/draggableBlocks.js @@ -0,0 +1,170 @@ +const draggableBlocks = document.querySelectorAll('.block-timeline--horizontal, .block-posts--carousel'); + +class DraggableBlock { + constructor (block) { + this.block = block; + this.content = this.block.querySelector('.draggable-container'); + this.list = this.block.querySelector('ol, ul'); + this.items = this.list.querySelectorAll('.draggable-item'); + this.previous = this.block.querySelector('.previous'); + this.next = this.block.querySelector('.next'); + this.isPointerDown = false; + + this.index = 0; + + this.listen(); + this.resize(); + this.goTo(0); + } + + listen () { + window.addEventListener('resize', this.resize.bind(this)); + + this.items.forEach((item, i) => { + item.addEventListener('click', this.onClickItem.bind(this, i)); + }); + + if (this.previous && this.next) { + this.handleArrows(); + } + + this.handlePointers(); + this.handleScroll(); + } + + resize () { + let maxTitleHeight = 0; + + this.block.style = ''; + + this.itemWidth = this.items[0].offsetWidth; + + this.items.forEach((item) => { + maxTitleHeight = Math.max(item.querySelector('.title, [itemprop="headline"]').offsetHeight, maxTitleHeight); + }); + + this.block.style.setProperty('--min-title-height', maxTitleHeight + 'px'); + this.update(); + } + + onClickItem(i) { + if (!this.isManipulated) { + this.goTo(i); + } + } + + handleArrows () { + this.previous.addEventListener('click', () => { + this.goTo(this.index-1); + }); + + this.next.addEventListener('click', () => { + this.goTo(this.index+1); + }); + } + + handlePointers () { + let startX, + endX, + threshold = 30; + // j'ai initialisé isPointerDown au début du code : this.isPointerDown + // j'ai enlevé endEvents = ['pointerup'] parce qu'il était seul ? + this.block.style.touchAction = 'pan-y'; + + // on passe de this.content à this.block sur chaque événement pour grab sur tout le bloc + this.block.addEventListener('pointerdown', (event) => { + // On vérifie que l'on ne soit pas en train de cliquer sur les boutons (car on cible tout le bloc pour le grab) + if (event.target !== this.next && event.target !== this.previous) { + // on utilise partout this.isPointerDown car la navigation avec les arrow buguait + // parfois ça naviguait de 2 items + this.isPointerDown = true; + this.content.classList.add('is-grabbing'); + startX = event.clientX; + } + }); + + this.block.addEventListener('pointermove', (event) => { + endX = event.clientX; + // On vérifie que l'événement pointerdown a été activé + if (this.isPointerDown) { + event.preventDefault(); + this.items.forEach((item) => { + // on enlève le pointerevents pour que les liens ne soient pas cliquable au drag + item.style.pointerEvents = "none"; + }); + } + }); + + // anciennement géré avec endEvents = ['pointerup'] (j'enlève le forEach) + this.block.addEventListener('pointerup', (event) => { + endX = event.clientX; + // on vérifie encore isPointerDown pour éviter le pb des arrows + if (this.isPointerDown) { + this.isPointerDown = false; + this.onManipulationEnd(startX, endX, threshold); + } + }); + } + + handleScroll() { + // On écoute le scroll sur le contenu du bloc + this.content.addEventListener('wheel', (event) => { + const deltaX = event.deltaX; + const deltaY = event.deltaY; + // navigation entre les items (comme onManipulationEnd) + if (Math.abs(deltaX) > Math.abs(deltaY)) { + if (deltaX !== 0) { + if (deltaX > 0) { + this.goTo(this.index + 1); + } else { + this.goTo(this.index - 1); + } + } + } + }); + } + + onManipulationEnd (start, end, threshold) { + if (start > end + threshold) { + this.goTo(this.index+1); + } else if (start < end - threshold) { + this.goTo(this.index-1); + } + + this.content.classList.remove('is-grabbing'); + this.items.forEach((item) => { + // On rend le pointervents pour pouvoir cliquer sur le lien si on drag pas + item.style.pointerEvents = "all"; + }); + + setTimeout(() => { + this.isManipulated = false; + }, 100); + } + + goTo (_index) { + this.index = Math.min(Math.max(_index, 0), this.items.length-1); + this.update(); + } + + update () { + this.list.style.marginLeft = `${-this.index * this.itemWidth}px`; + + this.items.forEach((item, index) => { + if (index < this.index) { + item.classList.add('is-passed'); + } else { + item.classList.remove('is-passed'); + } + }); + + if (this.previous && this.next) { + this.previous.disabled = this.index === 0; + this.next.disabled = this.index === this.items.length - 1; + } + } +} + +draggableBlocks.forEach((block) => { + new DraggableBlock(block); +}); diff --git a/assets/js/theme/blocks/timeline.js b/assets/js/theme/blocks/timeline.js deleted file mode 100644 index bf8b9ac97730155bc496a8aa790628f7cc4f825e..0000000000000000000000000000000000000000 --- a/assets/js/theme/blocks/timeline.js +++ /dev/null @@ -1,132 +0,0 @@ -const timelines = document.querySelectorAll('.block-timeline--horizontal'); - -class BlockTimeline { - constructor (block) { - this.block = block; - this.content = this.block.querySelector('.timeline'); - this.list = this.block.querySelector('.timeline-events ol'); - this.items = this.list.querySelectorAll('.timeline-event'); - this.previous = this.block.querySelector('.previous'); - this.next = this.block.querySelector('.next'); - this.isManipulated = false; - - this.index = 0; - - this.listen(); - this.resize(); - this.goTo(0); - } - - listen () { - window.addEventListener('resize', this.resize.bind(this)); - - this.items.forEach((item, i) => { - item.addEventListener('click', this.onClickItem.bind(this, i)); - }); - - if (this.previous && this.next) { - this.handleArrows(); - } - - this.handlePointers(); - } - - resize () { - let maxTitleHeight = 0; - - this.block.style = ''; - - this.itemWidth = this.items[0].offsetWidth; - - this.items.forEach((item) => { - maxTitleHeight = Math.max(item.querySelector('.title').offsetHeight, maxTitleHeight); - }); - - this.block.style.setProperty('--min-title-height', maxTitleHeight + 'px'); - this.update(); - } - - onClickItem(i) { - if (!this.isManipulated) { - this.goTo(i); - } - } - - handleArrows () { - this.previous.addEventListener('click', () => { - this.goTo(this.index-1); - }); - this.next.addEventListener('click', () => { - this.goTo(this.index+1); - }); - } - - handlePointers () { - let endEvents = ['pointerup'], - startX, - endX, - threshold = 30, - isPointerDown = false; - - this.block.style.touchAction = 'pan-y'; - - this.block.addEventListener('pointerdown', (event) => { - this.content.classList.add('is-grabbing'); - startX = event.clientX; - isPointerDown = true; - }); - - this.block.addEventListener('pointermove', (event) => { - this.isManipulated = isPointerDown; - endX = event.clientX; - }); - - endEvents.forEach(event => { - this.block.addEventListener(event, (event) => { - isPointerDown = false; - this.onManipulationEnd(startX, endX, threshold); - }); - }); - } - - onManipulationEnd (start, end, threshold) { - if (start > end + threshold) { - this.goTo(this.index+1); - } else if (start < end - threshold) { - this.goTo(this.index-1); - } - - this.content.classList.remove('is-grabbing'); - - // Add delay to avoid conflict with item clicked - setTimeout(() => { - this.isManipulated = false; - }, 100); - } - - goTo (_index) { - this.index = Math.min(Math.max(_index, 0), this.items.length-1); - this.update(); - } - - update () { - this.list.style.marginLeft = `${-this.index * this.itemWidth}px`; - - this.items.forEach((item, index) => { - if (index < this.index) { - item.classList.add('is-passed'); - } else { - item.classList.remove('is-passed'); - } - }); - - if (this.previous && this.next) { - this.previous.disabled = this.index === 0; - this.next.disabled = this.index === this.items.length - 1; - } - } -} - -timelines.forEach((timeline) => { - new BlockTimeline(timeline); -}); diff --git a/assets/js/theme/index.js b/assets/js/theme/index.js index 5dc97bb8ec7e3c3e26fc77abafc75bfff9144365..98f75c1c3f810d4ba5ca0751d677168bf82aa0a1 100644 --- a/assets/js/theme/index.js +++ b/assets/js/theme/index.js @@ -8,5 +8,5 @@ import './design-system/search'; import './design-system/toc'; import './blocks/keyFigures'; import './blocks/organizations'; -import './blocks/timeline'; +import './blocks/draggableBlocks.js'; import './blocks/videos.js'; diff --git a/assets/js/vendors/carousel.js b/assets/js/vendors/carousel.js index 41d1afa93a711b7adc3bb8a7c1f0b52d307d58ea..a983e5fc05614fadd6fd7a6d87df8eadabeb29a7 100644 --- a/assets/js/vendors/carousel.js +++ b/assets/js/vendors/carousel.js @@ -1,17 +1,21 @@ import Splide from '@splidejs/splide'; -Splide.defaults = { - i18n: { - first: 'Aller au premier slide', - last: 'Aller au dernier slide', - next: 'Slide suivant', - pageX: 'Aller à la page %s', - pause: 'Mettre en pause le carousel', - play: 'Démarrer le carousel', - prev: 'Slide précedent', - slideX: 'Aller au slide %s' - } -}; +let siteLang = document.querySelector('html').getAttribute('lang'); + +if (siteLang == "fr") { + Splide.defaults = { + i18n: { + first: 'Aller au premier slide', + last: 'Aller au dernier slide', + next: 'Slide suivant', + pageX: 'Aller à la page %s', + pause: 'Mettre en pause le carousel', + play: 'Démarrer le carousel', + prev: 'Slide précedent', + slideX: 'Aller au slide %s' + } + }; +} class Carousel { constructor (element) { diff --git a/assets/js/vendors/lightbox.js b/assets/js/vendors/lightbox.js index b2cb76170eee2e4539d69146e2d38341a4050aaa..b8c477970840c1b4283c9f217b4e6335c7f5f264 100644 --- a/assets/js/vendors/lightbox.js +++ b/assets/js/vendors/lightbox.js @@ -1,6 +1,39 @@ import gLightbox from 'glightbox'; -gLightbox({ +let siteLang = document.querySelector('html').getAttribute('lang'); + +let lightboxBtn; + +const lightbox = gLightbox({ + selector: '.glightbox', openEffect: 'fade', - closeEffect: 'fade' + closeEffect: 'fade', + onOpen: () => { + lightboxBtn = document.activeElement; + const lightboxContainer = document.querySelector('#glightbox-body'); + lightboxContainer.setAttribute('aria-modal', 'true'); + + if(siteLang == "fr") { + const nextButton = document.querySelector('.gnext'); + const prevButton = document.querySelector('.gprev'); + const closeButton = document.querySelector('.gclose'); + + nextButton.setAttribute('aria-label', 'Suivant'); + prevButton.setAttribute('aria-label', 'Précédent'); + closeButton.setAttribute('aria-label', 'Fermer'); + } + }, + onClose: () => { + if (lightboxBtn) { + lightboxBtn.focus(); + } + } }); + +lightbox.on('slide_changed', () => { + const currentSlide = document.querySelector('.gslide.current'); + if (currentSlide) { + currentSlide.setAttribute("tabindex", "0"); + currentSlide.focus(); + } +}); \ No newline at end of file diff --git a/assets/sass/_theme/_configuration.sass b/assets/sass/_theme/_configuration.sass index e202a63539355ac22bfe91d12c5e05837dfe9ce7..999bd8b8ce1db09b83fb7631fd39a44efc2c19c6 100644 --- a/assets/sass/_theme/_configuration.sass +++ b/assets/sass/_theme/_configuration.sass @@ -275,39 +275,60 @@ $breadcrumb-icon-color: var(--color-text-alt) !default // Icons $icons: () $icons: map-merge($icons, ("arrow": "\ff01")) +$icons: map-merge($icons, ("arrow-raw": "\e93a")) $icons: map-merge($icons, ("arrow-first": "\e906")) $icons: map-merge($icons, ("arrow-last": "\e907")) $icons: map-merge($icons, ("arrow-left": "\ff02")) +$icons: map-merge($icons, ("arrow-left-raw": "\e938")) $icons: map-merge($icons, ("arrow-next": "\e909")) $icons: map-merge($icons, ("arrow-previous": "\e908")) $icons: map-merge($icons, ("arrow-right": "\ff00")) +$icons: map-merge($icons, ("arrow-right-raw": "\e939")) +$icons: map-merge($icons, ("arrow-alt": "\e931")) +$icons: map-merge($icons, ("arrow-alt-raw": "\e936")) $icons: map-merge($icons, ("burger": "\e902")) $icons: map-merge($icons, ("burger-close": "\e905")) $icons: map-merge($icons, ("caret": "\e904")) +$icons: map-merge($icons, ("caret-raw": "\e940")) +$icons: map-merge($icons, ("caret-bottom": "\e911")) +$icons: map-merge($icons, ("caret-bottom-raw": "\e944")) +$icons: map-merge($icons, ("caret-left": "\e912")) +$icons: map-merge($icons, ("caret-left-raw": "\e942")) $icons: map-merge($icons, ("caret-top": "\e914")) +$icons: map-merge($icons, ("caret-top-raw": "\e941")) $icons: map-merge($icons, ("caret-right": "\e913")) -$icons: map-merge($icons, ("caret-left": "\e912")) -$icons: map-merge($icons, ("caret-bottom": "\e911")) +$icons: map-merge($icons, ("caret-right-raw": "\e943")) $icons: map-merge($icons, ("check": "\ff06")) $icons: map-merge($icons, ("check-inline": "\ff07")) +$icons: map-merge($icons, ("check-inline-raw": "\e945")) $icons: map-merge($icons, ("close": "\e90e")) $icons: map-merge($icons, ("copy": "\ff03")) +$icons: map-merge($icons, ("copy-raw": "\e946")) $icons: map-merge($icons, ("copy-inline": "\ff04")) $icons: map-merge($icons, ("download": "\e900")) $icons: map-merge($icons, ("download-inline": "\e92f")) +$icons: map-merge($icons, ("download-raw": "\e937")) $icons: map-merge($icons, ("eye": "\e901")) $icons: map-merge($icons, ("facebook": "\e90b")) +$icons: map-merge($icons, ("facebook-raw": "\e93e")) $icons: map-merge($icons, ("globe": "\ff10")) +$icons: map-merge($icons, ("globe-raw": "\e934")) $icons: map-merge($icons, ("instagram": "\e90a")) +$icons: map-merge($icons, ("instagram-raw": "\e93b")) $icons: map-merge($icons, ("link-blank": "\e903")) $icons: map-merge($icons, ("link-blank-block": "\ff05")) +$icons: map-merge($icons, ("link-blank-raw": "\e932")) $icons: map-merge($icons, ("linkedin": "\e90c")) +$icons: map-merge($icons, ("linkedin-raw": "\e93c")) $icons: map-merge($icons, ("list-hyphen": "\e917")) +$icons: map-merge($icons, ("list-hyphen-raw": "\e93f")) $icons: map-merge($icons, ("pause": "\e90f")) $icons: map-merge($icons, ("play": "\e910")) $icons: map-merge($icons, ("search": "\e916")) $icons: map-merge($icons, ("search-inline": "\ee13")) +$icons: map-merge($icons, ("search-raw": "\e933")) $icons: map-merge($icons, ("social": "\e915")) +$icons: map-merge($icons, ("social-raw": "\e935")) $icons: map-merge($icons, ("social-inline": "\e92e")) $icons: map-merge($icons, ("social-facebook": "\ee01")) $icons: map-merge($icons, ("social-instagram": "\ee02")) @@ -323,6 +344,7 @@ $icons: map-merge($icons, ("social-github": "\ee10")) $icons: map-merge($icons, ("social-email": "\ee11")) $icons: map-merge($icons, ("toc": "\e918")) $icons: map-merge($icons, ("twitter": "\e90d")) +$icons: map-merge($icons, ("twitter-raw": "\e90d")) $icons: map-merge($icons, ("whatsapp": "\e919")) $icons: map-merge($icons, ("email": "\e920")) $icons: map-merge($icons, ("telegram": "\e921")) @@ -436,6 +458,7 @@ $block-testimonials-pagination-progress-background: var(--color-accent) !default $block-key_figures-number-font-family: $heading-font-family !default $block-key_figures-unit-font-weight: normal !default $block-key_figures-number-font-weight: bold !default +$block-key_figures-image-max-width: $spacing-6 !default $block-key_figures-font-size: pxToRem(16) !default $block-key_figures-number-font-size: pxToRem(32) !default @@ -491,5 +514,5 @@ $arrow-ease-transition-2: cubic-bezier(0, 0.65, 0.4, 1) !default $icon-burger-margin-right: -12px $icon-close-margin-right: -12px $icon-toc-margin-right: -14px -$icon-arrow-previous-margin-left: -22px // cf. testimonial +$icon-arrow-previous-margin-left: -18px // cf. testimonial $icon-social-margin-right: -14px diff --git a/assets/sass/_theme/_utils.sass b/assets/sass/_theme/_utils.sass index 3ef8b2955fa973e46ef7bc414111eec283c7d010..8fe28937e1de3e2fd1d88dda102a1b1d5322e621 100644 --- a/assets/sass/_theme/_utils.sass +++ b/assets/sass/_theme/_utils.sass @@ -7,5 +7,6 @@ @import utils/normalize @import utils/sidebar @import utils/sizes +@import utils/blocks -@import utils/shame +@import utils/shame \ No newline at end of file diff --git a/assets/sass/_theme/blocks/gallery.sass b/assets/sass/_theme/blocks/gallery.sass index f5fc7b1b00aa9aa4bae34ece7b84f5caf61ae272..f75ddd42a15ed6fae94ec58b6f296d95c1cb0b66 100644 --- a/assets/sass/_theme/blocks/gallery.sass +++ b/assets/sass/_theme/blocks/gallery.sass @@ -2,15 +2,13 @@ figure display: block margin-bottom: 0 + position: relative > a, img, picture display: block > a - transition: filter .3s ease - &:hover - // if low opacity means not selected, selected needs to be darker - filter: brightness(95%) + @include stretched-link img height: auto width: 100% diff --git a/assets/sass/_theme/blocks/key_figures.sass b/assets/sass/_theme/blocks/key_figures.sass index 80b4abcca76d1e6ebc82ea80c5ed963e9be765a2..64126a161eb8adc3aaecd984d939aa656b4a266c 100644 --- a/assets/sass/_theme/blocks/key_figures.sass +++ b/assets/sass/_theme/blocks/key_figures.sass @@ -26,6 +26,10 @@ font-size: $block-key_figures-number-font-size font-weight: $block-key_figures-number-font-weight margin-inline-end: 0.1em + img + display: block + margin-bottom: $spacing-2 + max-width: $block-key_figures-image-max-width @include media-breakpoint-up(desktop) font-size: $block-key_figures-font-size-desktop strong diff --git a/assets/sass/_theme/blocks/posts.sass b/assets/sass/_theme/blocks/posts.sass index 15db653de1ebab9ec64bd53da10c698560779275..5bbc3b2c3beeec4221305b7f43a9ddd7ab037c73 100644 --- a/assets/sass/_theme/blocks/posts.sass +++ b/assets/sass/_theme/blocks/posts.sass @@ -9,6 +9,7 @@ @include grid(1) @include grid($block-posts-grid-columns, desktop) article + @include author-and-time-side-to-side [itemprop=headline] a @include stretched-link @@ -18,7 +19,6 @@ margin-top: $spacing-2 .media margin-top: 0 - @include author-and-time-side-to-side &--grid @include media-breakpoint-down(desktop) @@ -289,6 +289,58 @@ margin-right: auto .post width: columns(4) + &--carousel + @include draggable-block + .container + padding-right: 0 + .carousel + padding-bottom: $spacing-3 + &:hover + cursor: grab + &.is-grabbing + cursor: grabbing + li + list-style: none + .posts + display: flex + gap: unset + .post + margin: 0 calc(var(--grid-gutter) / 2) + .actions-arrows + justify-content: space-between + @include media-breakpoint-down(desktop) + .carousel + gap: half(var(--grid-gutter)) + .post + width: columns(10) + .grab-item:last-of-type + margin-right: half(var(--grid-gutter)) + .actions-arrows + margin-right: var(--grid-gutter) + @include media-breakpoint-up(desktop) + .next + margin-right: pxToRem(-27) // Marge négative pour aligner correctement le picto à la colonne + @include in-page-with-sidebar + .post + width: columns(3) + [itemprop="headline"] + @include h4 + .carousel + .actions-arrows + width: offset(6) + @include in-page-without-sidebar + .block-content + display: flex + gap: var(--grid-gutter) + .top + width: columns(3) + .carousel + width: columns(9) + .post + width: columns(4) + .carousel + .actions-arrows + width: offset(8) // Move this part to blocks/categories when categories block is ready .block-posts diff --git a/assets/sass/_theme/blocks/projects.sass b/assets/sass/_theme/blocks/projects.sass new file mode 100644 index 0000000000000000000000000000000000000000..0b74eec0c4b8352bcdb41bb5518a8ee0aab45a77 --- /dev/null +++ b/assets/sass/_theme/blocks/projects.sass @@ -0,0 +1,3 @@ +.block-projects + .grid + @include grid(2, md) \ No newline at end of file diff --git a/assets/sass/_theme/blocks/timeline.sass b/assets/sass/_theme/blocks/timeline.sass index 1ffa69aefa220b406b18bafc9599823940819702..cb1be7fde5adc3a16af27eeae3d81ab2de5a9804 100644 --- a/assets/sass/_theme/blocks/timeline.sass +++ b/assets/sass/_theme/blocks/timeline.sass @@ -61,54 +61,17 @@ margin-left: columns(3) &--horizontal + @include draggable-block --min-title-height: 0px background: $block-timeline-horizontal-background color: $block-timeline-horizontal-color - overflow: hidden padding-bottom: var(--block-space-y) padding-top: var(--block-space-y) &::before display: none - .timeline - &:hover - cursor: grab - &.is-grabbing - cursor: grabbing - - .timeline-arrows - display: flex - padding-left: calc(var(--grid-gutter) / 2) - > button - @include button-reset - background: none - border: none - color: $block-timeline-horizontal-color - cursor: pointer - &:first-child - @include icon-block(arrow-previous, before) - margin-left: $icon-arrow-previous-margin-left - &:last-child - @include icon-block(arrow-next, before) - &:disabled - cursor: default - opacity: 0.3 - .timeline-events - margin-left: calc(var(--grid-gutter-negative) / 2) - margin-right: calc(var(--grid-gutter-negative) / 2) - ol - display: flex - flex-flow: row nowrap - list-style: none - padding-left: 0 - margin-top: $spacing-2 - transition: margin 0.4s ease-in-out - width: 100% .timeline-event - flex: none padding: 0 calc(var(--grid-gutter) / 2) - scroll-snap-align: start - transition: 0.3s opacity - width: 50% + width: columns(4) .title display: block min-height: var(--min-title-height) @@ -133,8 +96,6 @@ position: relative top: -4px width: 9px - &.is-passed - opacity: 0.15 &:last-child .line background: transparent @@ -147,11 +108,12 @@ @include media-breakpoint-down(desktop) .timeline-events position: relative - .timeline-arrows + .actions-arrows left: 0 position: absolute top: calc(#{$spacing-2} + var(--min-title-height)) .timeline-event + margin-right: 0 padding-right: 0 width: 75% .line diff --git a/assets/sass/_theme/design-system/button.sass b/assets/sass/_theme/design-system/button.sass index bae206c7cd3f03235d86a9d88dd8e83969d4b5ae..fffdd2dbb288563a23417ef62283ca352feb4b52 100644 --- a/assets/sass/_theme/design-system/button.sass +++ b/assets/sass/_theme/design-system/button.sass @@ -57,18 +57,6 @@ border-color: transparent color: var(--color-background) - -// TODO: check usage in journal -.link-btn - @extend .button - @include media-breakpoint-up(desktop) - padding: $spacing-2 - &[target="_blank"]:not(.icon) - display: flex - justify-content: space-between - align-items: center - @include icon-block(link-blank-block, after) - @mixin link-icon($icon: false) @include button-reset line-height: $body-line-height @@ -86,6 +74,9 @@ @if $icon @include icon($icon, after) +a.btn[target="_blank"] + @include button-icon(link-blank-raw) + .dropdown-share position: relative .dropdown-menu diff --git a/assets/sass/_theme/design-system/hero.sass b/assets/sass/_theme/design-system/hero.sass index 2eed2a63d77a44f78447d12218f3d1bffe1c7e7c..6f6f6118019fc9398f7c23965d3d6d87b12f63fd 100644 --- a/assets/sass/_theme/design-system/hero.sass +++ b/assets/sass/_theme/design-system/hero.sass @@ -15,7 +15,6 @@ outline-color: $hero-color .content align-items: start - padding-top: $spacing-5 .hero-text margin-top: $spacing-5 h1 + p @@ -41,7 +40,14 @@ margin-bottom: 0 & + .document-content margin-top: $spacing-5 + &--with-image + figure + position: relative + > a + @include stretched-link @include media-breakpoint-down(desktop) + .content + padding-top: 0 &--with-image padding-bottom: 0 .content @@ -61,6 +67,8 @@ margin-bottom: calc(#{-$spacing-7} + #{$spacing-4}) @include media-breakpoint-up(desktop) + .content + padding-top: $spacing-5 .hero-text width: columns(9) &--with-image diff --git a/assets/sass/_theme/design-system/nav.sass b/assets/sass/_theme/design-system/nav.sass index 82807bf5996a5e5c19ec408fb31ea04a7260cb16..42cd02a7eed8b71c5d6107ab5c3ff653fe59e13e 100644 --- a/assets/sass/_theme/design-system/nav.sass +++ b/assets/sass/_theme/design-system/nav.sass @@ -64,7 +64,7 @@ .nav-level-1 display: flex > li - > a, span + > a, > span @include meta display: block padding: $spacing-1 $spacing-2 diff --git a/assets/sass/_theme/hugo-osuny.sass b/assets/sass/_theme/hugo-osuny.sass index aaeab07820e035608b91228a527223bcad6c9a30..b2956dd57043f41c5b23592089a26ab786aa0a2f 100644 --- a/assets/sass/_theme/hugo-osuny.sass +++ b/assets/sass/_theme/hugo-osuny.sass @@ -56,6 +56,7 @@ @import blocks/pages @import blocks/persons @import blocks/posts +@import blocks/projects @import blocks/programs @import blocks/sitemap @import blocks/sound @@ -75,6 +76,7 @@ @import sections/papers @import sections/persons @import sections/posts +@import sections/projects @import sections/programs @import sections/publications @import sections/researchers diff --git a/assets/sass/_theme/sections/diplomas.sass b/assets/sass/_theme/sections/diplomas.sass index 2d923093baa3afa6fa6028f4cc3d1d58f756b1c4..6e7e4c7175b89b4eea7eb8499c82a8d835c3dbd6 100644 --- a/assets/sass/_theme/sections/diplomas.sass +++ b/assets/sass/_theme/sections/diplomas.sass @@ -118,8 +118,6 @@ ul.diplomas display: flex flex-wrap: wrap .dropdown-share - --btn-background: #{$hero-background-color} - --btn-hover-background: #{$color-background} button @extend .button @include button-icon(social-inline) diff --git a/assets/sass/_theme/sections/posts.sass b/assets/sass/_theme/sections/posts.sass index 6fb689aa5447238b9bc37e90969a5a2ef4aecaa7..5c319a79ad3653fca4f326a81ee818a298629a33 100644 --- a/assets/sass/_theme/sections/posts.sass +++ b/assets/sass/_theme/sections/posts.sass @@ -4,19 +4,6 @@ color: $post-time-color display: inline-block vertical-align: middle - .post-categories - @include meta - margin-top: $spacing-2 - margin-bottom: $spacing-2 - position: relative - display: flex - flex-wrap: wrap - gap: 0 $spacing-2 - z-index: 2 - a - @include link(var(--color-accent)) - li - margin: 0 .post-author @include meta color: var(--color-text-alt) @@ -91,57 +78,8 @@ .post-sidebar @include sidebar -.post-categories - @include list-reset - margin: 0 - li - display: inline-block - vertical-align: middle - margin-left: $spacing-1 - &:last-child - &::after - content: none - .post-infos - margin-bottom: 0 - @include meta - @include list-reset - font-size: $table-body-size - @include media-breakpoint-up(desktop) - font-size: $table-body-size-desktop - > li - @include meta - display: flex - gap: $spacing-3 - justify-content: space-between - padding-top: $spacing-2 - padding-bottom: $spacing-2 - border-color: var(--color-border) - &:not(:first-child) - align-items: center - border-top: 1px solid var(--color-border) - > span - @include meta - color: var(--color-text-alt) - padding-left: 0 - white-space: nowrap - vertical-align: top - > ul - text-align: right - flex: 1 - &.social-share - align-items: center - a - @include link(var(--color-accent)) - text-align: right - .share - display: block - li - display: inline-block - a - color: inherit - li:last-child - margin-right: -$spacing-2 + @include section__page-infos .related margin-top: $spacing-3 diff --git a/assets/sass/_theme/sections/programs.sass b/assets/sass/_theme/sections/programs.sass index 015b2557837a6e6d540fb7d438447d9320e182f7..d2895899dece67290a8aa77ae3c05244e2754557 100644 --- a/assets/sass/_theme/sections/programs.sass +++ b/assets/sass/_theme/sections/programs.sass @@ -21,14 +21,14 @@ ol.programs justify-content: end .container position: relative + &:not(.full-width) .document-content .lead font-family: $lead-font-family + font-size: var(--lead-size) font-weight: $lead-weight - line-height: $lead-line-height - @include media-breakpoint-up(desktop) - font-size: $lead-size-desktop + line-height: var(--lead-line-height) ol.programs margin-bottom: $spacing-5 @@ -36,9 +36,10 @@ ol.programs line-height: 1 .document-content - @include media-breakpoint-up(desktop) + .program-summary + margin-bottom: $spacing-5 .lead - padding-bottom: $spacing-4 + margin-bottom: $spacing-3 .content padding-bottom: $spacing-4 section:not(.block) > * + * @@ -69,6 +70,8 @@ ol.programs margin-top: $spacing-5 @include media-breakpoint-up(desktop) .document-content + .program-summary + margin-bottom: $spacing-6 .content @include grid(12, desktop) position: relative diff --git a/assets/sass/_theme/sections/projects.sass b/assets/sass/_theme/sections/projects.sass new file mode 100644 index 0000000000000000000000000000000000000000..7f2edc7f544ef36018216e371f439f590907cb97 --- /dev/null +++ b/assets/sass/_theme/sections/projects.sass @@ -0,0 +1,39 @@ +.project + @include article(auto) + +.projects__section, +.projects_categories__term + .projects + @include grid(2, md) + +.projects__page + .hero + .content + align-items: stretch + .hero-text + display: flex + flex-direction: column + gap: $spacing-3 + @include media-breakpoint-up(sm) + .hero + .project-infos + width: columns(8) + @include media-breakpoint-up(md) + .hero + .project-infos + width: columns(6) + @include media-breakpoint-up(desktop) + .hero + .content + align-items: stretch + .hero-text + justify-content: space-between + gap: $spacing-5 + width: columns(6) + .project-infos + width: columns(4) + figure + width: columns(6) + +.project-infos + @include section__page-infos \ No newline at end of file diff --git a/assets/sass/_theme/sections/publications.sass b/assets/sass/_theme/sections/publications.sass index e98afecaa17a887786e75eaa8862cbdf2b957346..ac9f2ba021257961e81dc46f1248047b602af979 100644 --- a/assets/sass/_theme/sections/publications.sass +++ b/assets/sass/_theme/sections/publications.sass @@ -17,6 +17,9 @@ padding-bottom: $spacing-2 padding-top: $spacing-2 position: relative + @include icon-block(arrow-right, before) + position: absolute + right: 0px a text-decoration: none .publication-title @@ -24,15 +27,17 @@ @include stretched-link(after) &:hover color: var(--color-accent) - @include icon-block(arrow-right, before) - position: absolute - right: 0px .publication-meta @include small color: var(--color-text-alt) margin-top: $spacing-1 a color: var(--color-text-alt) + @include media-breakpoint-down(desktop) + .publication-meta + padding-right: $spacing-4 + &::before + bottom: 0 .publications margin-top: $spacing-5 diff --git a/assets/sass/_theme/utils/blocks.sass b/assets/sass/_theme/utils/blocks.sass new file mode 100644 index 0000000000000000000000000000000000000000..7343e4ae3510aee699d508250f1e900ebd75c694 --- /dev/null +++ b/assets/sass/_theme/utils/blocks.sass @@ -0,0 +1,43 @@ +@mixin draggable-block + overflow: hidden + .draggable-container + &:hover + cursor: grab + &.is-grabbing + cursor: grabbing + .draggable-content + margin-left: calc(var(--grid-gutter-negative) / 2) + margin-right: calc(var(--grid-gutter-negative) / 2) + > ul, + > ol + display: flex + flex-flow: row nowrap + list-style: none + padding-left: 0 + transition: margin 0.4s ease-in-out + width: 100% + .draggable-item + flex: none + scroll-snap-align: start + transition: 0.3s opacity + &.is-passed + opacity: 0.15 + pointer-events: none + .actions-arrows + display: flex + margin-left: calc(var(--grid-gutter) / 2) + > button + @include button-reset + background: none + border: none + color: $block-timeline-horizontal-color + cursor: pointer + padding: 0 + &:first-child + @include icon-block(arrow-previous, before) + margin-left: $icon-arrow-previous-margin-left + &:last-child + @include icon-block(arrow-next, before) + &:disabled + cursor: default + opacity: 0.3 \ No newline at end of file diff --git a/assets/sass/_theme/utils/shame.sass b/assets/sass/_theme/utils/shame.sass index e6c0cdb5ca93291793dceb41da16d040a3d199ad..1be170d21d897d77612726d2666090c4d977098b 100644 --- a/assets/sass/_theme/utils/shame.sass +++ b/assets/sass/_theme/utils/shame.sass @@ -17,8 +17,8 @@ .post-author p::before content: ' • ' -// TODO: transformer en class %article -@mixin article +// Utilisé pour .post, .project, .page, .person, .program, .volume +@mixin article($aspect-ratio: $article-media-aspect-ratio) position: relative display: flex flex-direction: column @@ -30,16 +30,30 @@ img display: block object-fit: cover - @if $article-media-aspect-ratio - aspect-ratio: $article-media-aspect-ratio - h2, h3, [itemprop=headline] + @if $aspect-ratio + aspect-ratio: $aspect-ratio + h2, h3, [itemprop=headline], [itemprop=name] @include h3 a - display: block @include stretched-link + display: block text-decoration: none p + time margin-top: $spacing-2 + .post-categories, .project-categories + @include list-reset + @include meta + margin-top: $spacing-2 + margin-bottom: $spacing-2 + position: relative + display: flex + flex-wrap: wrap + gap: 0 $spacing-2 + z-index: 2 + a + @include link(var(--color-accent)) + li + margin: 0 time @include meta color: var(--color-text-alt) diff --git a/assets/sass/_theme/utils/sidebar.sass b/assets/sass/_theme/utils/sidebar.sass index cfed229ed0239a5a395a6e3bf94a50a92fdcb34c..f82412c80a332579506a57dbbbb95ba1930a1ac4 100644 --- a/assets/sass/_theme/utils/sidebar.sass +++ b/assets/sass/_theme/utils/sidebar.sass @@ -39,7 +39,6 @@ html:not(.is-scrolling-down) & top: calc(var(--header-height) + #{$offset-y}) - @mixin sidebar($side: start) @include media-breakpoint-down(desktop) padding: 0 var(--grid-gutter) @@ -63,3 +62,55 @@ padding-top: $spacing-3 position: static margin-left: 0 + +// Utilisé dans .post-infos, et project-infos +@mixin section__page-infos + @include meta + @include list-reset + font-size: $table-body-size + margin-bottom: 0 + @include media-breakpoint-up(desktop) + font-size: $table-body-size-desktop + > li + @include meta + display: flex + gap: $spacing-3 + justify-content: space-between + padding-top: $spacing-2 + padding-bottom: $spacing-2 + border-color: var(--color-border) + &:not(:first-child) + align-items: center + border-top: 1px solid var(--color-border) + > span + @include meta + color: var(--color-text-alt) + padding-left: 0 + white-space: nowrap + vertical-align: top + > ul + text-align: right + flex: 1 + &.social-share + align-items: center + a + @include link(var(--color-accent)) + text-align: right + .terms + @include list-reset + margin: 0 + li + display: inline-block + vertical-align: middle + margin-left: $spacing-1 + &:last-child + &::after + content: none + .share + display: block + li + display: inline-block + a + color: inherit + li:last-child + margin-right: -$spacing-2 \ No newline at end of file diff --git a/bin/osuny.js b/bin/osuny.js index a5ef2a2811fe797792de9badabe186b9308a312a..41860abfd2bb350e3730b631362abc7985bf6b4d 100644 --- a/bin/osuny.js +++ b/bin/osuny.js @@ -20,22 +20,27 @@ console.log(` const command = process.argv[2]; -let pagefindExclude = ` - .administrators__term, - .authors__term, - .categories__taxonomy, .categories__term, - .posts_categories__taxonomy, .posts_categories__term, - .events_categories__taxonomy, .events_categories__term, - .diplomas__taxonomy, .block-diplomas, - .events__section, .block-agenda, - .organizations__section, .block-organizations, - .block-pages, - .persons__section, .block-persons, - .posts__section, .block-posts, .post-sidebar, - .block-programs, - .researchers__term, - .teachers__term - `; +let pagefindExclude = ''; +// Categories: No list of categories +pagefindExclude += '.categories__taxonomy, .categories__term, '; +pagefindExclude += '.posts_categories__taxonomy, .posts_categories__term, '; +pagefindExclude += '.events_categories__taxonomy, .events_categories__term, '; +// Diplomas: No list of diplomas or block diplomas +pagefindExclude += '.diplomas__taxonomy, .block-diplomas, '; +// Agenda events: No list of events or block events +pagefindExclude += '.events__section, .block-agenda, '; +// Organizations: No list of organizations or block organizations +pagefindExclude += '.organizations__section, .block-organizations, '; +// Pages: No block pages (there's no difference between list and page) +pagefindExclude += '.block-pages, '; +// Persons: no list or block +pagefindExclude += '.persons__section, .block-persons, '; +// No list of people's facets +pagefindExclude += '.administrators__term, .authors__term, .researchers__term, .teachers__term,'; +// Posts: no list, block posts, or post sidebar +pagefindExclude += '.posts__section, .block-posts, .post-sidebar, '; +// Programs: no block +pagefindExclude += '.block-programs'; function execute(string) { console.log("OSUNY runs " + string); diff --git a/config.yaml b/config.yaml index 7d4777567cf81a3fc1503503167912f89406d83e..38b0724b3c95306793197b12e432efd4ef850d36 100644 --- a/config.yaml +++ b/config.yaml @@ -3,14 +3,12 @@ params: active: false productionUrl: "" keycdn: https://osuny-1b4da.kxcdn.com - cookie_banner: - enable: false - blank: true - page: https://gdpr.eu/cookies/ plausible: false seo: title: separator: "|" + + # DESIGN SYSTEM logo: header: "/assets/images/logo.svg" footer: "/assets/images/logo.svg" @@ -37,6 +35,8 @@ params: home: toc: disabled: true + + # SECTIONS events: default_image: false date_format: ":date_long" @@ -55,12 +55,11 @@ params: default_image: false index: truncate_description: 200 # Set to 0 to disable truncate + layout: grid # grid | list papers: default_image: false sidebar: direction: start - volumes: - default_image: false persons: index: layout: grid # grid | list @@ -82,9 +81,29 @@ params: email: false telegram: false whatsapp: false + projects: + default_image: false + date_format: "2006" + index: + show_categories: true + show_description: true + show_year: false + truncate_description: 200 # Set to 0 to disable truncate + layout: list # grid | list + share_links: + facebook: true + twitter: true + linkedin: true + email: false + telegram: false + whatsapp: false programs: related_posts: quantity: 4 + volumes: + default_image: false + + # BLOCKS blocks: gallery: splide: @@ -126,6 +145,10 @@ params: mobile: 350 tablet: 400 desktop: 750 + key_figures: + mobile: 100 + tablet: 100 + desktop: 150 image: mobile: 480x850 tablet: 768x1360 @@ -262,11 +285,19 @@ params: mobile: 350 tablet: 450 desktop: 600 - publications: + projects: hero: mobile: 400 tablet: 800 desktop: 750 + hero_single: + mobile: 400 + tablet: 800 + desktop: 750 + item: + mobile: 350 + tablet: 450 + desktop: 600 programs: hero: mobile: 400 @@ -276,6 +307,11 @@ params: mobile: 351x168 tablet: 456x219 desktop: 856x410 + publications: + hero: + mobile: 400 + tablet: 800 + desktop: 750 volumes: hero: mobile: 400 diff --git a/i18n/en.yml b/i18n/en.yml index 6fd7068d1bc737b29117fa46a7e05f8ef87a8fc7..f41d16b366a421b09c009536397f8e8f725bf940 100644 --- a/i18n/en.yml +++ b/i18n/en.yml @@ -4,7 +4,9 @@ blocks: categories: title: Catégories items: - count: "{{ .Count }} articles" + count: + one: "1 article" + other: "{{ .Count }} articles" chapter: title: Chapter contact: @@ -52,6 +54,7 @@ blocks: play: Play video categories: no_post: No post in this category + no_project: No project in this category see_more: one: See the post other: See the {{ .Count }} posts @@ -128,7 +131,7 @@ commons: read: Read read_online: Read online share: Share - toc: Table of content + toc: Table of contents "yes": "Yes" units: GB: GB @@ -141,12 +144,6 @@ commons: bytes: bytes extensions: PDF: Adobe Portable Document Format -cookie_banner: - accept: Accept - more: Read more - refuse: Refuse - text: This site uses cookies to improve the browsing experience and provide additional functionality. - title: Cookie banner diplomas: type: Type de diplôme events: @@ -226,7 +223,7 @@ posts: next: Next article next_aria: Next article “{{ .Title }}†previous: Previous article - previous_aria: revious article “{{ .Title }}†+ previous_aria: Previous article “{{ .Title }}†reading_time: Reading time see_all: See all posts see_all_in_program: See all program's news @@ -234,6 +231,24 @@ posts: share: Please, share share_aria: Share on “{{ .Title }}†- extern link title: News +projects: + author: Author + category: + one: Category + other: Categories + informations: Informations + next: Next project + next_aria: Next project “{{ .Title }}†+ previous: Previous project + previous_aria: Previous project “{{ .Title }}†+ reading_time: Reading time + see_all: See all posts + see_all_in_program: See all program's projects + see_all_in_category: See all projects in “{{ .Title }}†+ share: Please, share + share_aria: Share on “{{ .Title }}†- extern link + title: Projects + year: Year programs: accessibility: Accessibility administrative_information: Administrative information diff --git a/i18n/fr.yml b/i18n/fr.yml index 4b47c0b3a37658a4c8d50b18586a632b26360f62..086bae77aa0f0e8353c210a5209bc27a80887f84 100644 --- a/i18n/fr.yml +++ b/i18n/fr.yml @@ -54,6 +54,7 @@ blocks: play: Lancer la vidéo categories: no_post: Aucun article dans cette catégorie + no_project: Aucun projet dans cette catégorie see_more: one: Voir l'article other: Voir les {{ .Count }} articles @@ -143,12 +144,6 @@ commons: bytes: octets extentions: PDF: Adobe Portable Document Format -cookie_banner: - accept: Accepter - more: En savoir plus - refuse: Refuser - text: Ce site utilise des cookies pour améliorer l’expérience de navigation et fournir des fonctionnalités supplémentaires. - title: Bandeau cookie diplomas: type: Type de diplôme events: @@ -237,6 +232,24 @@ posts: share: Partager sur share_aria: Partager sur “{{ .Title }}†- lien externe title: Actualités +projects: + author: Auteur·rice + category: + one: Catégorie + other: Catégories + informations: Informations + next: Projet suivant + next_aria: Projet suivant “{{ .Title }}†+ previous: Projet précédent + previous_aria: Projet précédent “{{ .Title }}†+ reading_time: Temps de lecture + see_all: Voir toutes les projets + see_all_in_program: Voir toutes les projets de la formation + see_all_in_category: Voir toutes les projets “{{ .Title }}†+ share: Partager sur + share_aria: Partager sur “{{ .Title }}†- lien externe + title: Projets + year: Année programs: accessibility: Accessibilité administrative_information: Informations administratives @@ -249,6 +262,10 @@ programs: prerequisites: Prérequis presentation: En bref pricing: Tarifs + pricing_initial: Coûts de la formation initiale + pricing_continuing: Coûts de la formation continue + pricing_apprenticeship: Coûts de l'apprentissage + website: Visiter le site web registration: Modalités et délais d’accès roles: Organisation teachers: Enseignants·es diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index be5a617e335b9542e19d090ef1a58d4e4dee369c..2c3c7c85349a60d1da23c04d28a1c390dd0ab8e1 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -27,7 +27,6 @@ {{- partial "hooks/before-main-end" . -}} </main> {{- partial "footer/footer.html" . -}} - {{- partial "footer/cookie-banner.html" . -}} {{- partial "footer/plausible.html" . -}} {{- partial "footer/js.html" . -}} {{- partial "footer/script.html" . -}} diff --git a/layouts/events/single.html b/layouts/events/single.html index f1c4debe5ba46368453b5b81f8d8c7e0c242af38..ce11f636202c46779b48340edc07546781baa3e5 100644 --- a/layouts/events/single.html +++ b/layouts/events/single.html @@ -4,8 +4,7 @@ <div class="document-content" itemscope itemtype="https://schema.org/Event"> <meta itemprop="name" content="{{ partial "PrepareHTML" .Title }}"> <meta itemprop="url" content="{{ .Permalink }}"> - {{ with .Params.summary }}<meta itemprop="abstract" content="{{ . | safeHTML }}">{{ end }} - {{ with .Summary }}<meta itemprop="description" content="{{ . | safeHTML }}">{{ end }} + {{ with .Params.summary }}<meta itemprop="description" content="{{ . | safeHTML }}">{{ end }} {{ partial "events/sidebar.html" . }} diff --git a/layouts/partials/blocks/templates/gallery/carousel.html b/layouts/partials/blocks/templates/gallery/carousel.html index b1b5a396b11049866370b520d64b9a00ce9061f5..0c472729dce6f6e60cab08147a476887d3266fba 100644 --- a/layouts/partials/blocks/templates/gallery/carousel.html +++ b/layouts/partials/blocks/templates/gallery/carousel.html @@ -4,7 +4,7 @@ {{ end }} {{- if $is_carousel }} -<div class="splide" role="group" data-splide="{{ site.Params.blocks.gallery.splide | encoding.Jsonify }}"> +<div class="splide" data-splide="{{ site.Params.blocks.gallery.splide | encoding.Jsonify }}"> <div class="splide__track"> <div class="splide__list"> {{ end -}} @@ -14,21 +14,25 @@ {{- $image := partial "GetMedia" .file -}} {{- if $image -}} <figure {{ if $is_carousel }} class="splide__slide"{{ end }}> + {{ partial "commons/image.html" + (dict + "image" .id + "alt" .alt + "sizes" site.Params.image_sizes.blocks.gallery.carousel + )}} {{ if not site.Params.image_sizes.design_system.lightbox.disabled }} + {{ $lightbox_text := false }} + {{ if and .text .credit }} + {{ $lightbox_text = delimit (slice .text .credit) " / " }} + {{ else }} + {{ $lightbox_text = or .text .credit }} + {{ end }} <a class="glightbox" role="button" - data-glightbox="type: image;{{ if .credit }}description: {{ partial "PrepareHTML" .credit }}{{ end }}" + data-glightbox="type: image;{{ with $lightbox_text }}description: {{ partial "PrepareHTML" . }}{{ end }}" href="{{ partial "GetLightboxUrl" (dict "id" .id) }}" title="{{- i18n "commons.lightbox.link.title" -}}" aria-label="{{- i18n "commons.lightbox.link.title" -}}"> - {{ end }} - {{ partial "commons/image.html" - (dict - "image" .id - "alt" .alt - "sizes" site.Params.image_sizes.blocks.gallery.carousel - )}} - {{ if not site.Params.image_sizes.design_system.lightbox.disabled }} </a> {{ end }} {{ if or .text .credit }} diff --git a/layouts/partials/blocks/templates/gallery/grid.html b/layouts/partials/blocks/templates/gallery/grid.html index dd9b600333b267c5d91c6516bfe1f359b9aa1c27..dc777bd3d947eeaa34ccdce1c58bca0fbe77e800 100644 --- a/layouts/partials/blocks/templates/gallery/grid.html +++ b/layouts/partials/blocks/templates/gallery/grid.html @@ -4,12 +4,18 @@ {{- $has_text = true -}} {{ end -}} {{ end -}} -<div class="gallery{{- if $has_text }} gallery--with-text {{ end -}}" role="group"> +<div class="gallery{{- if $has_text }} gallery--with-text {{ end -}}"> {{ range .images }} {{ if .id }} {{- $image := partial "GetMedia" .id -}} {{- if $image -}} <figure> + {{ partial "commons/image.html" + (dict + "image" .file + "alt" .alt + "sizes" site.Params.image_sizes.blocks.gallery.grid + )}} {{ if not site.Params.image_sizes.design_system.lightbox.disabled }} {{ $lightbox_text := false }} {{ if and .text .credit }} @@ -23,14 +29,6 @@ href="{{ partial "GetLightboxUrl" (dict "id" .id) }}" title="{{- i18n "commons.lightbox.link.title" -}}" aria-label="{{- i18n "commons.lightbox.link.title" -}}"> - {{ end }} - {{ partial "commons/image.html" - (dict - "image" .file - "alt" .alt - "sizes" site.Params.image_sizes.blocks.gallery.grid - )}} - {{ if not site.Params.image_sizes.design_system.lightbox.disabled }} </a> {{ end }} {{ with .text }} diff --git a/layouts/partials/blocks/templates/key_figures.html b/layouts/partials/blocks/templates/key_figures.html index 2451c75b2cc4a6077d1f24b728eed6baa95957d9..33470c53bff1bb36e6cd64f1a2d0543851f75fb6 100644 --- a/layouts/partials/blocks/templates/key_figures.html +++ b/layouts/partials/blocks/templates/key_figures.html @@ -21,7 +21,16 @@ {{- range .figures }} <li> <dl> - <dt><strong>{{ .number }}</strong>{{ partial "PrepareHTML" .unit }}</dt> + <dt> + {{ with .image }} + {{ partial "commons/image.html" + (dict + "image" . + "sizes" site.Params.image_sizes.blocks.key_figures + )}} + {{ end }} + <strong>{{ .number }}</strong>{{ partial "PrepareHTML" .unit }} + </dt> <dd>{{ partial "PrepareHTML" .description }}</dd> </dl> </li> diff --git a/layouts/partials/blocks/templates/pages/list.html b/layouts/partials/blocks/templates/pages/list.html index 0314906c6715a009eeeb5ec398ccc1e117bec5c7..78de5201cf12bb1fd055270cbbb8cd539b678f01 100644 --- a/layouts/partials/blocks/templates/pages/list.html +++ b/layouts/partials/blocks/templates/pages/list.html @@ -7,7 +7,15 @@ )}} <ul class="list {{ if and (not $show_descriptions) (not $show_images) }} title-only {{ end }}"> {{ range .pages }} - {{ $page := site.GetPage .file }} + {{- $file := false -}} + {{/* Check if . is a map or page url, necessary when pages/list is called outside block context */}} + {{ if reflect.IsMap . }} + {{ $file = .file }} + {{ else }} + {{ $file = . }} + {{ end }} + + {{ $page := site.GetPage $file }} {{ with $page }} <li> {{ if or $show_descriptions $show_images }} diff --git a/layouts/partials/blocks/templates/posts/carousel.html b/layouts/partials/blocks/templates/posts/carousel.html new file mode 100644 index 0000000000000000000000000000000000000000..df63993734923de3d7540d0fe99b159564eb0ca0 --- /dev/null +++ b/layouts/partials/blocks/templates/posts/carousel.html @@ -0,0 +1,24 @@ +{{ $heading_level := .heading_level | default 3 }} +{{ $heading := printf "h%d" $heading_level }} + +<div class="carousel draggable-container"> + <div class="carousel-posts draggable-content"> + <ul class="posts"> + {{ range $post := .posts -}} + {{ with site.GetPage (printf "/posts/%s" $post) }} + <li class="draggable-item"> + {{ partial "posts/post.html" (dict + "post" . + "heading" $heading) }} + </li> + {{ end }} + {{ end }} + </ul> + {{ if (gt (len .posts) 0) }} + <div class="actions-arrows"> + <button class="previous" disabled title="{{ i18n "blocks.timeline.previous"}}"></button> + <button class="next" title="{{ i18n "blocks.timeline.next"}}"></button> + </div> + {{ end }} + </div> +</div> diff --git a/layouts/partials/blocks/templates/projects.html b/layouts/partials/blocks/templates/projects.html new file mode 100644 index 0000000000000000000000000000000000000000..126f09b24cd66b91c59e46592744c996b09f954e --- /dev/null +++ b/layouts/partials/blocks/templates/projects.html @@ -0,0 +1,22 @@ +{{- $block := .block -}} +{{- $block_title := .block.title -}} +{{- $block_class := partial "GetBlockClass" .block -}} +{{- $layout := "grid" -}} + +{{- with .block.data -}} + <div class="{{ $block_class }}"> + <div class="container"> + <div class="block-content"> + {{ partial "blocks/top.html" (dict + "title" $block_title + "heading_level" $block.ranks.self + ) }} + + {{- partial (printf "blocks/templates/projects/%s.html" $layout) (dict + "projects" .projects + "heading_level" $block.ranks.children + ) }} + </div> + </div> + </div> +{{- end -}} diff --git a/layouts/partials/blocks/templates/projects/grid.html b/layouts/partials/blocks/templates/projects/grid.html new file mode 100644 index 0000000000000000000000000000000000000000..23ccf769a376c88b7d98e41a92aed02d1e75887f --- /dev/null +++ b/layouts/partials/blocks/templates/projects/grid.html @@ -0,0 +1,12 @@ +{{ $heading_level := .heading_level | default 3 }} +{{ $heading := printf "h%d" $heading_level }} +<div class="grid"> + {{ range $project := .projects -}} + {{ with site.GetPage .file }} + {{ partial "projects/project.html" (dict + "project" . + "heading" $heading + ) }} + {{ end }} + {{ end }} +</div> diff --git a/layouts/partials/blocks/templates/projects/list.html b/layouts/partials/blocks/templates/projects/list.html new file mode 100644 index 0000000000000000000000000000000000000000..70667caeaa211375bdcdfc771353dbe57f2bbaf9 --- /dev/null +++ b/layouts/partials/blocks/templates/projects/list.html @@ -0,0 +1,12 @@ +{{ $heading_level := .heading_level | default 3 }} +{{ $heading := printf "h%d" $heading_level }} +<div class="list"> + {{ range $project := .projects -}} + {{ with site.GetPage .file }} + {{ partial "projects/project.html" (dict + "project" . + "heading" $heading + ) }} + {{ end }} + {{ end }} +</div> diff --git a/layouts/partials/blocks/templates/timeline/horizontal.html b/layouts/partials/blocks/templates/timeline/horizontal.html index d029f0918ec243f4c7170b778dfb1699ddee3e72..f01f6a60a07b1f03aa4858cce20e5d0dd9165299 100644 --- a/layouts/partials/blocks/templates/timeline/horizontal.html +++ b/layouts/partials/blocks/templates/timeline/horizontal.html @@ -4,13 +4,12 @@ "attributes" "class='title'" ) -}} -<div class="timeline"> +<div class="timeline draggable-container"> {{ with .block.data }} - <div class="timeline-events"> + <div class="timeline-events draggable-content"> <ol> {{ range .events }} - <li class="timeline-event"> - + <li class="timeline-event draggable-item"> {{ $heading_tag.open -}} {{ .title | safeHTML }} {{ $heading_tag.close -}} @@ -20,7 +19,7 @@ {{ end }} </ol> {{ if (gt (len .events) 0) }} - <div class="timeline-arrows"> + <div class="actions-arrows"> <button class="previous" disabled title="{{ i18n "blocks.timeline.previous"}}"></button> <button class="next" title="{{ i18n "blocks.timeline.next"}}"></button> </div> diff --git a/layouts/partials/footer/cookie-banner.html b/layouts/partials/footer/cookie-banner.html deleted file mode 100644 index 9e70b81c0464933655c3db54bd58442f45108e9e..0000000000000000000000000000000000000000 --- a/layouts/partials/footer/cookie-banner.html +++ /dev/null @@ -1,14 +0,0 @@ -{{ if site.Params.cookie_banner.enable }} - <div class="gdpr-cookie-consent js-gdpr-cookie-consent" tabindex="-1" role="dialog" aria-label="{{ i18n "cookie_banner.label" }}"> - <div> - <p> - {{ i18n "cookie_banner.text" }} - <a href="{{ site.Params.cookie_banner.page | default "https://gdpr.eu/cookies/" }}"{{ if site.Params.cookie_banner.blank }} target="_blank" ref="noopener"{{ end }}>{{ i18n "cookie_banner.more" }}</a> - </p> - </div> - <div role="group"> - <button type="button" class="js-gdpr-cookie-consent-btn-ok">{{ i18n "cookie_banner.accept" }}</button> - <button type="button" class="js-gdpr-cookie-consent-btn-ko">{{ i18n "cookie_banner.refuse" }}</button> - </div> - </div> -{{ end }} diff --git a/layouts/partials/footer/debug.html b/layouts/partials/footer/debug.html index 2dc6e28a593fba575c8c177d9601c8f4c75826ad..ed9ccda3fa809a7848866fb727fb1f5c00dcfcae 100644 --- a/layouts/partials/footer/debug.html +++ b/layouts/partials/footer/debug.html @@ -114,7 +114,6 @@ left: 0; pointer-events: none; width: 100%; - mix-blend-mode: difference; opacity: 0.5; font-family: sans-serif; font-size: 12px; @@ -131,7 +130,7 @@ } .d-spacing > div { width: 100%; - border-bottom: 1px solid white; + border-bottom: 1px solid var(--color-text);; display: block; color: white; text-indent: 5px; diff --git a/layouts/partials/header/hero.html b/layouts/partials/header/hero.html index cbd33b992555051c4119483ceb375fd5c2349b10..388a3a3df4564862b086aac7c8731c85728bf0de 100644 --- a/layouts/partials/header/hero.html +++ b/layouts/partials/header/hero.html @@ -11,6 +11,8 @@ {{ $summary := .context.Params.summary | safeHTML }} {{ $subtitle_is_summary := false }} +{{ $button := .button | default .context.Params.header_cta }} + {{ if not $subtitle }} {{ if and (eq site.Params.summary.position "hero") $summary }} {{ $subtitle = $summary }} @@ -38,39 +40,42 @@ {{ else }} <h1>{{ partial "PrepareHTML" .title }}</h1> {{ end }} - {{ with .context.Params.header_cta }} + + {{ with $button }} {{ if and .display .target .label }} <a href="{{ .target }}" class="btn">{{ .label }}</a> {{ end }} {{ end }} + + {{ if .hero_text_complement }} + {{ partial .hero_text_complement .context }} + {{ end }} </div> {{ if .image }} <figure> + {{ partial "commons/image.html" + (dict + "image" .image + "sizes" ( .sizes | default site.Params.image_sizes.design_system.hero ) + "lazy" false + ) }} {{ if not site.Params.image_sizes.design_system.lightbox.disabled }} <a class="glightbox" role="button" - data-glightbox="type: image;{{ if .image.credit }}description: {{ partial "PrepareHTML" .image.credit }}{{ end }}" + data-glightbox="type: image;{{ with .image.credit }}description: {{ partial "PrepareHTML" . }}{{ end }}" href="{{ partial "GetLightboxUrl" .image }}" - title="{{ i18n "commons.lightbox.link.title" }}" - aria-label="{{ i18n "commons.lightbox.link.title" }}"> - {{ end }} - {{ partial "commons/image.html" - (dict - "image" .image - "sizes" ( .sizes | default site.Params.image_sizes.design_system.hero ) - "lazy" false - ) }} - {{ if not site.Params.image_sizes.design_system.lightbox.disabled }} + title="{{- i18n "commons.lightbox.link.title" -}}" + aria-label="{{- i18n "commons.lightbox.link.title" -}}"> </a> {{ end }} - {{ if partial "GetTextFromHTML" .image.credit }} - <figcaption tabindex="0"> - <div class="credit-content"> - {{ partial "PrepareHTML" .image.credit }} - </div> - </figcaption> - {{ end }} + {{ with partial "GetTextFromHTML" .image.credit }} + <figcaption tabindex="0"> + <div class="credit-content"> + {{ partial "PrepareHTML" . }} + </div> + </figcaption> + {{ end }} </figure> {{ end }} </div> diff --git a/layouts/partials/pages/children.html b/layouts/partials/pages/children.html index fb6dd823c79574a7bf0327742e3b60f5d548817b..84c53adfe3a2b85add42b2b4312e7c950478443e 100644 --- a/layouts/partials/pages/children.html +++ b/layouts/partials/pages/children.html @@ -2,13 +2,14 @@ {{ if .Params.bodyclass }} {{- $page_class = printf "block-page-%s" .Params.bodyclass }} {{ end }} +{{ $show_images := eq site.Params.pages.index.layout "grid" }} -<div class="block block-pages block-pages--grid {{ $page_class }}"> +<div class="block block-pages block-pages--children block-pages--{{ site.Params.pages.index.layout }} {{ $page_class }}"> <div class="container"> <div class="block-content"> - {{- partial "blocks/templates/pages/grid.html" (dict + {{- partial (printf "blocks/templates/pages/%s.html" site.Params.pages.index.layout) (dict "pages" .Params.children - "show_images" true + "show_images" $show_images "heading_level" 2 "show_descriptions" true ) }} diff --git a/layouts/partials/posts/post-infos.html b/layouts/partials/posts/post-infos.html index 47b8b35b98b5c55acfc3ebe15977dfb9ff8b5ed6..f5eacaaf6cd03221c7ef2d34547c35a3be0e2d4f 100644 --- a/layouts/partials/posts/post-infos.html +++ b/layouts/partials/posts/post-infos.html @@ -1,6 +1,6 @@ <ul class="post-infos"> {{ if .Params.posts_categories }} - <li> + <li class="terms"> <span>{{ i18n "posts.category" ( len .Params.posts_categories ) }}</span> {{ partial "posts/categories.html" . }} </li> diff --git a/layouts/partials/programs/admission.html b/layouts/partials/programs/admission.html index 50d5ec348d9344bfbf1e2af0a6510036c62efa21..ca69bfbba868559f585c332d6ece9a47cd1e8062 100644 --- a/layouts/partials/programs/admission.html +++ b/layouts/partials/programs/admission.html @@ -18,6 +18,27 @@ </section> {{- end -}} + {{- if partial "GetTextFromHTML" .Params.pricing_initial -}} + <section id="{{ urlize (i18n "programs.pricing_initial") }}"> + <h3>{{ i18n "programs.pricing_initial" }}</h3> + {{- partial "PrepareHTML" .Params.pricing_initial -}} + </section> + {{- end -}} + + {{- if partial "GetTextFromHTML" .Params.pricing_continuing -}} + <section id="{{ urlize (i18n "programs.pricing_continuing") }}"> + <h3>{{ i18n "programs.pricing_continuing" }}</h3> + {{- partial "PrepareHTML" .Params.pricing_continuing -}} + </section> + {{- end -}} + + {{- if partial "GetTextFromHTML" .Params.pricing_apprenticeship -}} + <section id="{{ urlize (i18n "programs.pricing_apprenticeship") }}"> + <h3>{{ i18n "programs.pricing_apprenticeship" }}</h3> + {{- partial "PrepareHTML" .Params.pricing_apprenticeship -}} + </section> + {{- end -}} + {{- if partial "GetTextFromHTML" .Params.registration -}} <section id="{{ urlize (i18n "programs.registration") }}"> <h3>{{ i18n "programs.registration" }}</h3> diff --git a/layouts/partials/programs/essential.html b/layouts/partials/programs/essential.html index 9d35596d885faf6708701fbece43e4ef00f663c8..9e02eda1e47036aa0425e7b656fa043140db8bbb 100644 --- a/layouts/partials/programs/essential.html +++ b/layouts/partials/programs/essential.html @@ -1,6 +1,5 @@ <div class="essential-container" id="#{{ urlize (i18n "programs.toc.essential") }}"> <div class="container"> - {{ $parent := .Params.parent }} {{- with .Params.diplomas -}} {{- $diploma := site.GetPage (printf "/diplomas/%s" .) -}} diff --git a/layouts/partials/programs/hero-single.html b/layouts/partials/programs/hero-single.html index 96357ec373647c0e43568e650525330e607e3b04..eb7dd28515f74043a151f17f10a099eaea83707c 100644 --- a/layouts/partials/programs/hero-single.html +++ b/layouts/partials/programs/hero-single.html @@ -1,7 +1,17 @@ {{- $title := or .Params.header_text .Title -}} +{{- $button := false -}} +{{- if and (eq site.Params.summary.position "hero") .Params.website_url -}} + {{ $button = (dict + "display" true + "target" .Params.website_url + "label" (i18n "programs.website") + ) }} +{{- end -}} + {{ partial "header/hero.html" (dict "title" $title "context" . + "button" $button "hero_complement" "programs/essential.html" )}} diff --git a/layouts/partials/programs/summary.html b/layouts/partials/programs/summary.html index 85e4edf81a14c7fedc7c790f755b91710a4d9224..d5dec153c5ee5107a5d8c8bf83c9b67c80c8dea9 100644 --- a/layouts/partials/programs/summary.html +++ b/layouts/partials/programs/summary.html @@ -1 +1,11 @@ -{{- partial "commons/summary-in-content.html" . -}} +{{ $summary := .summary | default (.context.Params.summary | safeHTML) }} +{{ if and (eq site.Params.summary.position "content") $summary }} + <div class="container program-summary"> + <p class="lead" role="heading" aria-level="2"> + {{ $summary }} + </p> + {{ if .context.Params.website_url }} + <a href="{{- .context.Params.website_url -}}" target="_blank" class="btn">{{ i18n "programs.website" }}</a> + {{ end }} + </div> +{{ end }} diff --git a/layouts/partials/projects/categories.html b/layouts/partials/projects/categories.html new file mode 100644 index 0000000000000000000000000000000000000000..ffd783f24c83bdb9d034e4bdfeee49a8f297f60c --- /dev/null +++ b/layouts/partials/projects/categories.html @@ -0,0 +1,12 @@ +{{ $categories := .GetTerms "projects_categories" }} +{{- if $categories -}} +<ul class="project-categories"> + {{- range $categories -}} + <li> + <a href="{{ .Permalink }}"> + {{- safeHTML .Title -}} + </a> + </li> + {{- end }} +</ul> +{{- end -}} diff --git a/layouts/partials/projects/hero-list.html b/layouts/partials/projects/hero-list.html new file mode 100644 index 0000000000000000000000000000000000000000..84b8de2d9433fadeaf98bbe1933e228bfe7b5208 --- /dev/null +++ b/layouts/partials/projects/hero-list.html @@ -0,0 +1,8 @@ +{{- $title := or .Params.header_text .Title -}} +{{- partial "header/hero.html" + (dict + "title" $title + "image" .Params.image + "sizes" site.Params.image_sizes.sections.projects.hero + "context" . + ) -}} diff --git a/layouts/partials/projects/hero-single.html b/layouts/partials/projects/hero-single.html new file mode 100644 index 0000000000000000000000000000000000000000..e8bfe9f6240f203385fe3b598991974813037fd0 --- /dev/null +++ b/layouts/partials/projects/hero-single.html @@ -0,0 +1,9 @@ +{{- $title := or .Params.header_text .Title -}} +{{- partial "header/hero.html" + (dict + "title" $title + "image" .Params.image + "sizes" site.Params.image_sizes.sections.projects.hero_single + "hero_text_complement" "projects/project-infos.html" + "context" . + ) -}} diff --git a/layouts/partials/projects/project-infos.html b/layouts/partials/projects/project-infos.html new file mode 100644 index 0000000000000000000000000000000000000000..e33502c59b879e6ca8e207d9a43fea21e81410ed --- /dev/null +++ b/layouts/partials/projects/project-infos.html @@ -0,0 +1,18 @@ +<ul class="project-infos"> + {{ if .Params.projects_categories }} + <li class="terms"> + <span>{{ i18n "projects.category" ( len .Params.projects_categories ) }}</span> + {{ partial "projects/categories.html" . }} + </li> + {{ end }} + {{ with .Params.year }} + <li> + <span>{{ i18n "projects.year" }}</span> + <time datetime="{{ . }}">{{ . }}</time> + </li> + {{ end }} + <li class="social-share"> + <span>{{ i18n "projects.share" }}</span> + {{ partial "commons/share.html" . }} + </li> +</ul> \ No newline at end of file diff --git a/layouts/partials/projects/project.html b/layouts/partials/projects/project.html new file mode 100644 index 0000000000000000000000000000000000000000..c7ec5b2829b8440a7bacdaf57a5554e731d6bb09 --- /dev/null +++ b/layouts/partials/projects/project.html @@ -0,0 +1,50 @@ +{{ $project := .project }} +{{ $heading := .heading | default "h2" }} +{{ $heading_tag := (dict + "open" ((printf "<%s itemprop='name'>" $heading) | safeHTML) + "close" ((printf "</%s>" $heading) | safeHTML) + ) }} + +{{ with $project }} + +<article class="project" itemscope itemtype="https://schema.org/CreativeWork"> + + <div class="project-content"> + {{- $title := partial "PrepareHTML" .Title -}} + + {{ $heading_tag.open }} + <a href="{{ .Permalink }}" itemprop="url" title="{{ safeHTML (i18n "commons.more_aria" (dict "Title" $title)) }}">{{ $title }}</a> + {{ $heading_tag.close }} + + {{ if and site.Params.projects.index.show_description (partial "GetTextFromHTML" .Params.summary) }} + <p itemprop="abstract">{{ partial "GetTruncateContent" ( dict + "text" .Params.summary + "length" site.Params.projects.index.truncate_description + ) }}</p> + {{ end }} + + {{ if site.Params.projects.index.show_categories }} + {{- partial "projects/categories" . -}} + {{ end }} + + {{ if and site.Params.projects.index.show_year .Params.year }} + <div class="project-meta"> + <time itemprop="datePublished" datetime="{{ .Params.year }}">{{ .Params.year }}</time> + </div> + {{ end }} + </div> + + <div class="media"> + {{- if .Params.image -}} + {{- partial "commons/image.html" + (dict + "image" .Params.image + "sizes" site.Params.image_sizes.sections.projects.item + ) -}} + {{- else -}} + {{- partial "commons/image-default.html" "projects" -}} + {{- end -}} + </div> + +</article> +{{ end }} \ No newline at end of file diff --git a/layouts/partials/projects/projects.html b/layouts/partials/projects/projects.html new file mode 100644 index 0000000000000000000000000000000000000000..bfce05b018c0d2059cba468af1ef26bfbfa5625d --- /dev/null +++ b/layouts/partials/projects/projects.html @@ -0,0 +1,8 @@ +<div class="projects projects--{{- site.Params.projects.index.layout -}}"> + {{ if not .Pages }} + <p>{{ i18n "categories.no_project" }}</p> + {{ end }} + {{ range .Paginator.Pages }} + {{ partial "projects/project.html" (dict "project" . )}} + {{ end }} +</div> diff --git a/layouts/partials/projects/sidebar.html b/layouts/partials/projects/sidebar.html new file mode 100644 index 0000000000000000000000000000000000000000..2f27a098fd7676996c77a580f49b2e3471ace1ff --- /dev/null +++ b/layouts/partials/projects/sidebar.html @@ -0,0 +1,14 @@ +<div class="section-sidebar project-sidebar"> + <div> + <aside> + {{- partial "projects/project-infos.html" . -}} + </aside> + + {{ partial "toc/container.html" + (dict + "toc" "toc/default.html" + "context" . + ) + }} + </div> +</div> diff --git a/layouts/partials/projects/summary.html b/layouts/partials/projects/summary.html new file mode 100644 index 0000000000000000000000000000000000000000..85e4edf81a14c7fedc7c790f755b91710a4d9224 --- /dev/null +++ b/layouts/partials/projects/summary.html @@ -0,0 +1 @@ +{{- partial "commons/summary-in-content.html" . -}} diff --git a/layouts/posts/single.html b/layouts/posts/single.html index 5523950f11e3c1ff4e8a53d5aa63400e7ccabc66..d37649dfa59ca5c2ea16fd6cdcda0d4f0eaa11a0 100644 --- a/layouts/posts/single.html +++ b/layouts/posts/single.html @@ -6,7 +6,6 @@ <meta itemprop="url" content="{{ .Permalink }}"> {{ with .Date }}<meta itemprop="datePublished" content="{{ .Format "2006-01-02T15:04" }}">{{ end }} {{ with .Params.summary }}<meta itemprop="abstract" content="{{ . | safeHTML }}">{{ end }} - {{ with .Summary }}<meta itemprop="description" content="{{ . | safeHTML }}">{{ end }} {{ partial "posts/sidebar.html" . }} diff --git a/layouts/projects/list.html b/layouts/projects/list.html new file mode 100644 index 0000000000000000000000000000000000000000..ea5fdbb7608debb02ba021ca82920def0e663f65 --- /dev/null +++ b/layouts/projects/list.html @@ -0,0 +1,18 @@ +{{ define "main" }} + {{ partial "projects/hero-list.html" . }} + <div class="document-content"> + {{ partial "commons/list-content.html" . }} + + {{ partial "projects/summary.html" (dict + "with_container" true + "context" . + ) }} + + {{ partial "contents/list.html" . }} + + <div class="container"> + {{ partial "projects/projects.html" . }} + {{ partial "commons/pagination.html" . }} + </div> + </div> +{{ end }} diff --git a/layouts/projects/single.html b/layouts/projects/single.html new file mode 100644 index 0000000000000000000000000000000000000000..05484c8bc2884bbf5837c6373ecf5da2df02eecf --- /dev/null +++ b/layouts/projects/single.html @@ -0,0 +1,24 @@ +{{ define "main" }} + {{ partial "projects/hero-single.html" . }} + + <div class="document-content" itemscope itemtype="https://schema.org/CreativeWork"> + <meta itemprop="name" content="{{ partial "PrepareHTML" .Title }}"> + <meta itemprop="url" content="{{ .Permalink }}"> + {{ with .Params.summary }}<meta itemprop="description" content="{{ . | safeHTML }}">{{ end }} + + {{ partial "projects/summary.html" (dict + "context" . + "block_wrapped" true + ) }} + + {{ partial "contents/list.html" . }} + + {{ partial "commons/siblings-navigation.html" (dict + "context" . + "previous_label" (i18n "projects.previous") + "next_label" (i18n "projects.next") + ) }} + + {{ partial "hooks/before-document-content-end.html" . }} + </div> +{{ end }} diff --git a/layouts/projects_categories/list.html b/layouts/projects_categories/list.html new file mode 100644 index 0000000000000000000000000000000000000000..dc40e99731e7e266dd5cfe56cd0fd6eff130e318 --- /dev/null +++ b/layouts/projects_categories/list.html @@ -0,0 +1,10 @@ +{{ define "main" }} + {{ partial "categories/hero-list.html" . }} + + <div class="document-content"> + <div class="container"> + {{ partial "categories/categories.html" . }} + {{ partial "commons/pagination.html" . }} + </div> + </div> +{{ end }} diff --git a/layouts/projects_categories/term.html b/layouts/projects_categories/term.html new file mode 100644 index 0000000000000000000000000000000000000000..3e262d032938c69869a8891ace1f2de7428d7b90 --- /dev/null +++ b/layouts/projects_categories/term.html @@ -0,0 +1,22 @@ +{{ define "main" }} + {{ partial "categories/hero-term.html" . }} + + <div class="document-content"> + {{ partial "toc/container.html" (dict + "toc" "toc/default.html" + "context" . + ) }} + + {{ partial "categories/summary.html" (dict + "context" . + "block_wrapped" true + ) }} + + {{ partial "contents/list.html" . }} + + <div class="container"> + {{ partial "projects/projects.html" . }} + {{ partial "commons/pagination.html" . }} + </div> + </div> +{{ end }} diff --git a/static/assets/fonts/fonticons/IconFont.ttf b/static/assets/fonts/fonticons/IconFont.ttf index 650452b6b0509f1a439a8a7ec317436b0a56c8f0..9db0243c3b7db2c95cf174f6c6122aa31f156b21 100644 Binary files a/static/assets/fonts/fonticons/IconFont.ttf and b/static/assets/fonts/fonticons/IconFont.ttf differ diff --git a/static/assets/fonts/fonticons/IconFont.woff b/static/assets/fonts/fonticons/IconFont.woff index 43bf09ec3bdb53bede37a91a8b553a0682c6232d..3803db73637ce37756dc81f5b5c3bdcc5b7d4685 100644 Binary files a/static/assets/fonts/fonticons/IconFont.woff and b/static/assets/fonts/fonticons/IconFont.woff differ diff --git a/static/assets/fonts/fonticons/IconFont.woff2 b/static/assets/fonts/fonticons/IconFont.woff2 index b068507042fbf5f24819392520ca94b96453c663..95f9347c48c39145ff8c6ba9efc9e5741f41b741 100644 Binary files a/static/assets/fonts/fonticons/IconFont.woff2 and b/static/assets/fonts/fonticons/IconFont.woff2 differ diff --git a/static/osuny-theme-version b/static/osuny-theme-version index 9773998bc1b445500c00b2b39f8009a4b36d0250..4a2ecbb14995b98b5fb9fac97d6d48e192188d68 100644 --- a/static/osuny-theme-version +++ b/static/osuny-theme-version @@ -1 +1 @@ -v6.0.0 +v6.0.3 \ No newline at end of file