diff --git a/config.yaml b/config.yaml index 4e60532924786b5b3a99d0576824e682218b48c5..54ed0d4d538b7ecac295672ef5e5454b01e7f3e6 100644 --- a/config.yaml +++ b/config.yaml @@ -17,3 +17,146 @@ params: logo: header: "/assets/images/logo.svg" footer: "/assets/images/logo.svg" + + image_sizes: + design_system: + lightbox: + # TODO mobile et tablet + mobile: 1920x2560 + tablet: 1920x2560 + desktop: 1920x2560 + hero: + mobile: 400 + tablet: 800 + desktop: 900 + blocks: + call_to_action: + mobile: 164 + tablet: 350 + desktop: 415 + chapter: + mobile: 350 + tablet: 450 + desktop: 1280 + image: + mobile: 480x850 + tablet: 768x1360 + desktop: 1400x1820 + organization_chart: + mobile: 80 + tablet: 100 + desktop: 255 + partners: + mobile: 164 + tablet: 216 + desktop: 196 + testimonials: + desktop: 200 + gallery: + carousel: + mobile: 400 + tablet: 600 + desktop: 1024 + grid: + mobile: 170 + tablet: 350 + desktop: 415 + sections: + categories: + hero: + mobile: 400 + tablet: 800 + desktop: 900 + hero_term: + mobile: 400 + tablet: 800 + desktop: 900 + diplomas: + hero: + mobile: 400 + tablet: 800 + desktop: 900 + hero_single: + mobile: 351 + tablet: 456 + desktop: 856 + home: + hero: + mobile: 400 + tablet: 800 + desktop: 900 + organizations: + hero: + mobile: 400 + tablet: 800 + desktop: 900 + logo: + mobile: 331 + tablet: 196 + desktop: 396 + item: + mobile: 144 + tablet: 196 + desktop: 176 + pages: + hero: + mobile: 400 + tablet: 800 + desktop: 900 + item: + mobile: 350 + tablet: 400 + desktop: 900 + papers: + hero: + mobile: 400 + tablet: 800 + desktop: 900 + hero_single: + mobile: 400 + tablet: 800 + desktop: 900 + persons: + hero: + mobile: 200 + tablet: 200 + desktop: 415 + hero_single: + mobile: 200 + tablet: 200 + desktop: 415 + item: + mobile: 80 + tablet: 100 + desktop: 255 + posts: + hero: + mobile: 400 + tablet: 800 + desktop: 900 + hero_single: + mobile: 400 + tablet: 800 + desktop: 900 + item: + mobile: 350 + tablet: 450 + desktop: 900 + programs: + hero: + mobile: 400 + tablet: 800 + desktop: 900 + image: + mobile: 351x168 + tablet: 456x219 + desktop: 856x410 + volumes: + hero: + mobile: 400 + tablet: 800 + desktop: 900 + item: + mobile: 327x388 + tablet: 208x247 + desktop: 300x356 \ No newline at end of file diff --git a/layouts/papers/list.html b/layouts/papers/list.html index 741e7745853824fd91f1c1f435ece82c60f2898c..b1e67d0cf9fe8b39f0421f6cf1cb170ebfcb7bdd 100644 --- a/layouts/papers/list.html +++ b/layouts/papers/list.html @@ -3,6 +3,7 @@ (dict "title" .Title "image" .Params.image + "sizes" site.Params.image_sizes.sections.papers.hero "context" . ) -}} <div class="document-content"> diff --git a/layouts/papers/single.html b/layouts/papers/single.html index d80abbd41333de0505ad15e1c664a98d7acf4c4b..5654229356e61356a1a8e9873ef572828ef2f2ab 100644 --- a/layouts/papers/single.html +++ b/layouts/papers/single.html @@ -3,6 +3,7 @@ (dict "title" .Title "image" .Params.image + "sizes" site.Params.image_sizes.sections.papers.hero_single "context" . ) -}} <div class="document-content" itemscope itemtype="https://schema.org/ScholarlyArticle"> diff --git a/layouts/partials/GetLightboxUrl b/layouts/partials/GetLightboxUrl index e4993a61a28b2d8ee7404f7b90aa164534caafc7..7ea489ee683acb9ab20a9bb78db8964cfac488c8 100644 --- a/layouts/partials/GetLightboxUrl +++ b/layouts/partials/GetLightboxUrl @@ -2,7 +2,7 @@ {{ if isset . "id" }} {{ $id = .id }} {{ end }} -{{ $lightbox_sizes := "1920x2560" }} +{{ $lightbox_sizes := site.Params.image_sizes.design_system.lightbox.desktop }} {{ $image := partial "GetMedia" $id }} {{ $url := "" }} diff --git a/layouts/partials/blocks/templates/call_to_action.html b/layouts/partials/blocks/templates/call_to_action.html index 2fae0fcd15833a1425802a055badca8d9b6c633b..a4bba7c41d979df3b527e6f9e8fccb163ff6c0c0 100644 --- a/layouts/partials/blocks/templates/call_to_action.html +++ b/layouts/partials/blocks/templates/call_to_action.html @@ -43,9 +43,7 @@ (dict "image" .image.file "alt" .image.alt - "mobile" "164x164" - "tablet" "336x336" - "desktop" "416x416" + "sizes" site.Params.image_sizes.blocks.call_to_action )}} </div> diff --git a/layouts/partials/blocks/templates/chapter.html b/layouts/partials/blocks/templates/chapter.html index bb0c6750ef72e22130a8f1d47d3201954e9dfb07..3f7f11c71590d25bb1644baae7c2ac9ec449f1e9 100644 --- a/layouts/partials/blocks/templates/chapter.html +++ b/layouts/partials/blocks/templates/chapter.html @@ -46,9 +46,7 @@ {{ partial "commons/image.html" (dict "image" .image - "mobile" "350x350" - "tablet" "450x450" - "desktop" "1280x1280" + "sizes" site.Params.image_sizes.blocks.chapter )}} </a> {{ if partial "GetTextFromHTML" .credit }} diff --git a/layouts/partials/blocks/templates/gallery/carousel.html b/layouts/partials/blocks/templates/gallery/carousel.html index 67fdbeb154f55666b3be33df492a9f0ead189ffd..a787ab3f2ef92ef36950e507f2c1c6b44f7bb5b9 100644 --- a/layouts/partials/blocks/templates/gallery/carousel.html +++ b/layouts/partials/blocks/templates/gallery/carousel.html @@ -23,9 +23,7 @@ (dict "image" .id "alt" .alt - "mobile" "400" - "tablet" "600" - "desktop" "1024" + "sizes" site.Params.image_sizes.blocks.gallery.carousel )}} </a> {{ if or .text .credit }} diff --git a/layouts/partials/blocks/templates/gallery/grid.html b/layouts/partials/blocks/templates/gallery/grid.html index b87645234ae62df56904bfae48a13fca6ae19de0..fe5a4a1cc4da6785a27e3580bbce659156c2c5f2 100644 --- a/layouts/partials/blocks/templates/gallery/grid.html +++ b/layouts/partials/blocks/templates/gallery/grid.html @@ -13,9 +13,7 @@ (dict "image" .file "alt" .alt - "mobile" "164" - "tablet" "336" - "desktop" "416" + "sizes" site.Params.image_sizes.blocks.gallery.grid )}} </a> {{ if .text }} diff --git a/layouts/partials/blocks/templates/image.html b/layouts/partials/blocks/templates/image.html index f27221ffb6646ba51e0da06ed8325d35176dcfea..0ef25bc1afa269d9c05d3a1f29c9d20328c0ded5 100644 --- a/layouts/partials/blocks/templates/image.html +++ b/layouts/partials/blocks/templates/image.html @@ -36,9 +36,7 @@ (dict "image" . "alt" .alt - "mobile" "480x850" - "tablet" "768x1360" - "desktop" "1400x1820" + "sizes" site.Params.image_sizes.blocks.image )}} </a> <figcaption> diff --git a/layouts/partials/blocks/templates/organization_chart.html b/layouts/partials/blocks/templates/organization_chart.html index 131ef46c735c2061457d8ef9db3fa850e4f10779..05cb54c6cf3da1a1276f0093d32675d6914c9ac2 100644 --- a/layouts/partials/blocks/templates/organization_chart.html +++ b/layouts/partials/blocks/templates/organization_chart.html @@ -51,9 +51,7 @@ {{ partial "commons/image.html" (dict "image" $person.Params.image - "mobile" "80x80" - "tablet" "100x100" - "desktop" "255x255" + "sizes" site.Params.image_sizes.blocks.organization_chart )}} {{ end -}} </div> diff --git a/layouts/partials/blocks/templates/partners.html b/layouts/partials/blocks/templates/partners.html index 072f9deeb93a5bf90e9546e4dc1fe777e2262310..34034755bc6d7a4269148c5281f72a490e20c7ac 100644 --- a/layouts/partials/blocks/templates/partners.html +++ b/layouts/partials/blocks/templates/partners.html @@ -51,9 +51,7 @@ (dict "image" .logo "alt" $title - "mobile" "164" - "tablet" "216" - "desktop" "196" + "sizes" site.Params.image_sizes.blocks.partners ) -}} {{- end -}} </div> diff --git a/layouts/partials/blocks/templates/testimonials.html b/layouts/partials/blocks/templates/testimonials.html index d86ba1531342c00c59b710d56cba4985ee2643f1..b45b99ff848b8ed681c7be03d0987bb32218de6e 100644 --- a/layouts/partials/blocks/templates/testimonials.html +++ b/layouts/partials/blocks/templates/testimonials.html @@ -51,9 +51,7 @@ (dict "image" .photo "alt" .author - "mobile" "192x192" - "tablet" "192x192" - "desktop" "192x192" + "sizes" site.Params.image_sizes.blocks.testimonials ) -}} </div> {{- end }} diff --git a/layouts/partials/categories/hero-list.html b/layouts/partials/categories/hero-list.html index 0a48273d269ebe615febe47fa9fec8999ef76c53..4cb482eb1016eae37cd284843efa2518fbe0ffee 100644 --- a/layouts/partials/categories/hero-list.html +++ b/layouts/partials/categories/hero-list.html @@ -1,5 +1,6 @@ {{- partial "header/hero.html" (dict - "title" .Title - "context" . + "title" .Title + "sizes" site.Params.image_sizes.sections.categories.hero + "context" . ) -}} diff --git a/layouts/partials/categories/hero-term.html b/layouts/partials/categories/hero-term.html index 3454341cfbf2cdff26319d8e3d29f12bbfe4600f..f3573430e6a73ed3f3a50e826644a774208096aa 100644 --- a/layouts/partials/categories/hero-term.html +++ b/layouts/partials/categories/hero-term.html @@ -1,6 +1,7 @@ {{- partial "header/hero.html" - (dict - "title" .Title - "image" .Params.image - "context" . - ) -}} + (dict + "title" .Title + "image" .Params.image + "sizes" site.Params.image_sizes.sections.categories.hero_term + "context" . + ) -}} diff --git a/layouts/partials/commons/image.html b/layouts/partials/commons/image.html index 8c43d6fc9b414cca23afa6632e812fdfdf6ebbe4..2cc6d1ba1ba4da16ce3d5ef0b2ab8b3558af4532 100644 --- a/layouts/partials/commons/image.html +++ b/layouts/partials/commons/image.html @@ -24,6 +24,14 @@ {{- if .crop -}} {{- $crop = true -}} {{- end -}} + {{ $desktop := .desktop }} + {{ $tablet := .tablet }} + {{ $mobile := .mobile }} + {{- if .sizes -}} + {{ $desktop = .sizes.desktop }} + {{ $tablet = .sizes.tablet }} + {{ $mobile = .sizes.mobile }} + {{- end -}} <picture> {{- if strings.HasSuffix $image.name "svg" -}} @@ -39,32 +47,32 @@ {{- else -}} - {{ with .desktop -}} + {{ with $desktop -}} <source srcset="{{ partial "GetImageUrl" (dict "url" $url "size" . "format" "webp" "crop" $crop ) }}, {{ partial "GetImageUrl" (dict "url" $url "size" . "format" "webp" "scale" 2 "crop" $crop) }} 2x" media="(min-width: 1024px)" type="image/webp"> {{- end }} - {{ with .tablet -}} + {{ with $tablet -}} <source srcset="{{ partial "GetImageUrl" (dict "url" $url "size" . "format" "webp" "crop" $crop) }}, {{ partial "GetImageUrl" (dict "url" $url "size" . "format" "webp" "scale" 2 "crop" $crop) }} 2x" media="(min-width: 768px)" type="image/webp"> {{- end }} - {{ with .mobile -}} + {{ with $mobile -}} <source srcset="{{ partial "GetImageUrl" (dict "url" $url "size" . "format" "webp" "crop" $crop) }}, {{ partial "GetImageUrl" (dict "url" $url "size" . "format" "webp" "scale" 2 "crop" $crop) }} 2x" type="image/webp"> {{- end }} - {{ with .desktop -}} + {{ with $desktop -}} <source srcset="{{ partial "GetImageUrl" (dict "url" $url "size" . "crop" $crop ) }}, {{ partial "GetImageUrl" (dict "url" $url "size" . "scale" 2 "crop" $crop) }} 2x" media="(min-width: 1024px)"> {{- end }} - {{ with .tablet -}} + {{ with $tablet -}} <source srcset="{{ partial "GetImageUrl" (dict "url" $url "size" . "crop" $crop ) }}, {{ partial "GetImageUrl" (dict "url" $url "size" . "scale" 2 "crop" $crop) }} 2x" media="(min-width: 768px)"> {{- end }} - {{ with .mobile -}} + {{ with $mobile -}} <source srcset="{{ partial "GetImageUrl" (dict "url" $url "size" . "crop" $crop ) }}, {{ partial "GetImageUrl" (dict "url" $url "size" . "scale" 2 "crop" $crop) }} 2x"> {{- end }} diff --git a/layouts/partials/diplomas/hero-list.html b/layouts/partials/diplomas/hero-list.html index 8e7e675c055dce99ef4dda14b248d20db258f721..b272a7170a4114164a9dc3811d72b2fffd1e0168 100644 --- a/layouts/partials/diplomas/hero-list.html +++ b/layouts/partials/diplomas/hero-list.html @@ -1,7 +1,8 @@ {{- $title := or .Params.header_text .Title -}} {{- partial "header/hero.html" - (dict - "title" $title - "image" .Params.image - "context" . - ) -}} + (dict + "title" $title + "image" .Params.image + "sizes" site.Params.image_sizes.sections.diplomas.hero + "context" . + ) -}} diff --git a/layouts/partials/diplomas/hero-single.html b/layouts/partials/diplomas/hero-single.html index 4577aee8825ae95a57a16100206e2ade1236c045..6bd1f4316602337264941abc45c0d527d90bb5aa 100644 --- a/layouts/partials/diplomas/hero-single.html +++ b/layouts/partials/diplomas/hero-single.html @@ -11,9 +11,7 @@ {{ partial "commons/image.html" (dict "image" .image - "mobile" "351" - "tablet" "456" - "desktop" "856" + "sizes" site.Params.image_sizes.sections.diplomas.hero_single ) }} {{ if .image.credit }} <figcaption> diff --git a/layouts/partials/diplomas/image.html b/layouts/partials/diplomas/image.html deleted file mode 100644 index 40868e727950f41c194bdb7ed27a4580fd33944d..0000000000000000000000000000000000000000 --- a/layouts/partials/diplomas/image.html +++ /dev/null @@ -1,17 +0,0 @@ -{{ if . }} - <figure class="featured-image"> - {{ partial "commons/image.html" - (dict - "image" . - "mobile" "351x168" - "tablet" "456x219" - "desktop" "856x410" - "itemprop" true - )}} - {{- if isset . "credit" -}} - {{ if partial "GetTextFromHTML" .credit }} - <figcaption>{{ partial "PrepareHTML" .credit }}</figcaption> - {{ end }} - {{- end -}} - </figure> -{{ end }} diff --git a/layouts/partials/footer/debug.html b/layouts/partials/footer/debug.html index 72140fcc8e50263c15e9bef41779e8c5987f9700..e53839f3ae9e1dbe3434899ddee8e68fa82fa513 100644 --- a/layouts/partials/footer/debug.html +++ b/layouts/partials/footer/debug.html @@ -161,9 +161,20 @@ document.body.classList.toggle('full-width'); } }); + window.addEventListener('pointermove', e => { document.querySelector('.d-cross').style.left = e.clientX + "px"; document.querySelector('.d-cross').style.top = e.clientY + "px"; + }); + + document.querySelectorAll('img').forEach(img => { + img.addEventListener('click', e => { + if (e.altKey) { + e.preventDefault() + e.stopImmediatePropagation() + responsiveImageDebugOutput(img) + } + }) }) function responsiveImageDebugOutput(img) { diff --git a/layouts/partials/header/hero.html b/layouts/partials/header/hero.html index 9cb3207efe68471fd085da077a4f7ff0e3514a49..3630d44619039417c4059cec996c19ad1c981809 100644 --- a/layouts/partials/header/hero.html +++ b/layouts/partials/header/hero.html @@ -27,9 +27,7 @@ {{ partial "commons/image.html" (dict "image" .image - "mobile" "400" - "tablet" "800" - "desktop" "900" + "sizes" ( .sizes | default site.Params.image_sizes.design_system.hero ) "lazy" false ) }} {{ if .image.credit }} diff --git a/layouts/partials/home/hero.html b/layouts/partials/home/hero.html index 0a012b577b42588e45ff61e2ebd3e56934f77810..0a8f6680f38c164b9adc7f8be15858d7cba30523 100644 --- a/layouts/partials/home/hero.html +++ b/layouts/partials/home/hero.html @@ -4,5 +4,6 @@ "title" $title "image" .Params.image "breadcrumb" false + "sizes" site.Params.image_sizes.sections.home.hero "context" . )}} diff --git a/layouts/partials/organizations/hero.html b/layouts/partials/organizations/hero.html index 3454341cfbf2cdff26319d8e3d29f12bbfe4600f..5013a73d83be7f66e8f5928ebfdbe341f6e340e7 100644 --- a/layouts/partials/organizations/hero.html +++ b/layouts/partials/organizations/hero.html @@ -2,5 +2,6 @@ (dict "title" .Title "image" .Params.image + "sizes" site.Params.image_sizes.sections.organizations.hero "context" . ) -}} diff --git a/layouts/partials/organizations/logo.html b/layouts/partials/organizations/logo.html index b4fff2e052ec8c51dcae0152ef6ce2b086b963ab..5019960af07e26cb514a3cbcd0becf75f8d18ce9 100644 --- a/layouts/partials/organizations/logo.html +++ b/layouts/partials/organizations/logo.html @@ -5,9 +5,7 @@ (dict "image" .Params.logo "alt" .Title - "mobile" "331" - "tablet" "196" - "desktop" "396" + "sizes" site.Params.image_sizes.sections.organizations.logo ) -}} </figure> {{- end -}} diff --git a/layouts/partials/organizations/organization.html b/layouts/partials/organizations/organization.html index 0891de6d8f82585dbc3afa5aa769041fd08a0d5d..e434c3d8633d8fbf5dcbf541bf5d8dae7a6a5bcb 100644 --- a/layouts/partials/organizations/organization.html +++ b/layouts/partials/organizations/organization.html @@ -9,9 +9,7 @@ (dict "image" .Params.logo "alt" $title - "mobile" "144" - "tablet" "196" - "desktop" "176" + "sizes" site.Params.image_sizes.sections.organizations.item ) -}} {{- end -}} </div> diff --git a/layouts/partials/pages/children.html b/layouts/partials/pages/children.html index a028a1c42d7d0178c2ae5ce0d13244de60a74e4a..891d769c66d1ea8cee0da2a22400ff511fc94840 100644 --- a/layouts/partials/pages/children.html +++ b/layouts/partials/pages/children.html @@ -6,9 +6,7 @@ <div> {{ $page := partial "GetPageByUrl" . }} {{ with $page }} - {{ .Scratch.Set "show_description" true }} {{ partial "pages/page.html" . }} - {{ .Scratch.Delete "show_description" }} {{ end }} </div> {{ end }} diff --git a/layouts/partials/pages/hero.html b/layouts/partials/pages/hero.html index 8e7e675c055dce99ef4dda14b248d20db258f721..20039accd5cbb1a950cbf90da84190a01dfbb337 100644 --- a/layouts/partials/pages/hero.html +++ b/layouts/partials/pages/hero.html @@ -3,5 +3,6 @@ (dict "title" $title "image" .Params.image + "sizes" site.Params.image_sizes.sections.pages.hero "context" . ) -}} diff --git a/layouts/partials/pages/page-media.html b/layouts/partials/pages/page-media.html index 989f6d411d2b0e3601adbc9e557cb952df086dc5..1f6e6e063d9798a1990fd30e8ff43ace948b1847 100644 --- a/layouts/partials/pages/page-media.html +++ b/layouts/partials/pages/page-media.html @@ -3,9 +3,7 @@ {{- partial "commons/image.html" (dict "image" .Params.image - "mobile" "350x350" - "tablet" "400x400" - "desktop" "900x900" + "sizes" site.Params.image_sizes.sections.pages.item ) -}} {{- else -}} {{- partial "commons/image-default.html" -}} diff --git a/layouts/partials/pages/page.html b/layouts/partials/pages/page.html index 95cb478b218a6bbbf97212a9cc5b820feeb3d910..a21cff2d2a1aca3f943b6898ea392de01e103e24 100644 --- a/layouts/partials/pages/page.html +++ b/layouts/partials/pages/page.html @@ -16,17 +16,8 @@ {{- partial "PrepareHTML" .Title -}} </a> {{- partial "PrepareHTML" (printf "</%s>" $heading) -}} - - {{- if .Scratch.Get "show_description" }} - {{- if .Params.description_short }} - <p>{{ partial "PrepareHTML" .Params.description_short }}</p> - {{ end -}} - {{ end -}} - {{- if .Scratch.Get "show_more" }} - <p class="more">{{- i18n "commons.more" -}}</p> + {{- if .Params.description_short }} + <p>{{ partial "PrepareHTML" .Params.description_short }}</p> {{ end -}} </div> - {{ if .Scratch.Get "show_image" }} - {{- partial "pages/page-media.html" . -}} - {{- end }} </article> diff --git a/layouts/partials/pages/pages.html b/layouts/partials/pages/pages.html index 48040bf6777cdc1e635d4c88127a1208fb7ce9ec..f78350bb1b5a0bba10f50f2e02f99cbbdb060dbd 100644 --- a/layouts/partials/pages/pages.html +++ b/layouts/partials/pages/pages.html @@ -1,9 +1,7 @@ <div class="pages"> {{ range .Paginator.Pages }} <div> - {{ .Scratch.Set "show_description" true }} {{ partial "pages/page.html" . }} - {{ .Scratch.Delete "show_description" }} </div> {{ end }} </div> diff --git a/layouts/partials/persons/hero-single.html b/layouts/partials/persons/hero-single.html index 847d4dc931a66028043d8323671e0f7454538a27..74dd7b9f489fe968cee2eb45e13cc801034da491 100644 --- a/layouts/partials/persons/hero-single.html +++ b/layouts/partials/persons/hero-single.html @@ -6,13 +6,11 @@ {{ if .Params.image }} <div class="avatar"> {{ partial "commons/image.html" - (dict - "image" .Params.image - "class" "img-fluid" - "mobile" "202x202" - "tablet" "192x192" - "desktop" "415x415" - )}} + (dict + "image" .Params.image + "class" "img-fluid" + "sizes" site.Params.image_sizes.sections.persons.hero_single + )}} </div> {{ end }} </div> diff --git a/layouts/partials/persons/hero.html b/layouts/partials/persons/hero.html index 8e7e675c055dce99ef4dda14b248d20db258f721..c346f266db90bced536227bcca93244d15663127 100644 --- a/layouts/partials/persons/hero.html +++ b/layouts/partials/persons/hero.html @@ -4,4 +4,5 @@ "title" $title "image" .Params.image "context" . + "sizes" site.Params.image_sizes.sections.persons.hero ) -}} diff --git a/layouts/partials/persons/image.html b/layouts/partials/persons/image.html deleted file mode 100644 index c31b7b9b8812fd227eb3ee1506d52fc3aa769528..0000000000000000000000000000000000000000 --- a/layouts/partials/persons/image.html +++ /dev/null @@ -1,17 +0,0 @@ -{{ if . }} - <figure class="featured-image"> - {{ partial "commons/image.html" - (dict - "image" . - "mobile" "351x168" - "tablet" "456x219" - "desktop" "1232x450" - "itemprop" true - )}} - {{- if isset . "credit" -}} - {{ if partial "GetTextFromHTML" .credit }} - <figcaption>{{ partial "PrepareHTML" .credit }}</figcaption> - {{ end }} - {{- end -}} - </figure> -{{ end }} diff --git a/layouts/partials/persons/person.html b/layouts/partials/persons/person.html index 0047e2e5e49e65772f5424dd8b76a060bb31ecab..6bdeb24d0ba6cbfcaf062a8b1d59f141d3f4f3a8 100644 --- a/layouts/partials/persons/person.html +++ b/layouts/partials/persons/person.html @@ -12,11 +12,9 @@ {{- if .Params.image }} {{ partial "commons/image.html" (dict - "alt" .Title + "alt" .Title "image" .Params.image - "mobile" "80x80" - "tablet" "100x100" - "desktop" "255x255" + "sizes" site.Params.image_sizes.sections.persons.item )}} {{ end -}} </div> diff --git a/layouts/partials/posts/hero-list.html b/layouts/partials/posts/hero-list.html index 3454341cfbf2cdff26319d8e3d29f12bbfe4600f..fa8d44876816599205324c8c4e9c2813d3455d01 100644 --- a/layouts/partials/posts/hero-list.html +++ b/layouts/partials/posts/hero-list.html @@ -2,5 +2,6 @@ (dict "title" .Title "image" .Params.image + "sizes" site.Params.image_sizes.sections.posts.hero "context" . ) -}} diff --git a/layouts/partials/posts/hero-single.html b/layouts/partials/posts/hero-single.html index 3454341cfbf2cdff26319d8e3d29f12bbfe4600f..c872372aaecd8f79af38325966ff5c750001b4f1 100644 --- a/layouts/partials/posts/hero-single.html +++ b/layouts/partials/posts/hero-single.html @@ -2,5 +2,6 @@ (dict "title" .Title "image" .Params.image + "sizes" site.Params.image_sizes.sections.posts.hero_single "context" . ) -}} diff --git a/layouts/partials/posts/image.html b/layouts/partials/posts/image.html deleted file mode 100644 index eb398d084b434d3b76847294e820fba650f2d982..0000000000000000000000000000000000000000 --- a/layouts/partials/posts/image.html +++ /dev/null @@ -1,17 +0,0 @@ -{{ if . }} - <figure class="featured-image"> - {{ partial "commons/image.html" - (dict - "image" . - "mobile" "350x350" - "tablet" "450x450" - "desktop" "900x900" - "itemprop" true - )}} - {{- if isset . "credit" -}} - {{ if partial "GetTextFromHTML" .credit }} - <figcaption>{{ partial "PrepareHTML" .credit }}</figcaption> - {{ end }} - {{- end -}} - </figure> -{{ end }} diff --git a/layouts/partials/posts/post.html b/layouts/partials/posts/post.html index 1168ce5d86f502d865058496d3d6d55ee32168ca..620cb59be61fb3f207e287792e0077f1b72e3163 100644 --- a/layouts/partials/posts/post.html +++ b/layouts/partials/posts/post.html @@ -23,9 +23,7 @@ {{- partial "commons/image.html" (dict "image" .Params.image - "mobile" "350x350" - "tablet" "450x450" - "desktop" "900x900" + "sizes" site.Params.image_sizes.sections.posts.item ) -}} {{- else -}} {{- partial "commons/image-default.html" -}} diff --git a/layouts/partials/programs/hero.html b/layouts/partials/programs/hero.html index 8e7e675c055dce99ef4dda14b248d20db258f721..ee3cfeb3732d99ad494f13510722df71d651f50b 100644 --- a/layouts/partials/programs/hero.html +++ b/layouts/partials/programs/hero.html @@ -3,5 +3,6 @@ (dict "title" $title "image" .Params.image + "sizes" site.Params.image_sizes.sections.programs.hero "context" . ) -}} diff --git a/layouts/partials/programs/image.html b/layouts/partials/programs/image.html index a6bc76f50a5002cc60c14dcb57d452d641298e66..5774db7cab06dd34b1fb3f0092b40fb20885a2aa 100644 --- a/layouts/partials/programs/image.html +++ b/layouts/partials/programs/image.html @@ -3,9 +3,7 @@ {{ partial "commons/image.html" (dict "image" . - "mobile" "351x168" - "tablet" "456x219" - "desktop" "856x410" + "sizes" site.Params.image_sizes.sections.programs.image "itemprop" true "crop" true )}} diff --git a/layouts/partials/programs/program.html b/layouts/partials/programs/program.html index 7efa8afb76d15ada3db0b4e0fbd23402ba710045..45e780431772043dd71f792a40f84b8fa894ff55 100644 --- a/layouts/partials/programs/program.html +++ b/layouts/partials/programs/program.html @@ -1,7 +1,3 @@ -{{- $with_image := false -}} -{{- if .Scratch.Get "with_image" -}} - {{- $with_image = true -}} -{{- end -}} {{- $title := partial "PrepareHTML" .Title -}} <article class="program"> <div> @@ -14,18 +10,4 @@ <p>{{- partial "PrepareHTML" .Params.presentation -}}</p> {{ end }} </div> - {{- if $with_image }} - {{- if .Params.image }} - <div class="media"> - {{ partial "commons/image.html" - (dict - "image" .Params.image - "mobile" "351x168" - "tablet" "456x219" - "desktop" "856x410" - "itemprop" true - )}} - </div> - {{ end -}} - {{ end -}} </article> diff --git a/layouts/partials/volumes/hero.html b/layouts/partials/volumes/hero.html index 3454341cfbf2cdff26319d8e3d29f12bbfe4600f..a7648499f62496bc2d3870e5e7650040c691efde 100644 --- a/layouts/partials/volumes/hero.html +++ b/layouts/partials/volumes/hero.html @@ -2,5 +2,6 @@ (dict "title" .Title "image" .Params.image + "sizes" site.Params.image_sizes.sections.volumes.hero "context" . ) -}} diff --git a/layouts/partials/volumes/image.html b/layouts/partials/volumes/image.html deleted file mode 100644 index 38e5d66e5a1e63647a3b28a4f62b09edaf643ab2..0000000000000000000000000000000000000000 --- a/layouts/partials/volumes/image.html +++ /dev/null @@ -1,13 +0,0 @@ -{{- if .Params.image -}} - <div> - {{- partial "commons/image.html" - (dict - "image" .Params.image - "alt" .Title - "mobile" "327x388" - "tablet" "208x247" - "desktop" "300x356" - "class" "img-fluid" - ) -}} - </div> -{{- end -}} diff --git a/layouts/partials/volumes/volume.html b/layouts/partials/volumes/volume.html index 359caf279bd01f8df468d628293ff6f4f8897792..09fc5ab2605b899b1e1740affcca93017e9c33d9 100644 --- a/layouts/partials/volumes/volume.html +++ b/layouts/partials/volumes/volume.html @@ -9,9 +9,7 @@ (dict "image" .Params.image "alt" .Title - "mobile" "327x388" - "tablet" "208x247" - "desktop" "408x485" + "sizes" site.Params.image_sizes.sections.volumes.item ) -}} {{- else if site.Params.default_image.url -}} {{- partial "commons/image-default.html" (dict "class" "img-fluid") -}} diff --git a/layouts/volumes/term.html b/layouts/volumes/term.html index e81b30167e1288d9ef762a09e6dccb5dada5f5b3..6f456eb0c4793a88310bc5a5a7fc0b9ac01904f4 100644 --- a/layouts/volumes/term.html +++ b/layouts/volumes/term.html @@ -13,7 +13,6 @@ <div class="container"> <div class="content"> - {{ partial "volumes/image.html" . }} {{ partial "volumes/description.html" . }} {{ partial "volumes/document-aside.html" . }} {{ partial "volumes/table-contents.html" . }}