diff --git a/assets/js/theme/design-system/mainMenu.js b/assets/js/theme/design-system/mainMenu.js index 217a017bcbb2e1441f887a54ba3d833e23e8ee20..0dc8775e248bb349d788a171dcbf069431ce6335 100644 --- a/assets/js/theme/design-system/mainMenu.js +++ b/assets/js/theme/design-system/mainMenu.js @@ -60,6 +60,7 @@ class MainMenu { resize () { const isMobile = window.innerWidth <= breakpoints.md; document.documentElement.style.setProperty('--header-height', this.element.offsetHeight + 'px'); + document.documentElement.style.setProperty('--header-menu-max-height', (window.innerHeight - this.element.offsetHeight) + 'px'); // is state changed ? if (this.state.isMobile === isMobile) { diff --git a/assets/js/theme/design-system/modal.js b/assets/js/theme/design-system/modal.js new file mode 100644 index 0000000000000000000000000000000000000000..b20356291000fb070a6cd0245540ea3fba97f284 --- /dev/null +++ b/assets/js/theme/design-system/modal.js @@ -0,0 +1,64 @@ + +const CLASSES = { + modalOpened: 'has-modal-opened' +}; + +class Modal { + constructor(button) { + this.button = button; + this.id = this.button.getAttribute('data-open-modal'); + this.element = document.getElementById(this.id); + this.closeButtons = this.element.querySelectorAll('.close'); + + if (!this.element) { + return; + } + + this.state = { + isOpened: false + }; + + this.listen(); + } + + listen() { + this.button.addEventListener('click', () => { + this.toggle(true); + }); + + this.closeButtons.forEach(button => { + button.addEventListener('click', () => { + this.toggle(false); + }); + }); + + window.addEventListener('keydown', (event) => { + if (event.keyCode === 27 || event.key === 'Escape') { + this.toggle(false); + } + }); + + window.addEventListener('click', (event) => { + if (event.target === this.element) { + this.toggle(false); + } + }); + } + + toggle(open = !this.state.isOpened) { + this.state.isOpened = open; + const classAction = this.state.isOpened ? 'add' : 'remove'; + + this.element.setAttribute('aria-hidden', !this.state.isOpened); + document.documentElement.classList[classAction](CLASSES.modalOpened); + } + +} + +// Selectors +(function () { + const modalButtons = document.querySelectorAll("[data-open-modal]"); + modalButtons.forEach(button => { + new Modal(button); + }) +})(); diff --git a/assets/js/theme/index.js b/assets/js/theme/index.js index 62430e9c229b78713f6d5b71c9e71cff9e5e7588..3f053d2eb9b8a226fc13943ffcf3cbb6cf0d5dbc 100644 --- a/assets/js/theme/index.js +++ b/assets/js/theme/index.js @@ -1,6 +1,7 @@ import './body.js'; import './design-system/dropdowns'; import './design-system/mainMenu'; +import './design-system/modal'; import './design-system/toc'; import './blocks/keyFigures'; import './blocks/timeline'; diff --git a/assets/sass/_theme/_configuration.sass b/assets/sass/_theme/_configuration.sass index 67b219317644e13dfd45d9ee4e9e3848b865ea8a..b94b3c288593e81971eee821ca6fe63327c0e41c 100644 --- a/assets/sass/_theme/_configuration.sass +++ b/assets/sass/_theme/_configuration.sass @@ -125,7 +125,6 @@ $btn-padding-x: px2rem(20) !default $btn-padding-y: px2rem(13) !default $btn-border-radius: px2rem(4) !default - // Spacing $spacing0: px2rem(12) !default $spacing1: px2rem(24) !default @@ -135,7 +134,10 @@ $spacing4: px2rem(128) !default $spacing5: px2rem(256) !default $spacing-section-y: px2rem(36) !default -// TODO: choisir entre margin top / bottom --> https://matthewjamestaylor.com/css-margin-top-vs-bottom +// Form +$form-btn-color: $color-background !default +$form-btn-background-color: $color-accent !default +$form-input-border-radius: 4px !default // Grid $grid-gutter: px2rem(64) !default @@ -149,8 +151,9 @@ $zindex-header: 52 !default $zindex-body-overlay: 51 !default $zindex-toc: 60 !default $zindex-toc-cta: 49 !default +$zindex-modal: 72 !default $zindex-aside: 48 !default -$zindex-footer: 70 !default +$zindex-footer: 50 !default // Header $header-color: $color-text !default diff --git a/assets/sass/_theme/_utils.sass b/assets/sass/_theme/_utils.sass index e00c827b6b4c5043b8c3b4ae404432884ff5851e..35172dc770443a9c79dc953827628ec2062e45a2 100644 --- a/assets/sass/_theme/_utils.sass +++ b/assets/sass/_theme/_utils.sass @@ -368,6 +368,15 @@ @include media-breakpoint-up(desktop) &:before padding-right: 0 + @include media-breakpoint-down(desktop) + position: relative + background: $color-background + &::before + background: transparent + p + display: block + background: transparent + position: relative &:hover figcaption p diff --git a/assets/sass/_theme/blocks/key_figures.sass b/assets/sass/_theme/blocks/key_figures.sass index caaa63dc1f9abd61a4536500f8679fb7e15c2439..3a9ca43047a7b401c501073be863e39701685665 100644 --- a/assets/sass/_theme/blocks/key_figures.sass +++ b/assets/sass/_theme/blocks/key_figures.sass @@ -6,7 +6,7 @@ @include in-page-with-sidebar @include grid(2) &.even-items - @include grid(2) + @include grid(2, desktop) @include grid(4, desktop) &.odd-items @include grid(3, desktop) @@ -26,7 +26,7 @@ font-size: $block-key_figures-number-font-size font-weight: $block-key_figures-number-font-weight margin-inline-end: 0.1em - @include media-breakpoint-up(md) + @include media-breakpoint-up(desktop) font-size: $block-key_figures-font-size-desktop strong font-size: $block-key_figures-number-font-size-desktop @@ -47,4 +47,8 @@ margin-left: 0 dt + dd margin-top: $spacing0 - \ No newline at end of file + + @include media-breakpoint-down(desktop) + li + li + margin-top: $spacing1 + diff --git a/assets/sass/_theme/blocks/video.sass b/assets/sass/_theme/blocks/video.sass index 4052c1745aa36aaced47235e3fefa4cdc276b6db..79806ff4e8f783efc00c7388c77d6a5228f030d2 100644 --- a/assets/sass/_theme/blocks/video.sass +++ b/assets/sass/_theme/blocks/video.sass @@ -6,10 +6,11 @@ min-height: 400px iframe background: black - @include in-page-without-sidebar - .transcription - width: col(7) - margin-left: auto + @include media-breakpoint-up(desktop) + @include in-page-without-sidebar + .transcription + width: col(7) + margin-left: auto @include media-breakpoint-down(desktop) .video margin-left: half(-$grid-gutter-sm) diff --git a/assets/sass/_theme/design-system/button.sass b/assets/sass/_theme/design-system/button.sass new file mode 100644 index 0000000000000000000000000000000000000000..60adbd146ac638d4dc53465255c6a469611d198c --- /dev/null +++ b/assets/sass/_theme/design-system/button.sass @@ -0,0 +1,30 @@ +.squared-button + @include meta + @include button-reset + align-items: center + cursor: pointer + display: flex + padding: 0 + @include media-breakpoint-up(desktop) + width: col(2,1) + &:first-child + margin-bottom: $spacing0 + &::before + background-color: white + border: 1px solid $color-border + margin-right: $spacing0 + padding: half($spacing0) + transition: background 0.3s ease, border 0.3s ease + @include media-breakpoint-up(desktop) + margin-right: $spacing1 + &:hover + text-decoration: none + &::before + background-color: $color-text + border-color: transparent + color: $color-background + text-decoration: none +button.squared-button + @include icon-block(eye, before) +a.squared-button + @include icon-block(download, before) \ No newline at end of file diff --git a/assets/sass/_theme/design-system/form.sass b/assets/sass/_theme/design-system/form.sass new file mode 100644 index 0000000000000000000000000000000000000000..9c25792eb4bb904d834fc7bebd62f701bc9ad184 --- /dev/null +++ b/assets/sass/_theme/design-system/form.sass @@ -0,0 +1,27 @@ +form + fieldset + border: none + padding: 0 + margin-bottom: $spacing1 + label + @include meta + .control--radio + @include body-text + + label + margin-left: half($spacing0) + @include body-text + .radio + .radio + margin-left: $spacing0 + input[type="text"], input[type="search"], input[type="email"], input[type="tel"], input[type="password"] + @include body-text + border: 1px solid rgba(0, 0, 0, 0.3) + border-radius: $form-input-border-radius + padding: half($spacing0) + input[type="submit"], button + @include button-reset + @include btn + @include meta + background: $form-btn-background-color + color: $form-btn-color + label + input + margin-bottom: $spacing3 \ No newline at end of file diff --git a/assets/sass/_theme/design-system/header.sass b/assets/sass/_theme/design-system/header.sass index d13d1f23922b64c949886e84a721ee8419d251cd..44a354c2ca8c5ad60e1f309fa6068b4f0bd4a904 100644 --- a/assets/sass/_theme/design-system/header.sass +++ b/assets/sass/_theme/design-system/header.sass @@ -62,7 +62,11 @@ body z-index: $zindex-body-overlay html.has-menu-opened &, + html.has-modal-opened &, html.has-offcanvas-opened & + overflow: hidden + height: 100% + min-height: -webkit-fill-available &::after display: block opacity: 1 @@ -71,6 +75,9 @@ body &::after background-color: $toc-overlay-color z-index: $zindex-header + 1 + html.has-modal-opened & + &::after + z-index: $zindex-modal - 1 html.is-animating:not(.has-menu-opened) & &::after display: block diff --git a/assets/sass/_theme/design-system/hero.sass b/assets/sass/_theme/design-system/hero.sass index 5162b4768c1b431718d4b73091edf2c75bf17992..28833f74a895687e32394e82c660311c4b10ce8f 100644 --- a/assets/sass/_theme/design-system/hero.sass +++ b/assets/sass/_theme/design-system/hero.sass @@ -13,7 +13,6 @@ min-height: $hero-height-desktop *:focus-visible outline-color: $hero-color - .content align-items: start padding-top: $spacing3 @@ -35,7 +34,8 @@ padding-top: 0 .content + .breadcrumb-nav margin-top: $spacing3 - + &--no-margin + margin-bottom: 0 @include media-breakpoint-down(desktop) .breadcrumb-nav margin-left: half(-$grid-gutter-sm) @@ -48,9 +48,10 @@ > h1, > hgroup margin-bottom: $spacing2 &--image-landscape - figure - margin-left: half(-$grid-gutter-sm) - margin-right: half(-$grid-gutter-sm) + .content + figure + margin-left: half(-$grid-gutter-sm) + margin-right: half(-$grid-gutter-sm) &--image-portrait, &--image-square .container display: flex @@ -84,4 +85,6 @@ width: col(8) figure width: col(3) + + .breadcrumb-container + margin-top: 0 diff --git a/assets/sass/_theme/design-system/layout.sass b/assets/sass/_theme/design-system/layout.sass index e51b956ba9cdcb3d66c05af199682344a069c4b2..36bfc05f694f8a40c30986f8319dee74427c2ce0 100644 --- a/assets/sass/_theme/design-system/layout.sass +++ b/assets/sass/_theme/design-system/layout.sass @@ -13,6 +13,7 @@ --grid-gutter: #{$grid-gutter} --grid-max-width: #{$grid-max-width} --header-height: #{$header-height} + --header-menu-max-height: calc(100vh - var(--header-height) - #{$spacing4}) @include media-breakpoint-up(desktop) --header-height: #{$header-height-desktop} @@ -96,3 +97,35 @@ details &:hover summary::after transform: translateY(-5px) +.modal + align-items: center + display: flex + justify-content: center + height: 100vh + left: 0 + overflow: hidden + position: fixed + top: 0 + width: 100% + margin: 0 + z-index: $zindex-modal + &[aria-hidden="true"] + display: none + .modal-content + position: relative + background-color: $color-background-alt + padding: $spacing2 + width: auto + max-height: 100vh + overflow-y: auto + @include media-breakpoint-up(desktop) + padding: $spacing3 + width: col(8) + .modal-header + margin-bottom: $spacing0 + button + @include button-reset + @include icon-block(close, before) + position: absolute + right: 0 + top: 0 \ No newline at end of file diff --git a/assets/sass/_theme/design-system/nav.sass b/assets/sass/_theme/design-system/nav.sass index 157958a15c8b1323d8d0c43f818e55f7894272ed..0061906b6fa8c462e835450fbecf216134dfd449 100644 --- a/assets/sass/_theme/design-system/nav.sass +++ b/assets/sass/_theme/design-system/nav.sass @@ -7,12 +7,13 @@ opacity: 0 .menu + @include media-breakpoint-down(desktop) -webkit-flex-basis: 100vw display: none flex-basis: 100vw margin-top: $spacing1 - max-height: calc(100vh - var(--header-height) - #{$spacing1}) + max-height: var(--header-menu-max-height) overflow: auto a, a:focus, @@ -56,7 +57,7 @@ max-height: calc(100vh - var(--header-height)) overflow: auto a - color: $header-dropdown-color + color: $header-dropdown-color &:hover, &:focus text-decoration-color: $header-dropdown-color diff --git a/assets/sass/_theme/design-system/typography.sass b/assets/sass/_theme/design-system/typography.sass index 1235bd7fce40f4324c88383b503322ec6def8bd8..79811255ebba6849b073074a05eee19544a8cf83 100644 --- a/assets/sass/_theme/design-system/typography.sass +++ b/assets/sass/_theme/design-system/typography.sass @@ -118,12 +118,16 @@ h2, .h2 .lead @include lead -.p, -.li +@mixin body-text + font-family: $body-font-family font-size: $body-size @include media-breakpoint-up(desktop) font-size: $body-size-desktop +.p, +.li + @include body-text + @mixin meta font-family: $meta-font-family font-size: $meta-size @@ -220,6 +224,7 @@ a, overflow-wrap: break-word &[target="_blank"]:not(.icon) @include icon(link-blank, after, true) + vertical-align: baseline &[href^="mailto"] &::after content: none diff --git a/assets/sass/_theme/hugo-osuny.sass b/assets/sass/_theme/hugo-osuny.sass index aa3da63802a896f8155ff7b1330a348b25778fdd..6d508a41e030b7eed0932e7f8fc628dc3cca5a42 100644 --- a/assets/sass/_theme/hugo-osuny.sass +++ b/assets/sass/_theme/hugo-osuny.sass @@ -18,8 +18,10 @@ @import "design-system/layout" @import "design-system/a11y" @import "design-system/breadcrumb" +@import "design-system/button" @import "design-system/contacts" @import "design-system/footer" +@import "design-system/form" @import "design-system/header" @import "design-system/hero" @import "design-system/image" @@ -63,6 +65,7 @@ @import "sections/persons" @import "sections/posts" @import "sections/programs" +@import "sections/publications" @import "sections/researchers" @import "sections/sitemap" @import "sections/teachers" diff --git a/assets/sass/_theme/sections/diplomas.sass b/assets/sass/_theme/sections/diplomas.sass index a25876df4f58723a7147f7437861a744fd47cb0a..45cddaa3979ee283544df60b9184f0d9db053eed 100644 --- a/assets/sass/_theme/sections/diplomas.sass +++ b/assets/sass/_theme/sections/diplomas.sass @@ -166,14 +166,16 @@ ul.diplomas li @include grid(2, desktop) align-items: start + position: relative a - @include media-breakpoint-between(sm, desktop) - display: flex + @include stretched-link(before) + position: initial + @include media-breakpoint-down(desktop) margin-right: $spacing0 &::after + align-self: center bottom: unset - + p - margin-top: $spacing0 - @include media-breakpoint-down(sm) - &::after - transform: translateY(50%) \ No newline at end of file + position: relative + margin-left: half($spacing0) + + p + margin-top: $spacing0 \ No newline at end of file diff --git a/assets/sass/_theme/sections/papers.sass b/assets/sass/_theme/sections/papers.sass index a9437b6fb2ebdcaa9fb9d36ff1791560d1a59562..63356e582943740e738bf17455932a0b29497517 100644 --- a/assets/sass/_theme/sections/papers.sass +++ b/assets/sass/_theme/sections/papers.sass @@ -1,6 +1,92 @@ .paper - @include article + a + text-decoration-color: transparent + transition: color 0.3s ease + > div + &:first-of-type + grid-column: 1 / 7 + &.paper-actions + grid-column: 8 / 12 + align-items: start + display: flex + @include media-breakpoint-down(desktop) + flex-wrap: wrap + justify-content: space-between + margin-top: $spacing1 + h3 + a:hover + color: $color-accent + .paper-volume + @include meta + text-transform: lowercase + a + @include link($color-text) + text-transform: none + span + text-transform: uppercase .papers - @include grid(2, md) - @include grid(3, lg) + @include list-reset + margin-block-start: half($spacing3) + li + + li + margin-top: $spacing2 + @include media-breakpoint-up(desktop) + margin-top: $spacing3 + article + @include media-breakpoint-up(desktop) + @include grid + + article + margin-top: $spacing2 + @include media-breakpoint-up(desktop) + margin-top: $spacing3 + + +.papers__page + .document-content + .container + @include media-breakpoint-up(desktop) + @include grid + .content + @include media-breakpoint-up(desktop) + grid-column: 1 / 9 + section + section + margin-top: $spacing2 + @include media-breakpoint-up(desktop) + margin-top: $spacing4 + .squared-button + margin-bottom: 0 + margin-top: $spacing2 + width: auto + .paper-body + h2 + margin-bottom: $spacing2 + .paper-authors + h2 + @include h3 + .authors + @include grid(2, desktop) + article + margin-top: $spacing2 + .name + a + @include h4 + @include stretched-link(before) + text-decoration: none + .document-nav + @include media-breakpoint-up(desktop) + grid-column: 9 / 12 + order: 2 + dl + margin: 0 + dt + @include meta + margin-bottom: $spacing0 + &:not(:first-of-type) + margin-top: $spacing2 + dd:first-of-type + a + display: flex + flex-direction: column + span + order: 3 diff --git a/assets/sass/_theme/sections/persons.sass b/assets/sass/_theme/sections/persons.sass index 5dd3d523f64d62a0f117a05e6134994439bc250f..2553546c8aa292139787f4369abff2446df8da02 100644 --- a/assets/sass/_theme/sections/persons.sass +++ b/assets/sass/_theme/sections/persons.sass @@ -1,4 +1,16 @@ .persons__page + h2 + @include h5 + a + @include icon(arrow-right, after, true) + display: inline-flex + margin-left: half($spacing0) + transition: transform .3s ease + &:hover::after + transform: translateX($spacing0) + // TODO : voir comment gérer les marges comme pour les blocs (pb footer) + section + padding-bottom: $grid-gutter ol.programs li justify-content: flex-start diff --git a/assets/sass/_theme/sections/publications.sass b/assets/sass/_theme/sections/publications.sass new file mode 100644 index 0000000000000000000000000000000000000000..261a15e88a290add33fe64e10dc674699b992c62 --- /dev/null +++ b/assets/sass/_theme/sections/publications.sass @@ -0,0 +1,46 @@ + +// STYLE PUBLICATIONS + +// .persons__page, +// .researchers__term +// .paper +// border-bottom: 1px solid $color-border +// padding: $spacing0 0 +// h2 +// a +// @include stretched-link(before) +// &:hover +// h2 a, +// &::after +// color: $color-accent + +// .persons__page +// .papers +// h2 +// @include inherit-text +// a +// @include stretched-link(before) +// display: flex +// @include media-breakpoint-up(desktop) +// @include icon(arrow-right, after) +// transition: color 0.3s ease +// &::after +// margin-left: auto +// p +// @include small + +// .researchers__term +// .papers +// @include grid(2, desktop) +// @include media-breakpoint-up(desktop) +// grid-row-gap: 0 +// .paper +// @include media-breakpoint-up(desktop) +// @include icon(arrow-right, after) +// bottom: 0 +// position: absolute +// right: 0 +// transition: color 0.3s ease +// p +// @include meta + \ No newline at end of file diff --git a/assets/sass/_theme/sections/volumes.sass b/assets/sass/_theme/sections/volumes.sass index 5e04f349ff1e9f9e18cebab313cc916e4c1adc2f..51681cc556447ece6149b80f56b0dca6b0da2e4b 100644 --- a/assets/sass/_theme/sections/volumes.sass +++ b/assets/sass/_theme/sections/volumes.sass @@ -1,6 +1,60 @@ .volume @include article + .suptitle + @include meta .volumes @include grid(2, md) @include grid(3, lg) + +.volumes__taxonomy + .volume + .media + img + aspect-ratio: 1 / 1.2 +.volumes__term + .document-content + .container + @include media-breakpoint-up(desktop) + @include grid + .content + @include media-breakpoint-up(desktop) + grid-column: 1 / 8 + > div + margin-bottom: $spacing1 + @include media-breakpoint-up(desktop) + margin-bottom: $spacing4 + .document-aside + @include media-breakpoint-up(desktop) + grid-column: 9 / 12 + order: 2 + dl + margin: 0 + dt + @include meta + &:not(:first-of-type) + margin-top: $spacing2 + .paper + display: block + @include media-breakpoint-down(desktop) + > div:first-of-type + .paper-volume + display: inline-flex + margin-left: $spacing0 + @include media-breakpoint-up(desktop) + > div:first-of-type + display: flex + flex-wrap: wrap + justify-content: space-between + h3 + flex: 1 + > span + order: 3 + width: 100% + .paper-volume + padding-left: $spacing1 + .paper-actions + gap: $grid-gutter + margin-top: $spacing1 + a, button + width: unset \ No newline at end of file diff --git a/i18n/en.yml b/i18n/en.yml index c77712b5272cfe16c5d3921bd026ea169a2b017b..2d551ef0b69481296a36dcb9baf87f562860e135 100644 --- a/i18n/en.yml +++ b/i18n/en.yml @@ -64,7 +64,8 @@ commons: contact: address: Address email: Email - phone: Téléphone + phone: Phone + phone_professional: Professional phone website: Site web credit: A low impact website crafted with <a href="https://www.osuny.org/" title="Osuny - extern link" target="_blank" rel="noreferrer">Osuny</a> date: Date diff --git a/i18n/fr.yml b/i18n/fr.yml index 4be8ecee642e58b9dc7156183c24aa3e385dc462..ca74ee8fe00af243aa62a758c46b8452dd825d45 100644 --- a/i18n/fr.yml +++ b/i18n/fr.yml @@ -65,6 +65,7 @@ commons: address: Adresse email: Email phone: Téléphone + phone_professional: Téléphone professionnel website: Site web credit: Un site éco-conçu produit avec <a href="https://www.osuny.org/" title="Osuny - lien externe" target="_blank" rel="noreferrer">Osuny</a> date: Date @@ -148,10 +149,11 @@ pages: informations: Informations posts: Actualités persons: - posts: Actualités publiées + posts: Actualités publiées récemment programs: Enseignements papers: Papiers publications: Publications + papers: Papiers publiés récemment posts: author: Auteur·rice categories: Catégories @@ -211,7 +213,7 @@ volumes: plural_name: Papiers singular_name: Papier authors: Auteurs - full_text: Texte intégrale + full_text: Texte intégral issn: ISSN keywords: Mots-clés nature: Nature diff --git a/layouts/papers/list.html b/layouts/papers/list.html index b1e67d0cf9fe8b39f0421f6cf1cb170ebfcb7bdd..7337cbee8f8a6cb43a5260a514ff1ab84c22c02b 100644 --- a/layouts/papers/list.html +++ b/layouts/papers/list.html @@ -8,7 +8,13 @@ ) -}} <div class="document-content"> <div class="container"> - {{ partial "papers/papers.html" . }} + <ul class="papers"> + {{ range .Paginator.Pages }} + <li> + {{ partial "papers/paper.html" (dict "paper" . ) }} + </li> + {{ end }} + </ul> {{ partial "commons/pagination.html" . }} </div> diff --git a/layouts/papers/single.html b/layouts/papers/single.html index 5654229356e61356a1a8e9873ef572828ef2f2ab..0157d4c05e7e332532479a3d3ad8979137367f75 100644 --- a/layouts/papers/single.html +++ b/layouts/papers/single.html @@ -10,14 +10,16 @@ <meta itemprop="name" content="{{ partial "PrepareHTML" .Title }}"> <div class="container"> + + {{ partial "papers/document-nav.html" . }} + <div class="content"> - <div> - {{ partial "papers/abstract.html" . }} - {{ partial "papers/authors.html" . }} - {{ partial "papers/body.html" . }} - {{ partial "papers/references.html" . }} - </div> + {{ partial "papers/abstract.html" . }} + {{ partial "papers/authors.html" . }} + {{ partial "papers/body.html" . }} + {{ partial "papers/references.html" . }} </div> + </div> </div> diff --git a/layouts/partials/blocks/templates/key_figures.html b/layouts/partials/blocks/templates/key_figures.html index af8f12e60351c8ef9daccb6ac9a4accc5f12b17f..c4efe36b91f1fd2973cd9733b3682ddc8f6b5e2f 100644 --- a/layouts/partials/blocks/templates/key_figures.html +++ b/layouts/partials/blocks/templates/key_figures.html @@ -1,8 +1,8 @@ {{- $template := .block.template -}} {{- $position := .block.position -}} {{- $title := .block.title -}} -{{- $figures := .figures}} {{- with .block.data -}} + {{- $figures := .figures }} <section class="block block-key_figures{{ if $title }} block-with-title{{ end }}" id="block-{{ $position }}"> <div class="container"> <div class="block-content"> @@ -22,7 +22,7 @@ {{ end -}} {{ $list_class := "odd-items" }} - {{ if (modBool $figures 2) }} + {{ if (modBool (len $figures) 2) }} {{ $list_class = "even-items" }} {{ end }} <ul class="{{ $list_class }}"> diff --git a/layouts/partials/diplomas/diplomas.html b/layouts/partials/diplomas/diplomas.html index 1f9b63028b93200a6ba5890877114b4dbb5d71a9..aed223f94b3b370eb0c20090d28b0cf16419c2fe 100644 --- a/layouts/partials/diplomas/diplomas.html +++ b/layouts/partials/diplomas/diplomas.html @@ -26,7 +26,7 @@ {{- define "programsList" -}} <li> - <a href="{{ .Permalink }}" title="{{ safeHTML (i18n "commons.more_aria" (dict "Title" .label)) }}"> + <a href="{{ .path }}" title="{{ safeHTML (i18n "commons.more_aria" (dict "Title" .label)) }}"> {{- partial "PrepareHTML" .label -}} </a> <ol> diff --git a/layouts/partials/header/hero.html b/layouts/partials/header/hero.html index 45be3537a1e573cdda176e5593423074eb0519b7..cb14b4bce0bb5c8b80ab2d2a34cc33cf94f0ab3d 100644 --- a/layouts/partials/header/hero.html +++ b/layouts/partials/header/hero.html @@ -1,9 +1,10 @@ {{- $direction := "" -}} +{{- $breadcrumb_is_after_hero := eq site.Params.breadcrumb.position "after-hero" -}} {{ if .image }} {{- $direction = partial "GetImageDirection" .image -}} {{ end }} -<header class="hero {{ if .image -}}hero--with-image hero--image-{{- $direction -}}{{- end -}}"> +<header class="hero {{ if .image -}}hero--with-image hero--image-{{- $direction -}}{{- end }} {{ if $breadcrumb_is_after_hero -}} hero--no-margin {{- end }}"> <div class="container"> {{- if eq site.Params.breadcrumb.position "hero-start" -}} {{- if .breadcrumb | default true -}} @@ -32,7 +33,7 @@ "sizes" ( .sizes | default site.Params.image_sizes.design_system.hero ) "lazy" false ) }} - {{ if .image.credit }} + {{ if partial "GetTextFromHTML" .image.credit }} <figcaption tabindex="0"> <p> {{- partial "GetTextFromHTML" .image.credit -}} @@ -51,9 +52,9 @@ </div> </header> -{{- if eq site.Params.breadcrumb.position "after-hero" -}} +{{- if $breadcrumb_is_after_hero -}} {{- if .breadcrumb | default true -}} - <div class="container"> + <div class="container breadcrumb-container"> {{ partial "header/breadcrumbs.html" .context }} </div> {{- end -}} diff --git a/layouts/partials/papers/abstract.html b/layouts/partials/papers/abstract.html index 2a7bfced0e92f0666f2a0f846ae03cb43854b852..324242e7f087ca41559b33c77153e51aaa43d345 100644 --- a/layouts/partials/papers/abstract.html +++ b/layouts/partials/papers/abstract.html @@ -1,3 +1,9 @@ <section> <p itemprop="abstract">{{ partial "PrepareHTML" .Params.Abstract }}</p> + <div role="group"> + {{ partial "papers/actions.html" (dict + "paper" . + "only_file" true + ) }} + </div> </section> diff --git a/layouts/partials/papers/actions.html b/layouts/partials/papers/actions.html new file mode 100644 index 0000000000000000000000000000000000000000..2a2f7ed9e72583e0cc069a478a9c8cce8f63761d --- /dev/null +++ b/layouts/partials/papers/actions.html @@ -0,0 +1,38 @@ +{{ $only_file := .only_file | default false }} +{{ with .paper }} + {{ $modalId := printf "modal-%s" .Slug }} + <div class="paper-actions" role="group"> + {{ if not $only_file }} + {{- if .Params.abstract -}} + <button class="squared-button" type="button" data-open-modal="{{ $modalId }}">{{ i18n "volumes.abstract" }}</button> + {{ partial "papers/modal.html" + (dict + "modalId" $modalId + "title" .Title + "abstract" .Params.abstract + ) }} + {{- end -}} + {{- end -}} + {{- if .Params.pdf -}} + {{- $file := partial "GetMedia" .Params.pdf -}} + {{- $size := partial "GetHumanSize" $file.size -}} + {{- $extension := partial "GetExtensionFile" $file.name -}} + {{- $extension_with_size := (printf "%.2f %s - %s" $size.weight $size.unit $extension) -}} + {{- $title_with_size := printf "%s (%s)" $file.name $extension_with_size -}} + {{- $url := $file.url -}} + {{- if site.Params.keycdn -}} + {{- $url = $file.direct_url -}} + {{- end -}} + {{ if $file }} + <figure> + <a href="{{ $url }}" download="{{ partial "PrepareHTML" $file.name }}" target="_blank" title="{{ i18n "commons.link.blank_aria" (dict "Title" $title_with_size) }}" class="squared-button"> + <figcaption> + <abbr title="{{ i18n (printf "commons.extensions.%s" $extension) }}">{{ $extension }}</abbr> + - {{ $size.weight }} <abbr title="{{ $size.full_unit }}">{{ $size.unit }}</abbr> + </figcaption> + </a> + </figure> + {{ end }} + {{- end -}} + </div> +{{ end }} \ No newline at end of file diff --git a/layouts/partials/papers/authors.html b/layouts/partials/papers/authors.html index 24ec0266a1a0d1da11a624adad740d539c05e669..95763e57e20f3ccd5159d67f914d3012661dc0b6 100644 --- a/layouts/partials/papers/authors.html +++ b/layouts/partials/papers/authors.html @@ -1,5 +1,5 @@ {{ if .Params.Researchers }} - <section> + <section class="paper-authors"> <h2>{{ i18n "volumes.authors" }}</h2> <div class="authors"> {{ range .Params.Researchers }} diff --git a/layouts/partials/papers/body.html b/layouts/partials/papers/body.html index 1663424b298643f879c84b32f954fb9d370ae2b9..b1147c6d7dcb70ffef098e60647af97e14c5e16b 100644 --- a/layouts/partials/papers/body.html +++ b/layouts/partials/papers/body.html @@ -1,5 +1,5 @@ {{ if (partial "GetTextFromHTML" .Content) }} - <section id="full-text"> + <section id="full-text" class="paper-body"> <h2>{{ i18n "volumes.full_text" }}</h2> <div class="articleBody"> {{ partial "PrepareHTML" .Content }} diff --git a/layouts/partials/papers/document-nav.html b/layouts/partials/papers/document-nav.html index e4339574a00e0b907bce82f950f2182cd7e2028a..22055dc8d2aa295ec7adc9e1d6e4100ce09c1c1f 100644 --- a/layouts/partials/papers/document-nav.html +++ b/layouts/partials/papers/document-nav.html @@ -1,14 +1,28 @@ <aside class="document-nav"> - <div role="group"> - {{ if isset .Params "pdf" }} - {{- $pdf := partial "GetMedia" .Params.pdf -}} - <a href="{{ $pdf.url }}" download>{{ i18n "commons.download.pdf" }}</a><br> - {{ end }} - {{ if .Content }} - <a href="#full-text" class="btn-eye">{{ i18n "commons.read_online" }}</a> - {{ end }} - </div> <dl> + {{ range .GetTerms "volumes" }} + <dt>{{ i18n "volumes.singular_name" }}</dt> + <dd itemprop="isPartOf" itemscope itemtype="https://schema.org/PublicationVolume"> + <a href="{{ .Permalink }}" itemprop="url"> + <span itemprop="name">{{ .Title }}</span> + <div class="media"> + {{- if .Params.image -}} + {{- partial "commons/image.html" + (dict + "image" .Params.image + "alt" .Title + "mobile" "327x388" + "tablet" "208x247" + "desktop" "408x485" + ) -}} + {{- else if site.Params.default_image.url -}} + {{- partial "commons/image-default.html" (dict "class" "img-fluid") -}} + {{- end -}} + </div> + </a> + </dd> + {{ end }} + {{ if isset .Params "type" }} <dt>{{ i18n "volumes.nature" }}</dt> <dd>{{ partial "PrepareHTML" .Params.Type }}</dd> @@ -26,15 +40,6 @@ <dd itemprop="inLanguage" content="{{ .Params.Lang_iso }}">{{ .Params.Lang }}</dd> {{ end }} - {{ range .GetTerms "volumes" }} - <dt>{{ i18n "volumes.singular_name" }}</dt> - <dd itemprop="isPartOf" itemscope itemtype="https://schema.org/PublicationVolume"> - <a href="{{ .Permalink }}" itemprop="url"> - <span itemprop="name">{{ .Title }}</span> - </a> - </dd> - {{ end }} - {{ if .Date }} <dt>{{ i18n "commons.date" }}</dt> <dd> diff --git a/layouts/partials/papers/modal.html b/layouts/partials/papers/modal.html new file mode 100644 index 0000000000000000000000000000000000000000..fcd07d34f6fb79e6742ee1182cb0cec690ed1ffa --- /dev/null +++ b/layouts/partials/papers/modal.html @@ -0,0 +1,13 @@ +<div class="modal paper-modal" id="{{ .modalId }}" tabindex="-1" aria-labelledby="{{ .modalId }}Label" aria-hidden="true" aria-modal="true"> + <div class="modal-content"> + <div class="modal-header"> + <h3 class="modal-title" id="{{ .modalId }}Label">{{ .title }}</h3> + <button class="close" type="button" aria-label="{{ i18n "commons.close" }}"></button> + </div> + <div class="modal-body"> + <div itemprop="abstract"> + {{ partial "PrepareHTML" .abstract }} + </div> + </div> + </div> +</div> diff --git a/layouts/partials/papers/paper.html b/layouts/partials/papers/paper.html index dcf7ecb4f392128893c889a1333408ab288b95ac..3019c669e8247d3b94a01f271889622500b598f5 100644 --- a/layouts/partials/papers/paper.html +++ b/layouts/partials/papers/paper.html @@ -1,11 +1,31 @@ -<article class="paper"> - <p class="title"> - <a href="{{ .Permalink }}">{{ partial "PrepareHTML" .Title }}</a> - </p> - {{ range .Params.Volumes }} - {{ $volume := site.GetPage (printf "/volumes%s" .) }} - {{ if $volume }} - <p>{{ i18n "commons.in" }} “<a href="{{ $volume.Permalink }}">{{ $volume.Title }}</a>â€</p> - {{ end }} - {{ end }} -</article> +{{ $inside_volume := .inside_volume | default false }} +{{ $modalId := print "modalID_" .index }} + +{{ with .paper }} + <article class="paper" itemscope itemtype="https://schema.org/ScholarlyArticle" {{- if $inside_volume }} itemProp="hasPart" {{- end -}}> + <div> + <h3> + <a href="{{ .Permalink }}" itemprop="url"> + <span itemprop="name">{{ partial "PrepareHTML" .Title }}</span> + </a> + </h3> + {{- range $index, $authors := .Params.Researchers -}} + {{- $author := site.GetPage (printf "/persons/%s" .) -}} + {{- if ne $index 0 -}},{{ end }} + <span itemprop="author" itemscope itemtype="https://schema.org/Person"><a href="{{ $author.Permalink }}" itemprop="url"><span itemprop="name">{{ trim $author.Title "\n" }}</span></a></span> + {{- end -}} + <p class="paper-volume"> + <span>Article</span> + {{ if not $inside_volume }} + {{ range .Params.Volumes }} + {{ $volume := site.GetPage (printf "/volumes/%s" .) }} + {{ if $volume }} + {{ i18n "commons.in" }} “<a href="{{ $volume.Permalink }}">{{ $volume.Title }}</a>†+ {{ end }} + {{ end }} + {{ end }} + </p> + </div> + {{ partial "papers/actions.html" (dict "paper" . ) }} + </article> +{{ end }} \ No newline at end of file diff --git a/layouts/partials/papers/papers.html b/layouts/partials/papers/papers.html deleted file mode 100644 index 11cce3f4097fac96c6f46bf0ea286e20d26224b3..0000000000000000000000000000000000000000 --- a/layouts/partials/papers/papers.html +++ /dev/null @@ -1,7 +0,0 @@ -<div class="papers"> - {{ range .Paginator.Pages }} - <div> - {{ partial "papers/paper.html" . }} - </div> - {{ end }} -</div> diff --git a/layouts/partials/persons/contact-details.html b/layouts/partials/persons/contact-details.html index 134e1207be396c9d230d4276afa20b452a05f030..e842de9c1066f9e3dd65d27b98683446ba3a1360 100644 --- a/layouts/partials/persons/contact-details.html +++ b/layouts/partials/persons/contact-details.html @@ -44,6 +44,13 @@ <a href="{{ .value }}" itemprop="telephone">{{ .label }}</a> </li> {{ end }} + + {{ with .phone_professional }} + <li> + <span>{{ i18n "commons.contact.phone_professional" }}</span> + <a href="{{ .value }}" itemprop="telephone">{{ .label }}</a> + </li> + {{ end }} </ul> {{ end }} </div> diff --git a/layouts/partials/persons/papers.html b/layouts/partials/persons/papers.html index b0c2a7d3ebaa3e36f0cbab3ac95c9bd6ced9f037..a0c9bac3de6145f2bf359fa4537d1ad5f03767bd 100644 --- a/layouts/partials/persons/papers.html +++ b/layouts/partials/persons/papers.html @@ -4,11 +4,11 @@ <h2>{{ i18n "persons.papers" }}</h2> <a href="{{ $researchers.Permalink }}" class="link">{{ i18n "persons.papers" }}</a> </div> - <div class="papers"> + <ul class="papers"> {{ range first 3 .papers }} - <div> - {{ partial "papers/paper.html" . }} - </div> + <li> + {{ partial "papers/paper.html" (dict "paper" . ) }} + </li> {{ end }} - </div> + </ul> </section> diff --git a/layouts/partials/volumes/description.html b/layouts/partials/volumes/description.html index 3ad551415d56619bab3596c892f4519cc86adbc0..d245c15e17155b0ef6c892bf28cd6fd58a54191f 100644 --- a/layouts/partials/volumes/description.html +++ b/layouts/partials/volumes/description.html @@ -1,7 +1,5 @@ -<div> {{- if (partial "GetTextFromHTML" .Content) -}} <div itemprop="description"> {{ partial "PrepareHTML" .Content }} </div> - {{- end -}} -</div> + {{- end -}} \ No newline at end of file diff --git a/layouts/partials/volumes/modal.html b/layouts/partials/volumes/modal.html deleted file mode 100644 index bb111f75e5e9b2e0f7330b342508876619221588..0000000000000000000000000000000000000000 --- a/layouts/partials/volumes/modal.html +++ /dev/null @@ -1,15 +0,0 @@ -<div class="modal fade" id="{{ .modalId }}" tabindex="-1" aria-labelledby="{{ .modalId }}Label" aria-hidden="true"> - <div class="modal-dialog modal-lg modal-dialog-centered modal-dialog-scrollable"> - <div class="modal-content"> - <div class="modal-header"> - <h5 class="modal-title" id="{{ .modalId }}Label">{{ .title }}</h5> - <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="{{ i18n "commons.close" }}"></button> - </div> - <div class="modal-body"> - <div itemprop="abstract"> - {{ .abstract }} - </div> - </div> - </div> - </div> -</div> diff --git a/layouts/partials/volumes/papers.html b/layouts/partials/volumes/papers.html new file mode 100644 index 0000000000000000000000000000000000000000..62a6897bef7018570a2f36aa149a8ab6e937dc17 --- /dev/null +++ b/layouts/partials/volumes/papers.html @@ -0,0 +1,16 @@ +<section> + <div class="top"> + <h2>{{ i18n "volumes.table_contents" }}</h2> + </div> + <ul class="papers"> + {{ range $index, $element := .Paginator.Pages }} + <li> + {{ partial "papers/paper.html" (dict + "paper" . + "inside_volume" true + "index" $index + ) }} + </li> + {{ end }} + </ul> +</section> diff --git a/layouts/partials/volumes/table-contents.html b/layouts/partials/volumes/table-contents.html deleted file mode 100644 index 268c8a9b6afe8f196ee91b117e56ed9ff47d0e11..0000000000000000000000000000000000000000 --- a/layouts/partials/volumes/table-contents.html +++ /dev/null @@ -1,46 +0,0 @@ -{{ if .Pages }} -<div> - <h2>{{ i18n "volumes.table_contents" }}</h2> - <ol class="volume-table"> - {{ range $index, $articles := .Pages }} - {{ $modalId := print "modalID_" $index }} - <li itemprop="hasPart" itemscope itemtype="https://schema.org/ScholarlyArticle"> - <div> - <span itemprop="articleSection">{{ i18n "volumes.article.singular_name" }}</span> - </div> - <div> - <h3> - <a href="{{ .Permalink }}" itemprop="url"> - <span itemprop="name">{{ partial "PrepareHTML" .Title }}</span> - </a> - </h3> - <p> - {{- range $index, $authors := .Params.Researchers -}} - {{- $author := site.GetPage (printf "/persons/%s" .) -}} - {{- if ne $index 0 -}},{{ end }} - <span itemprop="author" itemscope itemtype="https://schema.org/Person"><a href="{{ $author.Permalink }}" itemprop="url"><span itemprop="name">{{ trim $author.Title "\n" }}</span></a></span> - {{- end -}} - </p> - <div role="group"> - <a href="{{ .Permalink }}" itemprop="url">{{ i18n "commons.read" }}</a> - <button type="button" data-bs-toggle="modal" data-bs-target="#{{ $modalId }}">{{ i18n "volumes.abstract" }}</button> - {{ if .Params.pdf }} - {{- $pdf := partial "GetMedia" .Params.pdf -}} - {{- $pdf_size := partial "GetHumanSize" $pdf.size -}} - <a href="{{ $pdf.url }}" download> - {{- i18n "commons.pdf_with_size" (dict "Size" $pdf_size) }} - </a> - {{ end }} - </div> - {{ partial "volumes/modal.html" - (dict - "modalId" $modalId - "title" .Title - "abstract" .Params.abstract - ) }} - </div> - </li> - {{ end }} - </ol> -</div> -{{ end }} diff --git a/layouts/partials/volumes/volume.html b/layouts/partials/volumes/volume.html index 09fc5ab2605b899b1e1740affcca93017e9c33d9..cdb899dd2515464f71a177c420bff335ab9345c2 100644 --- a/layouts/partials/volumes/volume.html +++ b/layouts/partials/volumes/volume.html @@ -1,7 +1,7 @@ <article class="volume"> <hgroup> <p class="suptitle">{{ i18n "volumes.volume_number" (dict "Number" .Params.Number) }}</p> - <h1><a href="{{ .Permalink }}" title="{{ i18n "commons.more_aria" (dict "Title" .Title) }}">{{ partial "PrepareHTML" .Title }}</a></h1> + <h2><a href="{{ .Permalink }}" title="{{ i18n "commons.more_aria" (dict "Title" .Title) }}">{{ partial "PrepareHTML" .Title }}</a></h2> </hgroup> <div class="media"> {{- if .Params.image -}} diff --git a/layouts/persons/single.html b/layouts/persons/single.html index eb83802839dffd17220a57d263f4a561d18d6064..b5624399ba57384ecca368b70758c304a217e173 100644 --- a/layouts/persons/single.html +++ b/layouts/persons/single.html @@ -31,7 +31,7 @@ {{- $image := partial "GetMedia" .Params.image -}} {{- if $image -}} <meta itemprop="image" content="{{ $image.url }}"> - {{- end -}} + {{- end -}} {{- end -}} <div class="informations"> diff --git a/layouts/researchers/term.html b/layouts/researchers/term.html index cff40c27b912857af449d7d60d9cd9a8a4213f4d..2ad94562d93378396872348260e33c03ae6ebb7a 100644 --- a/layouts/researchers/term.html +++ b/layouts/researchers/term.html @@ -5,7 +5,13 @@ "context" . ) -}} <div class="document-content container"> - {{ partial "papers/papers.html" . }} + <ul class="papers"> + {{ range .Paginator.Pages }} + <li> + {{ partial "papers/paper.html" (dict "paper" . ) }} + </li> + {{ end }} + </ul> {{ partial "commons/pagination.html" . }} </div> {{ end }} diff --git a/layouts/volumes/term.html b/layouts/volumes/term.html index 6f456eb0c4793a88310bc5a5a7fc0b9ac01904f4..72b588c74583c9983ed28d272ba5a1c7da75d442 100644 --- a/layouts/volumes/term.html +++ b/layouts/volumes/term.html @@ -12,11 +12,17 @@ {{- end -}} <div class="container"> + + {{ partial "volumes/document-aside.html" . }} + <div class="content"> {{ partial "volumes/description.html" . }} - {{ partial "volumes/document-aside.html" . }} - {{ partial "volumes/table-contents.html" . }} + {{ partial "volumes/papers.html" . }} </div> + </div> + + {{ partial "blocks/list.html" . }} + </div> {{ end }} diff --git a/static/assets/fonts/fonticons/IconFont.ttf b/static/assets/fonts/fonticons/IconFont.ttf index b2ce87ab058d22d75356928fbdbe5bcbf71c2b5c..2a33ea9c7378a8b278b92fc9e09539e2844537a0 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 619722fb0a317c8ef59a307fdd0dabf30cc7cfe5..7d97eb6a063b9d56851a64216c87f2bb070c0452 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 f737a3ade3bcba2803b80fac8cf17d7bcbfaa349..c9f07b1f8586aab5f3e321e12e696bf96fa2551e 100644 Binary files a/static/assets/fonts/fonticons/IconFont.woff2 and b/static/assets/fonts/fonticons/IconFont.woff2 differ