From 7a36b4c3998cb385198a88ac03ec9cb72520f461 Mon Sep 17 00:00:00 2001 From: Alexis BENOIT Date: Fri, 20 Mar 2026 21:51:51 +0100 Subject: [PATCH 01/44] package version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 5bfef86bc..9d6317ff4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "osuny-hugo-theme", - "version": "7.3.0", + "version": "9.2.0", "repository": "git@github.com:osunyorg/theme.git", "author": "alexisben ", "contributors": [ From 9f5a237e32934d6506bc503f0330ad0bbb1f5123 Mon Sep 17 00:00:00 2001 From: Alexis BENOIT Date: Fri, 20 Mar 2026 22:07:46 +0100 Subject: [PATCH 02/44] Rangement du `head` (#1413) --- layouts/_partials/head/core.html | 24 ++++++ .../head/helpers/GetDescription.html | 13 +++ layouts/_partials/head/helpers/GetImage.html | 8 ++ .../head/{extras.html => meta/app.html} | 0 layouts/_partials/head/{ => meta}/csp.html | 0 layouts/_partials/head/meta/params.html | 3 + layouts/_partials/head/meta/referrer.html | 7 ++ layouts/_partials/head/meta/search.html | 9 +++ layouts/_partials/head/meta/socials.html | 20 +++++ layouts/_partials/head/seo.html | 81 ------------------- layouts/baseof.html | 4 +- 11 files changed, 85 insertions(+), 84 deletions(-) create mode 100644 layouts/_partials/head/core.html create mode 100644 layouts/_partials/head/helpers/GetDescription.html create mode 100644 layouts/_partials/head/helpers/GetImage.html rename layouts/_partials/head/{extras.html => meta/app.html} (100%) rename layouts/_partials/head/{ => meta}/csp.html (100%) create mode 100644 layouts/_partials/head/meta/params.html create mode 100644 layouts/_partials/head/meta/referrer.html create mode 100644 layouts/_partials/head/meta/search.html create mode 100644 layouts/_partials/head/meta/socials.html delete mode 100644 layouts/_partials/head/seo.html diff --git a/layouts/_partials/head/core.html b/layouts/_partials/head/core.html new file mode 100644 index 000000000..d1b4657cd --- /dev/null +++ b/layouts/_partials/head/core.html @@ -0,0 +1,24 @@ +{{ $title := partial "head/helpers/GetTitle" . }} +{{ $description := partial "head/helpers/GetDescription" . }} +{{ $image := partial "head/helpers/GetImage" . }} + + +{{ $title }} + + +{{ partial "head/meta/socials.html" (dict + "title" $title + "description" $description + "image" $image + "url" .Permalink + "context" . +) }} +{{ partial "head/meta/search.html" (dict + "image" $image + "context" . +) }} + +{{ partial "head/meta/referrer.html" . }} +{{ partial "head/meta/csp.html" . }} +{{ partial "head/meta/app.html" . }} +{{ partial "head/meta/params.html" . }} \ No newline at end of file diff --git a/layouts/_partials/head/helpers/GetDescription.html b/layouts/_partials/head/helpers/GetDescription.html new file mode 100644 index 000000000..12cd4436f --- /dev/null +++ b/layouts/_partials/head/helpers/GetDescription.html @@ -0,0 +1,13 @@ +{{ $seoDescription := "" }} +{{ if .Params.meta_description }} + {{ $seoDescription = safeHTML .Params.meta_description }} +{{ else if .Params.summary }} + {{ $seoDescription = .Params.summary | plainify | truncate 150 }} +{{ else if .Params.contents }} + {{ range first 1 .Params.contents }} + {{ if .title }} + {{ $seoDescription = .title | safeHTML | truncate 150 }} + {{ end }} + {{ end }} +{{ end }} +{{ return $seoDescription }} \ No newline at end of file diff --git a/layouts/_partials/head/helpers/GetImage.html b/layouts/_partials/head/helpers/GetImage.html new file mode 100644 index 000000000..0a15121f0 --- /dev/null +++ b/layouts/_partials/head/helpers/GetImage.html @@ -0,0 +1,8 @@ +{{ $image := "" }} +{{ with index site.Data.website site.Language.Lang "default" "shared_image" }} + {{ $image = partial "GetMedia" (index . "id") }} +{{ end }} +{{ with or .Params.shared_image .Params.image }} + {{ $image = partial "GetMedia" .id }} +{{ end }} +{{ return $image }} \ No newline at end of file diff --git a/layouts/_partials/head/extras.html b/layouts/_partials/head/meta/app.html similarity index 100% rename from layouts/_partials/head/extras.html rename to layouts/_partials/head/meta/app.html diff --git a/layouts/_partials/head/csp.html b/layouts/_partials/head/meta/csp.html similarity index 100% rename from layouts/_partials/head/csp.html rename to layouts/_partials/head/meta/csp.html diff --git a/layouts/_partials/head/meta/params.html b/layouts/_partials/head/meta/params.html new file mode 100644 index 000000000..ddc1b4273 --- /dev/null +++ b/layouts/_partials/head/meta/params.html @@ -0,0 +1,3 @@ +{{ range .Params.metadata }} + +{{ end }} \ No newline at end of file diff --git a/layouts/_partials/head/meta/referrer.html b/layouts/_partials/head/meta/referrer.html new file mode 100644 index 000000000..5dac7ac9c --- /dev/null +++ b/layouts/_partials/head/meta/referrer.html @@ -0,0 +1,7 @@ +{{ if site.Params.seo.head_no_referrer }} + {{/* + Limiter le tracking par le CDN + https://framagit.org/chatons/CHATONS/-/issues/200#note_1987024 + */}} + +{{ end }} \ No newline at end of file diff --git a/layouts/_partials/head/meta/search.html b/layouts/_partials/head/meta/search.html new file mode 100644 index 000000000..582ebf8c4 --- /dev/null +++ b/layouts/_partials/head/meta/search.html @@ -0,0 +1,9 @@ +{{ if site.Params.search.active }} + {{ $image := partial "commons/image/helpers/GetUrl" (dict + "media" .image + "size" site.Params.image_sizes._default.pagefind + ) }} + {{ with $image }} + + {{ end }} +{{ end }} \ No newline at end of file diff --git a/layouts/_partials/head/meta/socials.html b/layouts/_partials/head/meta/socials.html new file mode 100644 index 000000000..ebfca2b61 --- /dev/null +++ b/layouts/_partials/head/meta/socials.html @@ -0,0 +1,20 @@ +{{ $image := partial "commons/image/helpers/GetUrl" (dict + "media" .image + "size" "1200" +) }} + + + +{{ with $image }} + +{{ end }} + + + + + + +{{ with $image }} + +{{ end }} + \ No newline at end of file diff --git a/layouts/_partials/head/seo.html b/layouts/_partials/head/seo.html deleted file mode 100644 index fada1eefa..000000000 --- a/layouts/_partials/head/seo.html +++ /dev/null @@ -1,81 +0,0 @@ -{{- $title := partial "head/helpers/GetTitle" . -}} - -{{- $seoDescription := "" -}} -{{- if .Params.meta_description -}} - {{- $seoDescription = safeHTML .Params.meta_description -}} -{{- else if .Params.summary -}} - {{- $seoDescription = .Params.summary | plainify | truncate 150 -}} -{{- else if .Params.contents -}} - {{- range first 1 .Params.contents -}} - {{- if .title -}} - {{- $seoDescription = .title | safeHTML | truncate 150 -}} - {{- end -}} - {{- end -}} -{{- end -}} - -{{- $sharedImage := "" -}} -{{- $ogImage := "" -}} -{{- $twitterImage := "" -}} -{{- $pagefindImage := "" -}} - -{{- with index site.Data.website site.Language.Lang "default" "shared_image" -}} - {{- $sharedImage = partial "GetMedia" (index . "id") -}} -{{- end -}} -{{- with or .Params.shared_image .Params.image }} - {{- $sharedImage = partial "GetMedia" .id -}} -{{ end -}} - -{{- with $sharedImage -}} - {{- $ogImage = partial "commons/image/helpers/GetUrl" (dict - "media" . - "size" "1200" - ) -}} - {{- $twitterImage = partial "commons/image/helpers/GetUrl" (dict - "media" . - "size" "1200" - ) -}} - {{- $pagefindImage = partial "commons/image/helpers/GetUrl" (dict - "media" . - "size" site.Params.image_sizes._default.pagefind - ) -}} -{{- end -}} -{{- $seoUrl := .Permalink -}} - - -{{ $title }} - - - - - -{{- with $ogImage }} - -{{ end -}} - - - - - - -{{- with $twitterImage }} - -{{ end -}} - - -{{ if site.Params.search.active }} - {{ with $pagefindImage }} - - {{ end }} -{{ end }} - -{{ range .Params.metadata }} - -{{ end }} - -{{ if site.Params.seo.head_no_referrer }} - {{/* - Limiter le tracking par le CDN - https://framagit.org/chatons/CHATONS/-/issues/200#note_1987024 - */}} - -{{ end }} diff --git a/layouts/baseof.html b/layouts/baseof.html index 80b3bf76f..07dcd8aaf 100644 --- a/layouts/baseof.html +++ b/layouts/baseof.html @@ -5,13 +5,11 @@ {{ partial "head/preconnect.html" . }} {{ partial "head/init.html" . }} - {{ partial "head/csp.html" }} {{ partial "head/css.html" }} - {{ partial "head/seo.html" . }} + {{ partial "head/core.html" . }} {{ partial "head/favicons.html" . }} {{ partial "head/rss.html" . }} {{ partial "head/script.html" . }} - {{ partial "head/extras.html" . }} {{- partial "header/accessibility.html" -}} From 48fecf7e98d553daada538cf762737d6cf06aa50 Mon Sep 17 00:00:00 2001 From: Alexis BENOIT Date: Fri, 20 Mar 2026 23:04:11 +0100 Subject: [PATCH 03/44] Rangement des organisations (#1415) --- .../layouts/map/helpers/GetTitle.html | 7 ++ .../partials/layouts/map/list.html | 28 ++++++ .../partials/layouts/map/map.html | 89 ++++--------------- .../partials/layouts/map/transcription.html | 30 +++++++ .../organizations/partials/organization.html | 60 +++---------- .../partials/organization/categories.html | 6 ++ .../partials/organization/heading.html | 19 ++++ .../organization/helpers/GetAttributes.html | 26 ++++++ .../partials/organization/summary.html | 5 ++ layouts/_partials/organizations/single.html | 13 +-- .../organizations/single/presentation.html | 6 ++ 11 files changed, 156 insertions(+), 133 deletions(-) create mode 100644 layouts/_partials/organizations/partials/layouts/map/helpers/GetTitle.html create mode 100644 layouts/_partials/organizations/partials/layouts/map/list.html create mode 100644 layouts/_partials/organizations/partials/layouts/map/transcription.html create mode 100644 layouts/_partials/organizations/partials/organization/categories.html create mode 100644 layouts/_partials/organizations/partials/organization/heading.html create mode 100644 layouts/_partials/organizations/partials/organization/helpers/GetAttributes.html create mode 100644 layouts/_partials/organizations/partials/organization/summary.html create mode 100644 layouts/_partials/organizations/single/presentation.html diff --git a/layouts/_partials/organizations/partials/layouts/map/helpers/GetTitle.html b/layouts/_partials/organizations/partials/layouts/map/helpers/GetTitle.html new file mode 100644 index 000000000..8d1333420 --- /dev/null +++ b/layouts/_partials/organizations/partials/layouts/map/helpers/GetTitle.html @@ -0,0 +1,7 @@ +{{ $title := "" }} +{{ if .title }} + {{ $title = .title }} +{{ else }} + {{ $title = printf "%s %s" (i18n "blocks.organizations.title") .html_id }} +{{ end }} +{{ return $title }} \ No newline at end of file diff --git a/layouts/_partials/organizations/partials/layouts/map/list.html b/layouts/_partials/organizations/partials/layouts/map/list.html new file mode 100644 index 000000000..c9ffc317d --- /dev/null +++ b/layouts/_partials/organizations/partials/layouts/map/list.html @@ -0,0 +1,28 @@ +{{ $options := .options }} +{{ $heading_level := .heading_level }} +{{ $title := partial "organizations/partials/layouts/map/helpers/GetTitle" . }} +{{ $aria_label := i18n "commons.maps.label" $title }} +
+ {{ if and .options.filters .categories }} + {{ partial "organizations/partials/layouts/map/filters-button.html" .html_id }} + {{ end }} + + {{- range .organizations }} + {{ with site.GetPage .path }} + {{ $address_geolocation := .Params.contact_details.postal_address.geolocation }} + {{ if $address_geolocation }} + {{ partial "organizations/partials/organization.html" (dict + "organization" . + "layout" "map" + "options" $options + "with_geolocation" true + "heading_level" $heading_level + ) }} + {{ end }} + {{ end }} + {{ end -}} +
\ No newline at end of file diff --git a/layouts/_partials/organizations/partials/layouts/map/map.html b/layouts/_partials/organizations/partials/layouts/map/map.html index 0b33c38e0..e7d4241a6 100644 --- a/layouts/_partials/organizations/partials/layouts/map/map.html +++ b/layouts/_partials/organizations/partials/layouts/map/map.html @@ -1,81 +1,24 @@ -{{ $logo_index := .logo_index }} -{{ $options := .options }} -{{ $layout := .layout }} -{{ $html_id := .html_id }} -{{ $id_transcription := printf "block-%s-transcription" $html_id }} {{ $heading_level := .heading_level | default 2 }} -{{ $categories := .categories }} - {{/* In map layout, all organization should have .path to get coordinates */}} {{ $organizations := where (default slice .organizations) "path" "ne" nil }} - {{ if $organizations }} -
-
- -
    - {{ range $organizations }} - {{ with site.GetPage .path }} - {{ $address_geolocation := .Params.contact_details.postal_address.geolocation }} - {{ if $address_geolocation }} -
  • - {{ partial "organizations/partials/organization.html" (dict - "organization" . - "options" (merge $options (dict - "address" true - "logo" false - )) - "layout" $layout - "heading_level" $heading_level - ) }} -
  • - {{ end }} - {{ end }} - {{ end }} -
-
-
- - {{ $title := "" }} - {{ if .title }} - {{ $title = .title }} - {{ else }} - {{ $title = printf "%s %s" (i18n "blocks.organizations.title") $html_id }} - {{ end }} - - {{ $aria_label := i18n "commons.maps.label" $title }} - - {{ if and $options.filters $categories }} + {{ partial "organizations/partials/layouts/map/transcription.html" (dict + "heading_level" $heading_level + "html_id" .html_id + "options" .options + "organizations" $organizations + ) }} + {{ if and .options.filters .categories }} {{ partial "organizations/partials/layouts/map/filters.html" ( dict - "categories" $categories - "html_id" $html_id + "categories" .categories + "html_id" .html_id ) }} {{ end }} - -
- {{ if and $options.filters $categories }} - {{ partial "organizations/partials/layouts/map/filters-button.html" $html_id }} - {{ end }} - - {{- range $organizations }} - {{ with site.GetPage .path }} - {{ $address_geolocation := .Params.contact_details.postal_address.geolocation }} - {{ if $address_geolocation }} - {{ partial "organizations/partials/organization.html" (dict - "organization" . - "layout" $layout - "options" $options - "with_geolocation" true - "heading_level" $heading_level - ) }} - {{ end }} - {{ end }} - {{ end -}} -
+ {{ partial "organizations/partials/layouts/map/list.html" (dict + "categories" .categories + "heading_level" $heading_level + "html_id" .html_id + "options" .options + "organizations" $organizations + ) }} {{ end }} \ No newline at end of file diff --git a/layouts/_partials/organizations/partials/layouts/map/transcription.html b/layouts/_partials/organizations/partials/layouts/map/transcription.html new file mode 100644 index 000000000..0f960d626 --- /dev/null +++ b/layouts/_partials/organizations/partials/layouts/map/transcription.html @@ -0,0 +1,30 @@ +{{ $id_transcription := printf "block-%s-transcription" .html_id }} +{{ $options := .options }} +{{ $heading_level := .heading_level }} +
+
+ +
    + {{ range .organizations }} + {{ with site.GetPage .path }} + {{ $address_geolocation := .Params.contact_details.postal_address.geolocation }} + {{ if $address_geolocation }} +
  • + {{ partial "organizations/partials/organization.html" (dict + "organization" . + "options" (merge $options (dict + "address" true + "logo" false + )) + "layout" "map" + "heading_level" $heading_level + ) }} +
  • + {{ end }} + {{ end }} + {{ end }} +
+
+
\ No newline at end of file diff --git a/layouts/_partials/organizations/partials/organization.html b/layouts/_partials/organizations/partials/organization.html index 90fceaef7..40c493b57 100644 --- a/layouts/_partials/organizations/partials/organization.html +++ b/layouts/_partials/organizations/partials/organization.html @@ -1,59 +1,23 @@ {{ $options := .options | default site.Params.organizations.index.options }} {{ $layout := .layout }} -{{ $organization := .organization }} {{ $heading_level := .heading_level | default 2 }} -{{ $heading_tag := partial "GetHeadingTag" (dict - "level" $heading_level - "attributes" "class='organization-title' itemprop='name'" -) }} -{{ $with_geolocation := .with_geolocation | default false }} - -{{ with $organization }} - {{ $title := safeHTML .Title }} -
+{{ $attributes := partial "organizations/partials/organization/helpers/GetAttributes" . }} +{{ with .organization }} +
- {{ $heading_tag.open }} - {{- if $options.link -}} - - {{- end -}} - {{ $title }} - {{- if $options.link -}} - - {{- end -}} - {{ $heading_tag.close }} - - {{ if and $options.summary .Params.summary }} -
- {{ safeHTML .Params.summary }} -
+ {{ partial "organizations/partials/organization/heading.html" (dict + "heading_level" $heading_level + "organization" . + "options" $options + ) }} + {{ if $options.summary }} + {{ partial "organizations/partials/organization/summary.html" . }} {{ end }} - {{ if and $options.address .Params.contact_details }} {{ partial "commons/address.html" .Params.contact_details.postal_address }} {{ end }} - - {{ if and $options.categories .Params.organizations_categories }} - {{ partial "commons/categories.html" (dict - "context" . - "kind" "organization" - ) }} + {{ if $options.categories }} + {{ partial "organizations/partials/organization/categories.html" . }} {{ end }}
{{ if $options.logo }} diff --git a/layouts/_partials/organizations/partials/organization/categories.html b/layouts/_partials/organizations/partials/organization/categories.html new file mode 100644 index 000000000..156f5e296 --- /dev/null +++ b/layouts/_partials/organizations/partials/organization/categories.html @@ -0,0 +1,6 @@ +{{ if .Params.organizations_categories }} + {{ partial "commons/categories.html" (dict + "context" . + "kind" "organization" + ) }} +{{ end }} \ No newline at end of file diff --git a/layouts/_partials/organizations/partials/organization/heading.html b/layouts/_partials/organizations/partials/organization/heading.html new file mode 100644 index 000000000..dcd06dcce --- /dev/null +++ b/layouts/_partials/organizations/partials/organization/heading.html @@ -0,0 +1,19 @@ +{{ $heading_tag := partial "GetHeadingTag" (dict + "level" .heading_level + "attributes" "class='organization-title' itemprop='name'" +) }} +{{ $heading_tag.open }} + {{ if .options.link }} + + {{ end }} + {{- .organization.Title -}} + {{ if .options.link }} + + {{ end }} +{{ $heading_tag.close }} \ No newline at end of file diff --git a/layouts/_partials/organizations/partials/organization/helpers/GetAttributes.html b/layouts/_partials/organizations/partials/organization/helpers/GetAttributes.html new file mode 100644 index 000000000..4b61d1486 --- /dev/null +++ b/layouts/_partials/organizations/partials/organization/helpers/GetAttributes.html @@ -0,0 +1,26 @@ +{{ $attributes := "" }} +{{ $organization := .organization }} +{{ $options := .options }} +{{ $with_geolocation := eq .layout "map" }} + +{{ $title := $organization.Title }} +{{ $geolocation := $organization.Params.contact_details.postal_address.geolocation }} +{{ if $with_geolocation }} + {{ with $geolocation }} + {{ $attributes = printf "data-title=\"%s\"" $title }} + {{ with .longitude }} + {{ $attributes = printf "%s data-longitude=\"%f\"" $attributes . }} + {{ end }} + {{ with .latitude }} + {{ $attributes = printf "%s data-latitude=\"%f\"" $attributes . }} + {{ end }} + {{ end }} +{{ end }} + +{{ if and $options.filters $organization.Params.organizations_categories }} + {{ $categories := partial "organizations/helpers/GetCategoriesSlug" $organization }} + {{ $categories = $categories | encoding.Jsonify }} + {{ $attributes = printf "%s data-filters=\"%q\"" $attributes $categories }} +{{ end }} + +{{ return $attributes }} \ No newline at end of file diff --git a/layouts/_partials/organizations/partials/organization/summary.html b/layouts/_partials/organizations/partials/organization/summary.html new file mode 100644 index 000000000..9a0a0ced7 --- /dev/null +++ b/layouts/_partials/organizations/partials/organization/summary.html @@ -0,0 +1,5 @@ +{{ with .Params.summary }} +
+ {{ safeHTML . }} +
+{{ end }} \ No newline at end of file diff --git a/layouts/_partials/organizations/single.html b/layouts/_partials/organizations/single.html index 46e1c0340..410d135bd 100644 --- a/layouts/_partials/organizations/single.html +++ b/layouts/_partials/organizations/single.html @@ -1,29 +1,18 @@ {{ partial "organizations/single/hero.html" . }}
- {{ partial "toc/container.html" (dict "context" . ) }} -
-
{{ partial "organizations/single/summary.html" (dict "context" . ) }} - - {{ if (partial "helpers/text/GetFromHTML" .Params.text) }} -
- {{ safeHTML .Params.text }} -
- {{ end }} - + {{ partial "organizations/single/presentation.html" . }} {{ partial "taxonomies/single/container.html" . }} - {{ partial "commons/contact-details.html" (dict "subject" .) }}
- {{ partial "organizations/partials/logo.html" . }}
diff --git a/layouts/_partials/organizations/single/presentation.html b/layouts/_partials/organizations/single/presentation.html new file mode 100644 index 000000000..22f9a5d1e --- /dev/null +++ b/layouts/_partials/organizations/single/presentation.html @@ -0,0 +1,6 @@ +{{ $text := partial "helpers/text/GetFromHTML" .Params.text }} +{{ with $text }} +
+ {{ safeHTML . }} +
+{{ end }} \ No newline at end of file From ae496c47109beb243525e5a92d029e5149aad2ba Mon Sep 17 00:00:00 2001 From: Alexis BENOIT Date: Mon, 23 Mar 2026 10:09:56 +0100 Subject: [PATCH 04/44] Petit rangement d'un partiel event (#1420) Co-authored-by: Arnaud Levy --- bin/osuny.js | 29 ++++++++++--------- layouts/_partials/blocks/templates/pages.html | 9 +++--- .../agenda/{ => dates}/dropdown-calendar.html | 0 .../commons/agenda/dates/primary.html | 6 +--- .../commons/agenda/dates/timeslots.html | 2 +- 5 files changed, 22 insertions(+), 24 deletions(-) rename layouts/_partials/commons/agenda/{ => dates}/dropdown-calendar.html (100%) diff --git a/bin/osuny.js b/bin/osuny.js index e027e7964..abbeece81 100644 --- a/bin/osuny.js +++ b/bin/osuny.js @@ -5,20 +5,21 @@ const shell = require("shelljs"), migrate = require("./migrate/migrate"); shell.set('-e'); // exit upon first error -console.log(` - .=*#%%#*= -*#%%#*=. =+- ++. .+ .+#%%#+. :++ -+- - :@@=:..:+@@. #@#:..:+@@. *@* @@: -@#@+:..-@@- -@@ *@* - +@* %@= .@@. %@= *@* @@: -@@. *@* -@@ *@* - +@* %@= %@* *%= *@* @@: -@@ *@* -@@ *@* - +@* %@= +@@= *@* @@: -@@ *@* -@@ *@* - +@* %@= .+@@+. *@* @@: -@@ *@* -@@ *@* - +@* %@= .+@@+. *@* @@: -@@ *@* .@@=. :@@= - +@* %@= == +@@: *@* @@: -@@ *@* .+%@@@@%*- - +@* %@= .@@. +@# *@* .@@: -@@ *@* @@- - =@% .@@- @@- #@# +@# :#@@: -@@ *@* @@- - =%@%##%@%= :#@%##%@@* *@@##@%=:@: :@@ *@+ %@- - .:.. ..:. ... - `); +console.log(` + +**= ++***++ =*= **= =++ +***++ =**+ =*+= + +*#%@@%#**+ *###**#%%#+ *%* #@%* *@%####*#%%#+ +%%%+ #@%+ +=#%%#*+ #+#%%#= #@%# +**+- *%* *%%* *%%%#= +%%%+ *%%# *%@# +*%%* +%%* #@%# *%* *%@* *%%+ #@%* *%%* +%%% +*%# #@* *%@%#*****+ *%* *%%* *%# +%@* #@%* #%%* +*@# #%* %#*+*+#%%#- *%* +@%* *%* *%%* %%%* *%%* ++%%+ *%%+ =#%% %%@+ *%# #@%* *%* *%%* #%%%#%@# + #%%#*+ #*#%%* =%@%# +%%%+ +%%#*+ +#%%@+ *%* *%@* *%@%@%= + +**#%@@%#*+ *#%%#*#%%#+ +#%%%###%%@@* *%* #@%* #%@%* + =**= +#+***+ +***+ **= =*= **= #%@# + %%% + +*#%%%# + =+***+ +`); const command = process.argv[2]; diff --git a/layouts/_partials/blocks/templates/pages.html b/layouts/_partials/blocks/templates/pages.html index ee0466217..6c86a3699 100644 --- a/layouts/_partials/blocks/templates/pages.html +++ b/layouts/_partials/blocks/templates/pages.html @@ -1,6 +1,7 @@ {{ $block_class := partial "blocks/helpers/GetClass" .block }} -{{ if .block.data }} - {{ $layout := .block.data.layout | default "grid" }} +{{ $block := .block }} +{{ with .block.data }} + {{ $layout := .layout | default "grid" }} {{ $page_class := "" }} {{ $page := "" }} {{ with .page }} @@ -17,10 +18,10 @@
- {{ partial "blocks/top.html" .block.top }} + {{ partial "blocks/top.html" $block.top }} {{ partial (printf "pages/partials/layouts/%s/%s.html" $layout $layout) (dict "pages" .pages - "heading_level" .block.ranks.children + "heading_level" $block.ranks.children "options" .options ) }}
diff --git a/layouts/_partials/commons/agenda/dropdown-calendar.html b/layouts/_partials/commons/agenda/dates/dropdown-calendar.html similarity index 100% rename from layouts/_partials/commons/agenda/dropdown-calendar.html rename to layouts/_partials/commons/agenda/dates/dropdown-calendar.html diff --git a/layouts/_partials/commons/agenda/dates/primary.html b/layouts/_partials/commons/agenda/dates/primary.html index 7ddd58393..cd1f3f100 100644 --- a/layouts/_partials/commons/agenda/dates/primary.html +++ b/layouts/_partials/commons/agenda/dates/primary.html @@ -1,8 +1,4 @@ {{ $is_repeating := gt .Params.time_slots 1 }} -{{ $multiple_dates_event := ne .Params.dates.from.day .Params.dates.to.day }} -{{ $is_parent := .Params.children }} -{{ $is_simple_event := and .Params.dates (not .Params.time_slots) }} -
{{ .Params.dates.computed.long }} {{ if $is_repeating }} @@ -13,7 +9,7 @@ {{ end }} {{ with .Params.dates }} {{ if ne .status "archive" }} - {{ partial "commons/agenda/dropdown-calendar.html" (dict + {{ partial "commons/agenda/dates/dropdown-calendar.html" (dict "index" "primary" "calendar_links" .add_to_calendar ) }} diff --git a/layouts/_partials/commons/agenda/dates/timeslots.html b/layouts/_partials/commons/agenda/dates/timeslots.html index 40e71c990..ba70d0582 100644 --- a/layouts/_partials/commons/agenda/dates/timeslots.html +++ b/layouts/_partials/commons/agenda/dates/timeslots.html @@ -19,7 +19,7 @@ {{ . }} {{ end }} {{ if ne .status "archive" }} - {{ partial "commons/agenda/dropdown-calendar.html" (dict + {{ partial "commons/agenda/dates/dropdown-calendar.html" (dict "index" $index "calendar_links" $time_slot.add_to_calendar ) }} From c60645326fcc9fa248df4dcd8a1af680d2c299de Mon Sep 17 00:00:00 2001 From: Alexis BENOIT Date: Mon, 23 Mar 2026 13:52:02 +0100 Subject: [PATCH 05/44] Rangement du partiel de partage (#1423) --- layouts/_partials/commons/share/links.html | 63 +++++-------------- .../_partials/commons/share/links/email.html | 9 +++ .../commons/share/links/facebook.html | 9 +++ .../commons/share/links/linkedin.html | 9 +++ .../commons/share/links/mastodon.html | 9 +++ .../commons/share/links/telegram.html | 9 +++ .../commons/share/links/twitter.html | 9 +++ .../commons/share/links/whatsapp.html | 9 +++ 8 files changed, 80 insertions(+), 46 deletions(-) create mode 100644 layouts/_partials/commons/share/links/email.html create mode 100644 layouts/_partials/commons/share/links/facebook.html create mode 100644 layouts/_partials/commons/share/links/linkedin.html create mode 100644 layouts/_partials/commons/share/links/mastodon.html create mode 100644 layouts/_partials/commons/share/links/telegram.html create mode 100644 layouts/_partials/commons/share/links/twitter.html create mode 100644 layouts/_partials/commons/share/links/whatsapp.html diff --git a/layouts/_partials/commons/share/links.html b/layouts/_partials/commons/share/links.html index 575de9e82..1dda1e7f8 100644 --- a/layouts/_partials/commons/share/links.html +++ b/layouts/_partials/commons/share/links.html @@ -1,59 +1,30 @@ {{/* Use general configuration */}} -{{ $share_options := site.Params.share_links }} - +{{ $options := site.Params.share_links }} {{/* Use Section configuration if it exists */}} {{ with index (index site.Params .Section) "share_links" }} - {{ $share_options = . }} + {{ $options = . }} {{ end }} + \ No newline at end of file diff --git a/layouts/_partials/commons/share/links/email.html b/layouts/_partials/commons/share/links/email.html new file mode 100644 index 000000000..85a6f1c5a --- /dev/null +++ b/layouts/_partials/commons/share/links/email.html @@ -0,0 +1,9 @@ +
  • + + {{ i18n "commons.share_on_aria" (dict "Title" "E-mail") }} + +
  • \ No newline at end of file diff --git a/layouts/_partials/commons/share/links/facebook.html b/layouts/_partials/commons/share/links/facebook.html new file mode 100644 index 000000000..517a5a812 --- /dev/null +++ b/layouts/_partials/commons/share/links/facebook.html @@ -0,0 +1,9 @@ +
  • + + {{ i18n "commons.share_on_aria" (dict "Title" "Facebook") }} + +
  • diff --git a/layouts/_partials/commons/share/links/linkedin.html b/layouts/_partials/commons/share/links/linkedin.html new file mode 100644 index 000000000..45f2c837d --- /dev/null +++ b/layouts/_partials/commons/share/links/linkedin.html @@ -0,0 +1,9 @@ +
  • + + {{ i18n "commons.share_on_aria" (dict "Title" "Linkedin") }} + +
  • \ No newline at end of file diff --git a/layouts/_partials/commons/share/links/mastodon.html b/layouts/_partials/commons/share/links/mastodon.html new file mode 100644 index 000000000..1feae3391 --- /dev/null +++ b/layouts/_partials/commons/share/links/mastodon.html @@ -0,0 +1,9 @@ +
  • + + {{ i18n "commons.share_on_aria" (dict "Title" "Mastodon") }} + +
  • \ No newline at end of file diff --git a/layouts/_partials/commons/share/links/telegram.html b/layouts/_partials/commons/share/links/telegram.html new file mode 100644 index 000000000..e2fc9e550 --- /dev/null +++ b/layouts/_partials/commons/share/links/telegram.html @@ -0,0 +1,9 @@ +
  • + + {{ i18n "commons.share_on_aria" (dict "Title" "Telegram") }} + +
  • \ No newline at end of file diff --git a/layouts/_partials/commons/share/links/twitter.html b/layouts/_partials/commons/share/links/twitter.html new file mode 100644 index 000000000..790eb3864 --- /dev/null +++ b/layouts/_partials/commons/share/links/twitter.html @@ -0,0 +1,9 @@ +
  • + + {{ i18n "commons.share_on_aria" (dict "Title" "Twitter") }} + +
  • \ No newline at end of file diff --git a/layouts/_partials/commons/share/links/whatsapp.html b/layouts/_partials/commons/share/links/whatsapp.html new file mode 100644 index 000000000..7d1297a3f --- /dev/null +++ b/layouts/_partials/commons/share/links/whatsapp.html @@ -0,0 +1,9 @@ +
  • + + {{ i18n "commons.share_on_aria" (dict "Title" "Whatsapp") }} + +
  • \ No newline at end of file From 1771f1c8b906db87e13949e9303c659bbf1497ca Mon Sep 17 00:00:00 2001 From: Alexis BENOIT Date: Mon, 23 Mar 2026 18:11:06 +0100 Subject: [PATCH 06/44] Rangement des posts (#1425) --- assets/sass/_theme/blocks/posts.sass | 19 ++---- layouts/_partials/head/preconnect.html | 4 +- .../partials/layouts/highlight/highlight.html | 59 +++------------- .../posts/partials/layouts/list/list.html | 2 +- layouts/_partials/posts/partials/post.html | 67 +++---------------- .../_partials/posts/partials/post/author.html | 10 --- .../_partials/posts/partials/post/core.html | 22 ++++++ .../posts/partials/post/core/categories.html | 4 ++ .../partials/post/{ => core}/federated.html | 0 .../partials/post/{ => core}/heading.html | 0 .../posts/partials/post/core/meta.html | 13 ++++ .../posts/partials/post/core/meta/author.html | 10 +++ .../posts/partials/post/core/meta/date.html | 3 + .../partials/post/core/meta/reading-time.html | 5 ++ .../posts/partials/post/{ => core}/more.html | 0 .../posts/partials/post/core/summary.html | 8 +++ .../posts/partials/post/helpers/GetClass.html | 13 ++++ .../posts/partials/post/reading-time.html | 3 - 18 files changed, 106 insertions(+), 136 deletions(-) delete mode 100644 layouts/_partials/posts/partials/post/author.html create mode 100644 layouts/_partials/posts/partials/post/core.html create mode 100644 layouts/_partials/posts/partials/post/core/categories.html rename layouts/_partials/posts/partials/post/{ => core}/federated.html (100%) rename layouts/_partials/posts/partials/post/{ => core}/heading.html (100%) create mode 100644 layouts/_partials/posts/partials/post/core/meta.html create mode 100644 layouts/_partials/posts/partials/post/core/meta/author.html create mode 100644 layouts/_partials/posts/partials/post/core/meta/date.html create mode 100644 layouts/_partials/posts/partials/post/core/meta/reading-time.html rename layouts/_partials/posts/partials/post/{ => core}/more.html (100%) create mode 100644 layouts/_partials/posts/partials/post/core/summary.html create mode 100644 layouts/_partials/posts/partials/post/helpers/GetClass.html delete mode 100644 layouts/_partials/posts/partials/post/reading-time.html diff --git a/assets/sass/_theme/blocks/posts.sass b/assets/sass/_theme/blocks/posts.sass index 688a9fd31..d39f998e0 100644 --- a/assets/sass/_theme/blocks/posts.sass +++ b/assets/sass/_theme/blocks/posts.sass @@ -50,22 +50,15 @@ width: columns(5) .list article - flex-direction: row - gap: var(--grid-gutter) .post-content width: columns(6) - .post-meta - margin-top: 0 - text-align: right - width: columns(2) - > * - display: block + .post-date + position: absolute + right: 0 + top: 0 + + * &::before - content: none - padding: 0 - [itemprop="abstract"] - grid-column: 1 / 7 - order: 3 + display: none @include in-page-without-sidebar .highlight diff --git a/layouts/_partials/head/preconnect.html b/layouts/_partials/head/preconnect.html index ed253052a..cbd1c6d79 100644 --- a/layouts/_partials/head/preconnect.html +++ b/layouts/_partials/head/preconnect.html @@ -1,3 +1,3 @@ -{{ if site.Params.keycdn }} - +{{ with site.Params.keycdn }} + {{ end }} \ No newline at end of file diff --git a/layouts/_partials/posts/partials/layouts/highlight/highlight.html b/layouts/_partials/posts/partials/layouts/highlight/highlight.html index 46c431655..09c77e461 100644 --- a/layouts/_partials/posts/partials/layouts/highlight/highlight.html +++ b/layouts/_partials/posts/partials/layouts/highlight/highlight.html @@ -1,11 +1,8 @@ {{ $options := .options }} {{ $heading_level := .heading_level | default 3 }} -
      {{ $highlight := index .posts 0 }} {{ $highlight = site.GetPage $highlight.path }} - {{ $list := .posts }} - {{ with $highlight }} {{ partial "posts/partials/post.html" (dict "post" . @@ -14,59 +11,21 @@ "layout" "highlight" ) }} {{ end }} - - {{ with $list }} - {{ $first := true }} + {{ with .posts }} + {{ $options = merge $options ( dict "image" false ) }}
      • {{ range after 1 . }} {{ with site.GetPage .path }} - {{ $reading_time := .Params.contents_reading_time }} -
      • -
        -
        - {{ partial "posts/partials/post/heading.html" (dict - "item" . - "options" $options - "level" $heading_level - "itemprop" "headline" - ) }} - - {{ if and $options.summary .Params.summary }} - {{ partial "commons/summary/helpers/GetTruncated" (dict - "summary" .Params.summary - "kind" "posts" - ) }} - {{ end }} - - {{ if $options.categories }} - {{ partial "commons/categories.html" (dict - "context" . - "kind" "post" - ) }} - {{ end }} - - {{ if and $reading_time $options.reading_time }} - {{ partial "posts/partials/post/reading-time.html" $reading_time }} - {{ end }} -
        - - {{- if or $options.author $options.date -}} - - {{ end }} -
        -
      • + {{ partial "posts/partials/post.html" (dict + "post" . + "heading_level" $heading_level + "options" $options + "layout" "list" + ) }} {{ end }} {{ end }}
    • {{ end }} -
    - + \ No newline at end of file diff --git a/layouts/_partials/posts/partials/layouts/list/list.html b/layouts/_partials/posts/partials/layouts/list/list.html index bbe4fc19a..56924ddb1 100644 --- a/layouts/_partials/posts/partials/layouts/list/list.html +++ b/layouts/_partials/posts/partials/layouts/list/list.html @@ -3,7 +3,7 @@ {{ $options := .options }}
      - {{ range $post := .posts -}} + {{ range $post := .posts }} {{ with site.GetPage .path }} {{ partial "posts/partials/post.html" (dict "post" . diff --git a/layouts/_partials/posts/partials/post.html b/layouts/_partials/posts/partials/post.html index c73c1e004..8bc5a4be6 100644 --- a/layouts/_partials/posts/partials/post.html +++ b/layouts/_partials/posts/partials/post.html @@ -6,66 +6,19 @@ {{ $heading_level := .heading_level }} {{ with $post }} - {{ $post_class := "post" }} - {{ $reading_time := .Params.contents_reading_time }} - {{ if and .Params.image $options.image }} - {{ $direction = partial "commons/image/helpers/GetDirection" .Params.image }} - {{ $post_class = printf "%s %s" $post_class $direction }} - {{ else }} - {{ $post_class = printf "%s %s" $post_class "without-image" }} - {{ end }} - {{ if .Params.federation.active }} - {{ $post_class = printf "%s is-federated" $post_class }} - {{ end }} - + {{ $post_class := partial "posts/partials/post/helpers/GetClass" (dict + "options" $options + "context" . + ) }}
    • -
      - {{ partial "posts/partials/post/heading.html" (dict - "item" . - "options" $options - "level" $heading_level - "itemprop" "headline" - ) }} - - {{ partial "posts/partials/post/federated.html" . }} - - {{ if and $options.summary .Params.summary }} -
      - {{ partial "commons/summary/helpers/GetTruncated" ( dict - "summary" .Params.summary - "kind" "posts" - ) }} -
      - {{- end -}} - - {{ if $options.categories }} - {{ partial "commons/categories.html" ( dict - "context" . - "kind" "post" - ) }} - {{ end }} - - {{ if or $options.author $options.date $options.reading_time }} - - {{ end }} - - {{ if $options.with_more }} - {{ partial "posts/partials/post/more.html" . }} - {{ end }} -
      + {{ partial "posts/partials/post/core.html" (dict + "heading_level" $heading_level + "options" $options + "context" . + ) }} {{ if $options.image }} - {{ partial "posts/partials/post/media.html" (dict + {{ partial "posts/partials/post/media.html" (dict "image" .Params.image "layout" $layout ) }} diff --git a/layouts/_partials/posts/partials/post/author.html b/layouts/_partials/posts/partials/post/author.html deleted file mode 100644 index f3b1b053d..000000000 --- a/layouts/_partials/posts/partials/post/author.html +++ /dev/null @@ -1,10 +0,0 @@ -{{- range .GetTerms "authors" -}} - {{- $person := site.GetPage (printf "/persons/%s" .Slug) -}} - {{- with $person -}} - - {{- end -}} -{{- end -}} \ No newline at end of file diff --git a/layouts/_partials/posts/partials/post/core.html b/layouts/_partials/posts/partials/post/core.html new file mode 100644 index 000000000..0e907cbcc --- /dev/null +++ b/layouts/_partials/posts/partials/post/core.html @@ -0,0 +1,22 @@ +
      + {{ partial "posts/partials/post/core/heading.html" (dict + "item" .context + "options" .options + "level" .heading_level + "itemprop" "headline" + ) }} + {{ partial "posts/partials/post/core/federated.html" .context }} + {{ if .options.summary }} + {{ partial "posts/partials/post/core/summary.html" .context }} + {{- end -}} + {{ if .options.categories }} + {{ partial "posts/partials/post/core/categories.html" .context }} + {{ end }} + {{ partial "posts/partials/post/core/meta.html" (dict + "options" .options + "context" .context + ) }} + {{ if .options.with_more }} + {{ partial "posts/partials/post/core/more.html" .context }} + {{ end }} +
      diff --git a/layouts/_partials/posts/partials/post/core/categories.html b/layouts/_partials/posts/partials/post/core/categories.html new file mode 100644 index 000000000..d47b568f5 --- /dev/null +++ b/layouts/_partials/posts/partials/post/core/categories.html @@ -0,0 +1,4 @@ +{{ partial "commons/categories.html" ( dict + "context" . + "kind" "post" +) }} \ No newline at end of file diff --git a/layouts/_partials/posts/partials/post/federated.html b/layouts/_partials/posts/partials/post/core/federated.html similarity index 100% rename from layouts/_partials/posts/partials/post/federated.html rename to layouts/_partials/posts/partials/post/core/federated.html diff --git a/layouts/_partials/posts/partials/post/heading.html b/layouts/_partials/posts/partials/post/core/heading.html similarity index 100% rename from layouts/_partials/posts/partials/post/heading.html rename to layouts/_partials/posts/partials/post/core/heading.html diff --git a/layouts/_partials/posts/partials/post/core/meta.html b/layouts/_partials/posts/partials/post/core/meta.html new file mode 100644 index 000000000..18e90f406 --- /dev/null +++ b/layouts/_partials/posts/partials/post/core/meta.html @@ -0,0 +1,13 @@ +{{ if or .options.author .options.date .options.reading_time }} + +{{ end }} \ No newline at end of file diff --git a/layouts/_partials/posts/partials/post/core/meta/author.html b/layouts/_partials/posts/partials/post/core/meta/author.html new file mode 100644 index 000000000..bbe2d1d85 --- /dev/null +++ b/layouts/_partials/posts/partials/post/core/meta/author.html @@ -0,0 +1,10 @@ +{{ range .GetTerms "authors" }} + {{ $person := site.GetPage (printf "/persons/%s" .Slug) }} + {{ with $person }} + + {{ end }} +{{ end }} \ No newline at end of file diff --git a/layouts/_partials/posts/partials/post/core/meta/date.html b/layouts/_partials/posts/partials/post/core/meta/date.html new file mode 100644 index 000000000..d3d8689f5 --- /dev/null +++ b/layouts/_partials/posts/partials/post/core/meta/date.html @@ -0,0 +1,3 @@ + diff --git a/layouts/_partials/posts/partials/post/core/meta/reading-time.html b/layouts/_partials/posts/partials/post/core/meta/reading-time.html new file mode 100644 index 000000000..5723645dc --- /dev/null +++ b/layouts/_partials/posts/partials/post/core/meta/reading-time.html @@ -0,0 +1,5 @@ +{{ with .Params.contents_reading_time }} + + {{- i18n "posts.reading_time" }} : {{ partial "helpers/text/GetFromHTML" .text -}} + +{{ end }} \ No newline at end of file diff --git a/layouts/_partials/posts/partials/post/more.html b/layouts/_partials/posts/partials/post/core/more.html similarity index 100% rename from layouts/_partials/posts/partials/post/more.html rename to layouts/_partials/posts/partials/post/core/more.html diff --git a/layouts/_partials/posts/partials/post/core/summary.html b/layouts/_partials/posts/partials/post/core/summary.html new file mode 100644 index 000000000..ea8b1493a --- /dev/null +++ b/layouts/_partials/posts/partials/post/core/summary.html @@ -0,0 +1,8 @@ +{{ with .Params.summary }} +
      + {{ partial "commons/summary/helpers/GetTruncated" (dict + "summary" . + "kind" "posts" + ) }} +
      +{{ end }} \ No newline at end of file diff --git a/layouts/_partials/posts/partials/post/helpers/GetClass.html b/layouts/_partials/posts/partials/post/helpers/GetClass.html new file mode 100644 index 000000000..c5595dd86 --- /dev/null +++ b/layouts/_partials/posts/partials/post/helpers/GetClass.html @@ -0,0 +1,13 @@ +{{ $post_class := "post" }} + +{{ if and .context.Params.image .options.image }} + {{ $direction := partial "commons/image/helpers/GetDirection" .context.Params.image }} + {{ $post_class = printf "%s %s" $post_class $direction }} +{{ else }} + {{ $post_class = printf "%s %s" $post_class "without-image" }} +{{ end }} +{{ if .context.Params.federation.active }} + {{ $post_class = printf "%s is-federated" $post_class }} +{{ end }} + +{{ return $post_class }} \ No newline at end of file diff --git a/layouts/_partials/posts/partials/post/reading-time.html b/layouts/_partials/posts/partials/post/reading-time.html deleted file mode 100644 index 721a752b7..000000000 --- a/layouts/_partials/posts/partials/post/reading-time.html +++ /dev/null @@ -1,3 +0,0 @@ - - {{- i18n "posts.reading_time" }} : {{ partial "helpers/text/GetFromHTML" .text -}} - \ No newline at end of file From 73f57f686f8137cfb78f56b02e2efe473db25ff4 Mon Sep 17 00:00:00 2001 From: Olivia Simonet <91660674+Olivia206@users.noreply.github.com> Date: Mon, 23 Mar 2026 18:12:33 +0100 Subject: [PATCH 07/44] Sidebar des articles (#1422) Co-authored-by: Alexis BENOIT --- hugo.yaml | 5 ++ layouts/_partials/papers/single/sidebar.html | 62 +------------------ .../papers/single/sidebar/informations.html | 4 ++ .../single/sidebar/informations/dates.html | 20 ++++++ .../single/sidebar/informations/keywords.html | 6 ++ .../single/sidebar/informations/language.html | 4 ++ .../single/sidebar/informations/type.html | 4 ++ .../papers/single/{ => sidebar}/toc.html | 0 .../papers/single/sidebar/volumes.html | 17 +++++ 9 files changed, 63 insertions(+), 59 deletions(-) create mode 100644 layouts/_partials/papers/single/sidebar/informations.html create mode 100644 layouts/_partials/papers/single/sidebar/informations/dates.html create mode 100644 layouts/_partials/papers/single/sidebar/informations/keywords.html create mode 100644 layouts/_partials/papers/single/sidebar/informations/language.html create mode 100644 layouts/_partials/papers/single/sidebar/informations/type.html rename layouts/_partials/papers/single/{ => sidebar}/toc.html (100%) create mode 100644 layouts/_partials/papers/single/sidebar/volumes.html diff --git a/hugo.yaml b/hugo.yaml index dc90825d9..41b1bc17c 100644 --- a/hugo.yaml +++ b/hugo.yaml @@ -751,6 +751,11 @@ params: mobile: 400 tablet: 800 desktop: 750 + sidebar: + volume: + mobile: 327 + tablet: 720 + desktop: 255 persons: hero: mobile: 400 diff --git a/layouts/_partials/papers/single/sidebar.html b/layouts/_partials/papers/single/sidebar.html index 61045e35b..cd1a7ef38 100644 --- a/layouts/_partials/papers/single/sidebar.html +++ b/layouts/_partials/papers/single/sidebar.html @@ -3,70 +3,14 @@ {{ partial "toc/container.html" (dict - "toc" ( partial "papers/single/toc.html" . ) + "toc" ( partial "papers/single/sidebar/toc.html" . ) "context" . ) }}
    diff --git a/layouts/_partials/papers/single/sidebar/informations.html b/layouts/_partials/papers/single/sidebar/informations.html new file mode 100644 index 000000000..d74237a8a --- /dev/null +++ b/layouts/_partials/papers/single/sidebar/informations.html @@ -0,0 +1,4 @@ +{{ partial "papers/single/sidebar/informations/type.html" . }} +{{ partial "papers/single/sidebar/informations/keywords.html" . }} +{{ partial "papers/single/sidebar/informations/language.html" . }} +{{ partial "papers/single/sidebar/informations/dates.html" . }} \ No newline at end of file diff --git a/layouts/_partials/papers/single/sidebar/informations/dates.html b/layouts/_partials/papers/single/sidebar/informations/dates.html new file mode 100644 index 000000000..a67cd941b --- /dev/null +++ b/layouts/_partials/papers/single/sidebar/informations/dates.html @@ -0,0 +1,20 @@ +{{ with .Params.dates.published }} +
    {{ i18n "papers.dates.published" }}
    +
    + +
    +{{ end }} + +{{ with .Params.dates.accepted }} +
    {{ i18n "papers.dates.accepted" }}
    +
    + +
    +{{ end }} + +{{ with .Params.dates.received }} +
    {{ i18n "papers.dates.received" }}
    +
    + +
    +{{ end }} \ No newline at end of file diff --git a/layouts/_partials/papers/single/sidebar/informations/keywords.html b/layouts/_partials/papers/single/sidebar/informations/keywords.html new file mode 100644 index 000000000..84b9a197a --- /dev/null +++ b/layouts/_partials/papers/single/sidebar/informations/keywords.html @@ -0,0 +1,6 @@ +{{ if isset .Params "keywords" }} + {{ if gt ( len .Params.keywords ) 0 }} +
    {{ i18n "volumes.keywords" }}
    +
    {{ delimit .Params.Keywords " " }}
    + {{ end }} +{{ end }} \ No newline at end of file diff --git a/layouts/_partials/papers/single/sidebar/informations/language.html b/layouts/_partials/papers/single/sidebar/informations/language.html new file mode 100644 index 000000000..2e39de402 --- /dev/null +++ b/layouts/_partials/papers/single/sidebar/informations/language.html @@ -0,0 +1,4 @@ +{{ if isset .Params "lang" }} +
    {{ i18n "commons.language" }}
    +
    {{ .Params.Lang }}
    +{{ end }} \ No newline at end of file diff --git a/layouts/_partials/papers/single/sidebar/informations/type.html b/layouts/_partials/papers/single/sidebar/informations/type.html new file mode 100644 index 000000000..8f7a8499e --- /dev/null +++ b/layouts/_partials/papers/single/sidebar/informations/type.html @@ -0,0 +1,4 @@ +{{ if isset .Params "type" }} +
    {{ i18n "volumes.nature" }}
    +
    {{ safeHTML .Params.Type }}
    +{{ end }} \ No newline at end of file diff --git a/layouts/_partials/papers/single/toc.html b/layouts/_partials/papers/single/sidebar/toc.html similarity index 100% rename from layouts/_partials/papers/single/toc.html rename to layouts/_partials/papers/single/sidebar/toc.html diff --git a/layouts/_partials/papers/single/sidebar/volumes.html b/layouts/_partials/papers/single/sidebar/volumes.html new file mode 100644 index 000000000..c29f2642d --- /dev/null +++ b/layouts/_partials/papers/single/sidebar/volumes.html @@ -0,0 +1,17 @@ +
    {{ i18n "volumes.singular_name" }}
    +
    + +
    \ No newline at end of file From 1e4d318fe250889d53e6a019cd87f8d45829e838 Mon Sep 17 00:00:00 2001 From: Arnaud Levy Date: Tue, 24 Mar 2026 14:44:03 +0100 Subject: [PATCH 08/44] Rangement image.html (#1428) Co-authored-by: Alexis BENOIT --- .../_partials/blocks/templates/agenda.html | 4 +- .../blocks/templates/call_to_action.html | 22 ++-- .../blocks/templates/categories.html | 6 +- .../_partials/blocks/templates/chapter.html | 16 ++- .../blocks/templates/definitions.html | 14 +-- layouts/_partials/blocks/templates/embed.html | 10 +- .../blocks/templates/exhibitions.html | 13 +- .../_partials/blocks/templates/features.html | 28 ++--- layouts/_partials/blocks/templates/files.html | 18 +-- .../_partials/blocks/templates/gallery.html | 2 +- layouts/_partials/blocks/templates/image.html | 6 +- layouts/_partials/blocks/templates/jobs.html | 6 +- .../blocks/templates/key_figures.html | 22 ++-- .../_partials/blocks/templates/license.html | 6 +- layouts/_partials/blocks/templates/links.html | 30 ++--- .../_partials/blocks/templates/locations.html | 6 +- .../blocks/templates/organizations.html | 6 +- .../_partials/blocks/templates/papers.html | 4 +- .../_partials/blocks/templates/persons.html | 4 +- layouts/_partials/blocks/templates/posts.html | 4 +- .../_partials/blocks/templates/projects.html | 6 +- .../blocks/templates/publications.html | 2 +- .../blocks/templates/testimonials.html | 34 +++-- .../templates/testimonials/carousel.html | 26 ++-- .../_partials/blocks/templates/timeline.html | 4 +- layouts/_partials/blocks/templates/title.html | 2 +- layouts/_partials/blocks/templates/video.html | 6 +- .../_partials/blocks/templates/volumes.html | 2 +- layouts/_partials/commons/image-default.html | 14 --- layouts/_partials/commons/image.html | 118 +++++------------- layouts/_partials/commons/image/default.html | 14 +++ .../commons/image/helpers/GetAlt.html | 7 ++ layouts/_partials/commons/image/picture.html | 33 +++++ .../commons/image/picture/bitmap.html | 27 ++++ .../commons/image/picture/bitmap/size.html | 13 ++ .../_partials/commons/image/picture/svg.html | 7 ++ layouts/_partials/commons/item/media.html | 12 +- layouts/_partials/locations/partials/map.html | 12 +- .../organizations/partials/logo.html | 10 +- layouts/_partials/papers/single/sidebar.html | 2 +- .../papers/single/sidebar/volumes.html | 2 +- .../publications/single/researchers.html | 6 +- 42 files changed, 303 insertions(+), 283 deletions(-) delete mode 100644 layouts/_partials/commons/image-default.html create mode 100644 layouts/_partials/commons/image/default.html create mode 100644 layouts/_partials/commons/image/helpers/GetAlt.html create mode 100644 layouts/_partials/commons/image/picture.html create mode 100644 layouts/_partials/commons/image/picture/bitmap.html create mode 100644 layouts/_partials/commons/image/picture/bitmap/size.html create mode 100644 layouts/_partials/commons/image/picture/svg.html diff --git a/layouts/_partials/blocks/templates/agenda.html b/layouts/_partials/blocks/templates/agenda.html index 3f9a85701..8dca6d460 100644 --- a/layouts/_partials/blocks/templates/agenda.html +++ b/layouts/_partials/blocks/templates/agenda.html @@ -1,6 +1,6 @@ {{- $block := .block }} -{{- $block_class := partial "blocks/helpers/GetClass" .block -}} -{{- with .block.data -}} +{{ $block_class := partial "blocks/helpers/GetClass" .block }} +{{ with .block.data }} {{- $options := .options -}} {{- $layout := .layout | default "list" -}} diff --git a/layouts/_partials/blocks/templates/call_to_action.html b/layouts/_partials/blocks/templates/call_to_action.html index 36966dcd9..13678c4f4 100644 --- a/layouts/_partials/blocks/templates/call_to_action.html +++ b/layouts/_partials/blocks/templates/call_to_action.html @@ -1,19 +1,19 @@ -{{- $block := .block -}} -{{- $block_class := partial "blocks/helpers/GetClass" .block -}} +{{ $block := .block }} +{{ $block_class := partial "blocks/helpers/GetClass" .block }} -{{- with .block.data -}} - {{- $buttons := and .button.text .button_secondary.text -}} +{{ with .block.data }} + {{ $buttons := and .button.text .button_secondary.text }}
    {{ partial "blocks/top.html" $block.top }} - {{- if .buttons }} + {{ if .buttons }}
    - {{- range .buttons -}} + {{ range .buttons }} {{ if .title }} - {{- $title := safeHTML .title -}} + {{ $title := safeHTML .title }} {{- $title -}} - {{ end -}} - {{- end -}} + {{ end }} + {{ end }}
    - {{- end -}} + {{ end }}
    {{ with .image }} {{ partial "commons/image/figure.html" (dict @@ -39,4 +39,4 @@
    -{{- end -}} +{{ end }} diff --git a/layouts/_partials/blocks/templates/categories.html b/layouts/_partials/blocks/templates/categories.html index a7c114129..513b5a00f 100644 --- a/layouts/_partials/blocks/templates/categories.html +++ b/layouts/_partials/blocks/templates/categories.html @@ -1,8 +1,8 @@ -{{- $block := .block -}} -{{- $block_class := partial "blocks/helpers/GetClass" .block -}} +{{ $block := .block }} +{{ $block_class := partial "blocks/helpers/GetClass" .block }} {{- $layout := .block.data.layout | default "grid" -}} -{{- with .block.data -}} +{{ with .block.data }} {{ $options := .options }}
    diff --git a/layouts/_partials/blocks/templates/chapter.html b/layouts/_partials/blocks/templates/chapter.html index 1fca410e3..a374f17a4 100644 --- a/layouts/_partials/blocks/templates/chapter.html +++ b/layouts/_partials/blocks/templates/chapter.html @@ -1,13 +1,11 @@ -{{- $block := .block -}} -{{- $block_class := partial "blocks/helpers/GetClass" .block -}} -{{- $image_class := "" -}} - -{{- with .block.data -}} +{{ $block := .block }} +{{ $block_class := partial "blocks/helpers/GetClass" .block }} +{{ $image_class := "" }} +{{ with .block.data }} {{ if .image }} - {{- $block_class = printf "%s block-chapter--with-image" $block_class -}} - {{- $image_class = printf "image-%s" (partial "commons/image/helpers/GetDirection" .image) -}} + {{ $block_class = printf "%s block-chapter--with-image" $block_class }} + {{ $image_class = printf "image-%s" (partial "commons/image/helpers/GetDirection" .image) }} {{ end }} -
    @@ -35,4 +33,4 @@
    -{{- end -}} +{{- end -}} \ No newline at end of file diff --git a/layouts/_partials/blocks/templates/definitions.html b/layouts/_partials/blocks/templates/definitions.html index 68ab894c9..2c302ed41 100644 --- a/layouts/_partials/blocks/templates/definitions.html +++ b/layouts/_partials/blocks/templates/definitions.html @@ -1,23 +1,23 @@ -{{- $block := .block -}} -{{- $block_class := partial "blocks/helpers/GetClass" .block -}} -{{- $html_id := .html_id -}} +{{ $block := .block }} +{{ $block_class := partial "blocks/helpers/GetClass" .block }} +{{ $html_id := .html_id }} -{{- with .block.data -}} +{{ with .block.data }}
    {{ partial "blocks/top.html" $block.top }}
    - {{- range $index, $element := .elements }} + {{ range $index, $element := .elements }} {{ $id := printf "block-%s-element-%d" $html_id $index }}
    {{ safeHTML $element.description }}
    - {{ end -}} + {{ end }}
    -{{- end -}} +{{ end }} diff --git a/layouts/_partials/blocks/templates/embed.html b/layouts/_partials/blocks/templates/embed.html index 82147fe78..1a7aeb20b 100644 --- a/layouts/_partials/blocks/templates/embed.html +++ b/layouts/_partials/blocks/templates/embed.html @@ -1,8 +1,8 @@ -{{- $block := .block -}} -{{- $block_class := partial "blocks/helpers/GetClass" .block -}} -{{- $html_id := .html_id -}} +{{ $block := .block }} +{{ $block_class := partial "blocks/helpers/GetClass" .block }} +{{ $html_id := .html_id }} -{{- with .block.data -}} +{{ with .block.data }}
    @@ -20,4 +20,4 @@
    -{{- end -}} +{{ end }} diff --git a/layouts/_partials/blocks/templates/exhibitions.html b/layouts/_partials/blocks/templates/exhibitions.html index 5fa16195e..cbb7397e2 100644 --- a/layouts/_partials/blocks/templates/exhibitions.html +++ b/layouts/_partials/blocks/templates/exhibitions.html @@ -1,9 +1,8 @@ -{{- $block := .block }} -{{- $block_class := partial "blocks/helpers/GetClass" .block -}} -{{- with .block.data -}} - {{- $options := .options -}} - {{- $layout := .layout | default "list" -}} - +{{ $block := .block }} +{{ $block_class := partial "blocks/helpers/GetClass" .block }} +{{ with .block.data }} + {{ $options := .options }} + {{ $layout := .layout | default "list" }}
    @@ -30,4 +29,4 @@
    -{{ end -}} \ No newline at end of file +{{ end }} \ No newline at end of file diff --git a/layouts/_partials/blocks/templates/features.html b/layouts/_partials/blocks/templates/features.html index 889d526be..e5a16831c 100644 --- a/layouts/_partials/blocks/templates/features.html +++ b/layouts/_partials/blocks/templates/features.html @@ -1,8 +1,8 @@ -{{- $block := .block -}} -{{- $block_class := partial "blocks/helpers/GetClass" .block -}} +{{ $block := .block }} +{{ $block_class := partial "blocks/helpers/GetClass" .block }} -{{- with .block.data -}} - {{- $features := .elements }} +{{ with .block.data }} + {{ $features := .elements }}
    @@ -10,7 +10,7 @@ {{ if $features }}
      - {{- range $features }} + {{ range $features }}
    • {{ if or .title .description }}
      @@ -28,24 +28,24 @@ {{ end }}
      {{ end }} - {{- if .image -}} -
      - {{- partial "commons/image.html" (dict + {{ if .image }} +
      + {{ partial "commons/image.html" (dict "image" .image "alt" .alt "sizes" site.Params.image_sizes.blocks.features - ) -}} - {{- if .credit -}} + ) }} + {{ if .credit }}
      {{ safeHTML .credit }}
      - {{- end -}} + {{ end }}
      - {{- end -}} + {{ end }}
    • - {{ end -}} + {{ end }}
    - {{ end -}} + {{ end }}
    diff --git a/layouts/_partials/blocks/templates/files.html b/layouts/_partials/blocks/templates/files.html index ff8656133..a0ce52683 100644 --- a/layouts/_partials/blocks/templates/files.html +++ b/layouts/_partials/blocks/templates/files.html @@ -1,16 +1,16 @@ -{{- $block := .block -}} -{{- $block_class := partial "blocks/helpers/GetClass" .block -}} +{{ $block := .block }} +{{ $block_class := partial "blocks/helpers/GetClass" .block }} -{{- with .block.data -}} +{{ with .block.data }}
    {{ partial "blocks/top.html" $block.top }}
      - {{- range .files }} + {{ range .files }} {{ if ne .id "" }} {{ if partial "GetMedia" .id }} -
    • +
      {{ partial "commons/files/download-link.html" (dict "id" .id @@ -25,11 +25,11 @@ ) }} {{ end }}
    • - {{ end -}} - {{ end -}} - {{ end -}} + {{ end }} + {{ end }} + {{ end }}
    -{{- end -}} +{{ end }} \ No newline at end of file diff --git a/layouts/_partials/blocks/templates/gallery.html b/layouts/_partials/blocks/templates/gallery.html index 7999717fb..3bc13c470 100644 --- a/layouts/_partials/blocks/templates/gallery.html +++ b/layouts/_partials/blocks/templates/gallery.html @@ -2,7 +2,7 @@ {{ $block_class := partial "blocks/helpers/GetClass" .block }} {{ $with_lightbox := not site.Params.components.lightbox.in_gallery.disabled }} -{{- with .block.data -}} +{{ with .block.data }} {{- $sizes := index site.Params.image_sizes.blocks.gallery .layout -}} {{- $has_text := false -}} {{- range .images }} diff --git a/layouts/_partials/blocks/templates/image.html b/layouts/_partials/blocks/templates/image.html index 9d35f6587..debb8052d 100644 --- a/layouts/_partials/blocks/templates/image.html +++ b/layouts/_partials/blocks/templates/image.html @@ -1,8 +1,8 @@ -{{- $block := .block -}} +{{ $block := .block }} {{- $image_class := "" -}} -{{- $block_class := partial "blocks/helpers/GetClass" .block -}} +{{ $block_class := partial "blocks/helpers/GetClass" .block }} -{{- with .block.data -}} +{{ with .block.data }} {{- $buttons := and .button.text .button_secondary.text -}} {{- if .image -}} {{- $image_class = printf "image-%s" (partial "commons/image/helpers/GetDirection" .image ) -}} diff --git a/layouts/_partials/blocks/templates/jobs.html b/layouts/_partials/blocks/templates/jobs.html index 6d5d4c621..e9c8be20c 100644 --- a/layouts/_partials/blocks/templates/jobs.html +++ b/layouts/_partials/blocks/templates/jobs.html @@ -1,6 +1,6 @@ -{{- $block := .block -}} -{{- $block_class := partial "blocks/helpers/GetClass" .block -}} -{{- with .block.data -}} +{{ $block := .block }} +{{ $block_class := partial "blocks/helpers/GetClass" .block }} +{{ with .block.data }} {{- $options := .options -}} {{- $layout := .layout | default "grid" -}}
    diff --git a/layouts/_partials/blocks/templates/key_figures.html b/layouts/_partials/blocks/templates/key_figures.html index 025551f5d..401606b5e 100644 --- a/layouts/_partials/blocks/templates/key_figures.html +++ b/layouts/_partials/blocks/templates/key_figures.html @@ -1,10 +1,10 @@ -{{- $block := .block -}} -{{- $isAnimated := site.Params.blocks.key_figures.animated -}} -{{- $block_class := partial "blocks/helpers/GetClass" .block -}} +{{ $block := .block }} +{{ $isAnimated := site.Params.blocks.key_figures.animated }} +{{ $block_class := partial "blocks/helpers/GetClass" .block }} -{{- with .block.data -}} - {{- $figures := .figures }} -
    +{{ with .block.data }} + {{ $figures := .figures }} +
    {{ partial "blocks/top.html" $block.top }} @@ -14,8 +14,8 @@ {{ $list_class = "even-items" }} {{ end }}
      - {{- range .figures }} -
    • + {{ range .figures }} +
    • {{ with .image }} {{ partial "commons/image.html" (dict "image" . @@ -31,10 +31,10 @@ {{ safeHTML .description }}
    - {{ end -}} + {{ end }} - {{ end -}} + {{ end }}
    -{{- end -}} +{{ end }} \ No newline at end of file diff --git a/layouts/_partials/blocks/templates/license.html b/layouts/_partials/blocks/templates/license.html index 734c921e4..081ad76a2 100644 --- a/layouts/_partials/blocks/templates/license.html +++ b/layouts/_partials/blocks/templates/license.html @@ -1,7 +1,7 @@ -{{- $block := .block -}} -{{- $block_class := partial "blocks/helpers/GetClass" .block -}} +{{ $block := .block }} +{{ $block_class := partial "blocks/helpers/GetClass" .block }} -{{- with .block.data -}} +{{ with .block.data }}
    diff --git a/layouts/_partials/blocks/templates/links.html b/layouts/_partials/blocks/templates/links.html index 69dcf0f84..f91c52558 100644 --- a/layouts/_partials/blocks/templates/links.html +++ b/layouts/_partials/blocks/templates/links.html @@ -1,7 +1,7 @@ -{{- $block := .block -}} -{{- $block_class := partial "blocks/helpers/GetClass" .block -}} +{{ $block := .block }} +{{ $block_class := partial "blocks/helpers/GetClass" .block }} -{{- with .block.data -}} +{{ with .block.data }} {{ $options := .options }} {{ $layout := .layout }}
    -{{- end -}} +{{ end }} \ No newline at end of file diff --git a/layouts/_partials/blocks/templates/locations.html b/layouts/_partials/blocks/templates/locations.html index 8dde1cf04..f77d83fe3 100644 --- a/layouts/_partials/blocks/templates/locations.html +++ b/layouts/_partials/blocks/templates/locations.html @@ -1,8 +1,8 @@ -{{- $block := .block -}} -{{- $block_class := partial "blocks/helpers/GetClass" .block -}} +{{ $block := .block }} +{{ $block_class := partial "blocks/helpers/GetClass" .block }} {{- $layout := .block.data.layout | default "grid" -}} -{{- with .block.data -}} +{{ with .block.data }} {{ $options := .options }}
    diff --git a/layouts/_partials/blocks/templates/organizations.html b/layouts/_partials/blocks/templates/organizations.html index 75013b0d0..dac98d131 100644 --- a/layouts/_partials/blocks/templates/organizations.html +++ b/layouts/_partials/blocks/templates/organizations.html @@ -1,6 +1,6 @@ -{{- $block := .block -}} +{{ $block := .block }} {{- $html_id := .html_id -}} -{{- $block_class := partial "blocks/helpers/GetClass" .block -}} +{{ $block_class := partial "blocks/helpers/GetClass" .block }} {{- $logo_index := "logo" -}} {{- $longitude := "" -}} {{- $latitude := "" -}} @@ -10,7 +10,7 @@ {{ $logo_index = "logo_on_dark_background" }} {{ end }} -{{- with .block.data -}} +{{ with .block.data }} {{ $options := .options }} {{ if $options.logo }} {{ $block_class = printf "%s %s" $block_class "organizations--with-images" }} diff --git a/layouts/_partials/blocks/templates/papers.html b/layouts/_partials/blocks/templates/papers.html index b5fada5c0..92debfbcf 100644 --- a/layouts/_partials/blocks/templates/papers.html +++ b/layouts/_partials/blocks/templates/papers.html @@ -1,9 +1,9 @@ -{{- $block := .block -}} +{{ $block := .block }} {{- $template := .block.template -}} {{- $position := .block.position -}} {{- $title := .block.title -}} -{{- with .block.data -}} +{{ with .block.data }}
    diff --git a/layouts/_partials/blocks/templates/persons.html b/layouts/_partials/blocks/templates/persons.html index 66354aa13..69b5fe1aa 100644 --- a/layouts/_partials/blocks/templates/persons.html +++ b/layouts/_partials/blocks/templates/persons.html @@ -1,9 +1,9 @@ -{{- $block := .block -}} +{{ $block := .block }} {{- $block_class := partial "blocks/templates/persons/helpers/GetClass" .block }} {{- $char_limit := 80 -}} {{- $is_large := false -}} -{{- with .block.data -}} +{{ with .block.data }} {{ $layout := .layout | default "grid" }} {{ $options := .options }} {{ $image_sizes := index site.Params.image_sizes.sections.persons.layouts $layout }} diff --git a/layouts/_partials/blocks/templates/posts.html b/layouts/_partials/blocks/templates/posts.html index 99886dbbc..be6023576 100644 --- a/layouts/_partials/blocks/templates/posts.html +++ b/layouts/_partials/blocks/templates/posts.html @@ -1,5 +1,5 @@ -{{- $block := .block -}} -{{- $block_class := partial "blocks/helpers/GetClass" .block -}} +{{ $block := .block }} +{{ $block_class := partial "blocks/helpers/GetClass" .block }} {{- $term := false -}} {{- $layout := .block.data.layout | default "grid" -}} diff --git a/layouts/_partials/blocks/templates/projects.html b/layouts/_partials/blocks/templates/projects.html index 94eb08b58..c3a953a26 100644 --- a/layouts/_partials/blocks/templates/projects.html +++ b/layouts/_partials/blocks/templates/projects.html @@ -1,9 +1,9 @@ -{{- $block := .block -}} +{{ $block := .block }} {{- $block_title := .block.title -}} -{{- $block_class := partial "blocks/helpers/GetClass" .block -}} +{{ $block_class := partial "blocks/helpers/GetClass" .block }} {{- $layout := .block.data.layout | default "grid" -}} -{{- with .block.data -}} +{{ with .block.data }}
    diff --git a/layouts/_partials/blocks/templates/publications.html b/layouts/_partials/blocks/templates/publications.html index 6919c1e5b..19afd7ba0 100644 --- a/layouts/_partials/blocks/templates/publications.html +++ b/layouts/_partials/blocks/templates/publications.html @@ -1,4 +1,4 @@ -{{- $block := .block -}} +{{ $block := .block }} {{- $template := .block.template -}} {{- $position := .block.position -}} {{- $title := .block.title -}} diff --git a/layouts/_partials/blocks/templates/testimonials.html b/layouts/_partials/blocks/templates/testimonials.html index f436bcccc..83726f831 100644 --- a/layouts/_partials/blocks/templates/testimonials.html +++ b/layouts/_partials/blocks/templates/testimonials.html @@ -1,8 +1,8 @@ -{{- $block := .block -}} -{{- $block_class := partial "blocks/helpers/GetClass" .block -}} -{{- $layout := .block.data.layout | default "carousel" -}} +{{ $block := .block }} +{{ $block_class := partial "blocks/helpers/GetClass" .block }} +{{ $layout := .block.data.layout | default "carousel" }} -{{- with .block.data -}} +{{ with .block.data }}
    @@ -25,28 +25,26 @@
  • -
    - {{- safeHTML .text -}} -
    - {{ if or .photo .author .job -}} +
    {{ safeHTML .text }}
    + {{ if or .photo .author .job }}
    - {{ if .photo -}} + {{ if .photo }}
    - {{- partial "commons/image.html" (dict + {{ partial "commons/image.html" (dict "image" .photo "sizes" site.Params.image_sizes.blocks.testimonials "layout" $layout - ) -}} + ) }}
    - {{- end }} + {{ end }} {{ if or .author .job -}}

    - {{- if .author -}} + {{ if .author }} {{ safeHTML .author }} - {{- end }} - {{- if .job -}} - {{- safeHTML .job -}} - {{- end }} + {{ end }} + {{ if .job }} + {{ safeHTML .job }} + {{ end }}

    {{ end }}
    @@ -59,4 +57,4 @@
  • -{{- end -}} \ No newline at end of file +{{ end }} \ No newline at end of file diff --git a/layouts/_partials/blocks/templates/testimonials/carousel.html b/layouts/_partials/blocks/templates/testimonials/carousel.html index b4850e1c4..85e2dae8d 100644 --- a/layouts/_partials/blocks/templates/testimonials/carousel.html +++ b/layouts/_partials/blocks/templates/testimonials/carousel.html @@ -13,30 +13,30 @@ {{ with $aria_label -}} role="figure" aria-label="{{ . }}" {{- end }}> {{ with .text }} {{ $is_long := gt (len .) 150 }} -
    - {{- safeHTML . -}} + + {{ safeHTML . }}
    {{ end }} {{ if or .photo .author .job -}}
    - {{ if .photo -}} + {{ if .photo }}
    - {{- partial "commons/image.html" (dict + {{ partial "commons/image.html" (dict "image" .photo "sizes" site.Params.image_sizes.blocks.testimonials - ) -}} + ) }}
    - {{- end }} - {{ if or .author .job -}} + {{ end }} + {{ if or .author .job }}

    - {{- if .author -}} + {{ if .author }} {{ safeHTML .author }} - {{- end }} - {{- if .job -}} - {{- safeHTML .job -}} - {{- end }} + {{ end }} + {{ if .job }} + {{ safeHTML .job }} + {{ end }}

    - {{- end }} + {{ end }}
    {{ end }} diff --git a/layouts/_partials/blocks/templates/timeline.html b/layouts/_partials/blocks/templates/timeline.html index 3451c803f..0e3eb1b6b 100644 --- a/layouts/_partials/blocks/templates/timeline.html +++ b/layouts/_partials/blocks/templates/timeline.html @@ -1,5 +1,5 @@ -{{- $block := .block -}} -{{- $block_class := partial "blocks/helpers/GetClass" .block -}} +{{ $block := .block }} +{{ $block_class := partial "blocks/helpers/GetClass" .block }} {{- $layout := .block.data.layout | default "vertical" -}}
    diff --git a/layouts/_partials/blocks/templates/title.html b/layouts/_partials/blocks/templates/title.html index 10e725cb3..eae554096 100644 --- a/layouts/_partials/blocks/templates/title.html +++ b/layouts/_partials/blocks/templates/title.html @@ -1,4 +1,4 @@ -{{- $block_class := partial "blocks/helpers/GetClass" .block -}} +{{ $block_class := partial "blocks/helpers/GetClass" .block }} {{ with .block }} {{ $title := .title }} diff --git a/layouts/_partials/blocks/templates/video.html b/layouts/_partials/blocks/templates/video.html index dcc0cf806..a8c2c90e4 100644 --- a/layouts/_partials/blocks/templates/video.html +++ b/layouts/_partials/blocks/templates/video.html @@ -1,8 +1,8 @@ -{{- $block := .block -}} -{{- $block_class := partial "blocks/helpers/GetClass" .block -}} +{{ $block := .block }} +{{ $block_class := partial "blocks/helpers/GetClass" .block }} {{- $described_by_id := "" -}} {{- $video_id := printf "video-%s" .html_id -}} -{{- with .block.data -}} +{{ with .block.data }}
    diff --git a/layouts/_partials/blocks/templates/volumes.html b/layouts/_partials/blocks/templates/volumes.html index a0274c07d..49c3cf7b1 100644 --- a/layouts/_partials/blocks/templates/volumes.html +++ b/layouts/_partials/blocks/templates/volumes.html @@ -1,4 +1,4 @@ -{{- $block := .block -}} +{{ $block := .block }} {{- $template := .block.template -}} {{- $position := .block.position -}} {{- $title := .block.title -}} diff --git a/layouts/_partials/commons/image-default.html b/layouts/_partials/commons/image-default.html deleted file mode 100644 index 453a46c48..000000000 --- a/layouts/_partials/commons/image-default.html +++ /dev/null @@ -1,14 +0,0 @@ -{{- $section_type := . -}} -{{- $use_default := (index site.Params $section_type).default_image -}} -{{- $image := index site.Data.website site.Language.Lang "default" "image" -}} - -{{- if and $use_default $image -}} - {{ with index site.Params.image_sizes.sections $section_type }} - {{ $sizes := .item }} - - {{- partial "commons/image.html" (dict - "image" $image - "sizes" $sizes - ) -}} - {{ end }} -{{- end -}} diff --git a/layouts/_partials/commons/image.html b/layouts/_partials/commons/image.html index 451519eac..254fa3b1b 100644 --- a/layouts/_partials/commons/image.html +++ b/layouts/_partials/commons/image.html @@ -1,91 +1,29 @@ -{{- if .image }} - {{- $id := .image -}} - {{- if isset .image "id" -}} - {{- $id = .image.id -}} - {{- end -}} - {{- $image := partial "GetMedia" $id -}} - {{- if $image -}} - {{- $url := $image.url -}} - {{- if site.Params.keycdn -}} - {{- $url = $image.direct_url -}} - {{- end -}} - {{- $lazy := default true .lazy -}} - {{- $alt := or .alt "" -}} - {{- if isset .image "alt" -}} - {{- $alt = .image.alt -}} - {{- end -}} - {{- $width := $image.width -}} - {{- $height := $image.height -}} - {{- $default := "1280x720" -}} - {{- if .desktop -}} - {{- $default = .desktop -}} - {{- end -}} - {{- $crop := false -}} - {{- if .crop -}} - {{- $crop = true -}} - {{- end -}} - {{ $image_class := .html_class | default "" }} - {{ $is_png := strings.HasSuffix $image.name "png" }} - {{ $is_svg := strings.HasSuffix $image.name "svg" }} - {{ if $is_png }} - {{ $image_class = printf "%s is-png" $image_class }} - {{ else if $is_svg }} - {{ $image_class = printf "%s is-svg" $image_class }} +{{ if .image }} + {{ $id := .image }} + {{ if isset .image "id" }} + {{ $id = .image.id }} + {{ end }} + {{ $image := partial "GetMedia" $id }} + {{ if $image }} + {{ $url := $image.url }} + {{ if site.Params.keycdn }} + {{ $url = $image.direct_url }} {{ end }} - - - - {{- if $is_svg -}} - - {{ chomp (plainify $alt) }} - - {{- else -}} - - {{ with .sizes.desktop -}} - - - {{- end }} - - {{ with .sizes.tablet -}} - - - {{- end }} - - {{ with .sizes.mobile -}} - - - {{- end }} - - {{ chomp (plainify $alt) }} - {{- end -}} - - - {{- end -}} -{{- end -}} \ No newline at end of file + {{ $alt := partial "commons/image/helpers/GetAlt" . }} + {{ $lazy := default true .lazy }} + {{ $default := "1280x720" }} + {{ if .desktop }} + {{ $default = .desktop }} + {{ end }} + {{ $crop := .crop | default false }} + {{ partial "commons/image/picture.html" (dict + "image" $image + "url" $url + "alt" $alt + "lazy" $lazy + "default" $default + "crop" $crop + "context" . + ) }} + {{ end }} +{{ end }} \ No newline at end of file diff --git a/layouts/_partials/commons/image/default.html b/layouts/_partials/commons/image/default.html new file mode 100644 index 000000000..45f14fe11 --- /dev/null +++ b/layouts/_partials/commons/image/default.html @@ -0,0 +1,14 @@ +{{ $section_type := . }} +{{ $use_default := (index site.Params $section_type).default_image }} +{{ $image := index site.Data.website site.Language.Lang "default" "image" }} + +{{ if and $use_default $image }} + {{ with index site.Params.image_sizes.sections $section_type }} + {{ $sizes := .item }} + + {{ partial "commons/image.html" (dict + "image" $image + "sizes" $sizes + ) }} + {{ end }} +{{ end }} \ No newline at end of file diff --git a/layouts/_partials/commons/image/helpers/GetAlt.html b/layouts/_partials/commons/image/helpers/GetAlt.html new file mode 100644 index 000000000..84d4fbe1d --- /dev/null +++ b/layouts/_partials/commons/image/helpers/GetAlt.html @@ -0,0 +1,7 @@ +{{ $alt := or .alt "" }} + +{{ if isset .image "alt" }} + {{ $alt = .image.alt }} +{{ end }} + +{{ return $alt }} \ No newline at end of file diff --git a/layouts/_partials/commons/image/picture.html b/layouts/_partials/commons/image/picture.html new file mode 100644 index 000000000..da1915315 --- /dev/null +++ b/layouts/_partials/commons/image/picture.html @@ -0,0 +1,33 @@ +{{ $image_class := .context.html_class | default "" }} +{{ $is_png := strings.HasSuffix .image.name "png" }} +{{ $is_svg := strings.HasSuffix .image.name "svg" }} +{{ if $is_png }} + {{ $image_class = printf "%s is-png" $image_class }} +{{ else if $is_svg }} + {{ $image_class = printf "%s is-svg" $image_class }} +{{ end }} + + {{ if $is_svg }} + {{ partial "commons/image/picture/svg.html" (dict + "image" .image + "url" .url + "alt" .alt + "class" .context.class + "lazy" .lazy + "itemprop" .context.itemprop + ) }} + {{ else }} + {{ partial "commons/image/picture/bitmap.html" (dict + "image" .image + "url" .url + "alt" .alt + "class" .context.class + "lazy" .lazy + "itemprop" .context.itemprop + "fetch_priority" .context.fetch_priority + "sizes" .context.sizes + "default" .default + "crop" .crop + ) }} + {{ end }} + \ No newline at end of file diff --git a/layouts/_partials/commons/image/picture/bitmap.html b/layouts/_partials/commons/image/picture/bitmap.html new file mode 100644 index 000000000..424a5f3bb --- /dev/null +++ b/layouts/_partials/commons/image/picture/bitmap.html @@ -0,0 +1,27 @@ +{{ if .sizes }} + {{ partial "commons/image/picture/bitmap/size.html" (dict + "crop" .crop + "media" "min-width: 1024px" + "size" .sizes.desktop + "url" .url + ) }} + {{ partial "commons/image/picture/bitmap/size.html" (dict + "crop" .crop + "media" "min-width: 768px" + "size" .sizes.tablet + "url" .url + ) }} + {{ partial "commons/image/picture/bitmap/size.html" (dict + "crop" .crop + "size" .sizes.mobile + "url" .url + ) }} +{{ end }} +{{ chomp (plainify .alt) }} \ No newline at end of file diff --git a/layouts/_partials/commons/image/picture/bitmap/size.html b/layouts/_partials/commons/image/picture/bitmap/size.html new file mode 100644 index 000000000..36bebc598 --- /dev/null +++ b/layouts/_partials/commons/image/picture/bitmap/size.html @@ -0,0 +1,13 @@ +{{ $media := "" }} +{{ with .media }} + {{ $media = printf "media=\"(%s)\"" . }} +{{ end }} +{{ if .size }} + + +{{ end }} \ No newline at end of file diff --git a/layouts/_partials/commons/image/picture/svg.html b/layouts/_partials/commons/image/picture/svg.html new file mode 100644 index 000000000..268706585 --- /dev/null +++ b/layouts/_partials/commons/image/picture/svg.html @@ -0,0 +1,7 @@ +{{ chomp (plainify .alt) }} \ No newline at end of file diff --git a/layouts/_partials/commons/item/media.html b/layouts/_partials/commons/item/media.html index c113514eb..2245e719e 100644 --- a/layouts/_partials/commons/item/media.html +++ b/layouts/_partials/commons/item/media.html @@ -15,12 +15,12 @@ {{ end }}
    - {{- if $image -}} - {{- partial "commons/image.html" (dict + {{ if $image }} + {{ partial "commons/image.html" (dict "image" $image "sizes" $sizes - ) -}} - {{- else -}} - {{- partial "commons/image-default.html" $type -}} - {{- end -}} + ) }} + {{ else }} + {{ partial "commons/image/default.html" $type }} + {{ end }}
    \ No newline at end of file diff --git a/layouts/_partials/locations/partials/map.html b/layouts/_partials/locations/partials/map.html index 367a006d3..d82680aa1 100644 --- a/layouts/_partials/locations/partials/map.html +++ b/layouts/_partials/locations/partials/map.html @@ -33,19 +33,19 @@ {{ partial "commons/address" . }} {{ end }}
    - {{ end -}} - {{- if .Params.image -}} + {{ end }} + {{ if .Params.image }}
    - {{- partial "commons/image.html" (dict + {{ partial "commons/image.html" (dict "image" .Params.image "alt" $title "sizes" site.Params.image_sizes.sections.locations.layouts.map - ) -}} + ) }}
    - {{- end -}} + {{ end }} {{ end }} {{ end }}
    -{{ end }} +{{ end }} \ No newline at end of file diff --git a/layouts/_partials/organizations/partials/logo.html b/layouts/_partials/organizations/partials/logo.html index a9b5ff497..8e0853994 100644 --- a/layouts/_partials/organizations/partials/logo.html +++ b/layouts/_partials/organizations/partials/logo.html @@ -1,13 +1,13 @@ -{{- if .Params.logo -}} +{{ if .Params.logo }} {{ $logo_index := "logo" }} {{ if site.Params.organizations.dark_logo_background }} {{ $logo_index = "logo_on_dark_background" }} {{ end }} -
    diff --git a/layouts/_partials/publications/single/researchers.html b/layouts/_partials/publications/single/researchers.html index 4d1188109..567570511 100644 --- a/layouts/_partials/publications/single/researchers.html +++ b/layouts/_partials/publications/single/researchers.html @@ -13,16 +13,16 @@
    From 11f5497fb3485489501821fb6f91c8a19a21b583 Mon Sep 17 00:00:00 2001 From: Arnaud Levy Date: Tue, 24 Mar 2026 15:01:59 +0100 Subject: [PATCH 09/44] =?UTF-8?q?S=C3=A9paration=20de=20=20`commons/image/?= =?UTF-8?q?get-url/Osuny.html`=20(#1431)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Alexis BENOIT --- .../commons/image/helpers/get-url/Osuny.html | 51 ++++--------------- .../image/helpers/get-url/osuny/GetCrop.html | 17 +++++++ .../helpers/get-url/osuny/GetExtension.html | 7 +++ .../image/helpers/get-url/osuny/GetScale.html | 11 ++++ 4 files changed, 46 insertions(+), 40 deletions(-) create mode 100644 layouts/_partials/commons/image/helpers/get-url/osuny/GetCrop.html create mode 100644 layouts/_partials/commons/image/helpers/get-url/osuny/GetExtension.html create mode 100644 layouts/_partials/commons/image/helpers/get-url/osuny/GetScale.html diff --git a/layouts/_partials/commons/image/helpers/get-url/Osuny.html b/layouts/_partials/commons/image/helpers/get-url/Osuny.html index 3ccadba8f..1ef27643f 100644 --- a/layouts/_partials/commons/image/helpers/get-url/Osuny.html +++ b/layouts/_partials/commons/image/helpers/get-url/Osuny.html @@ -1,6 +1,3 @@ -{{ $cropValues := slice "top" "left" "right" "bottom" "center" }} -{{ $scaleValues := slice "2" "3" }} - {{/* Todo : simplify usage with only media */}} {{ $url := .url }} {{ if .media }} @@ -8,56 +5,30 @@ {{ end }} {{ $parsedUrl := urls.Parse $url }} +{{ $crop := partial "commons/image/helpers/get-url/osuny/GetCrop" (dict + "crop" .crop +) }} +{{ $scale := partial "commons/image/helpers/get-url/osuny/GetScale" (dict + "scale" .scale +) }} {{ $pathParts := split $parsedUrl.Path "/" }} {{ $lastIndex := sub (len $pathParts) 1 }} {{ $filename := index $pathParts $lastIndex }} {{ $pathParts = first $lastIndex $pathParts }} - {{ $baseFilename := strings.TrimSuffix (path.Ext $filename) $filename }} {{ $baseFilename = delimit (slice $baseFilename .size) "_" }} - -{{ $crop := "" }} -{{ if .crop }} - {{ if eq (string .crop) "true" }} - {{ $crop = "center" }} - {{ else }} - {{ range $cropValues }} - {{ if eq .crop . }} - {{ $crop = . }} - {{ end }} - {{ end }} - {{ end }} -{{ end }} -{{ if ne $crop "" }} - {{ $baseFilename = delimit (slice $baseFilename $crop) "_crop_" }} -{{ end }} - -{{ $scale := "" }} -{{ if .scale }} - {{ $rawStringScale := string .scale }} - {{ range $scaleValues }} - {{ if eq $rawStringScale . }} - {{ $scale = . }} - {{ end }} - {{ end }} -{{ end }} {{ if ne $scale "" }} {{ $baseFilename = delimit (slice $baseFilename "@" $scale "x") "" }} {{ end }} - {{ $pathParts = $pathParts | append $baseFilename }} {{ $joinedPath := path.Join $pathParts }} -{{ $fileExtension := "" }} -{{ if .format }} - {{ $fileExtension = delimit (slice "." .format) "" }} -{{ else }} - {{ $fileExtension = path.Ext $filename }} -{{ end }} +{{ $fileExtension := partial "commons/image/helpers/get-url/osuny/GetExtension" (dict + "format" .format + "filename" $filename +) }} {{ $domain := printf "%s://%s/" $parsedUrl.Scheme $parsedUrl.Host }} - {{ $resultSlice := slice $domain $joinedPath $fileExtension }} {{ $result := delimit $resultSlice "" }} - -{{ return $result }} +{{ return $result }} \ No newline at end of file diff --git a/layouts/_partials/commons/image/helpers/get-url/osuny/GetCrop.html b/layouts/_partials/commons/image/helpers/get-url/osuny/GetCrop.html new file mode 100644 index 000000000..4bf0c3be1 --- /dev/null +++ b/layouts/_partials/commons/image/helpers/get-url/osuny/GetCrop.html @@ -0,0 +1,17 @@ +{{ $cropValues := slice "top" "left" "right" "bottom" "center" }} +{{ $crop := "" }} +{{ if .crop }} + {{ if eq (string .crop) "true" }} + {{ $crop = "center" }} + {{ else }} + {{ range $cropValues }} + {{ if eq .crop . }} + {{ $crop = . }} + {{ end }} + {{ end }} + {{ end }} +{{ end }} +{{ if ne $crop "" }} + {{ $baseFilename = delimit (slice $baseFilename $crop) "_crop_" }} +{{ end }} +{{ return $crop }} \ No newline at end of file diff --git a/layouts/_partials/commons/image/helpers/get-url/osuny/GetExtension.html b/layouts/_partials/commons/image/helpers/get-url/osuny/GetExtension.html new file mode 100644 index 000000000..7dd1d1bd2 --- /dev/null +++ b/layouts/_partials/commons/image/helpers/get-url/osuny/GetExtension.html @@ -0,0 +1,7 @@ +{{ $fileExtension := "" }} +{{ if .format }} + {{ $fileExtension = delimit (slice "." .format) "" }} +{{ else }} + {{ $fileExtension = path.Ext .filename }} +{{ end }} +{{ return $fileExtension }} \ No newline at end of file diff --git a/layouts/_partials/commons/image/helpers/get-url/osuny/GetScale.html b/layouts/_partials/commons/image/helpers/get-url/osuny/GetScale.html new file mode 100644 index 000000000..420c0d85f --- /dev/null +++ b/layouts/_partials/commons/image/helpers/get-url/osuny/GetScale.html @@ -0,0 +1,11 @@ +{{ $scaleValues := slice "2" "3" }} +{{ $scale := "" }} +{{ if .scale }} + {{ $rawStringScale := string .scale }} + {{ range $scaleValues }} + {{ if eq $rawStringScale . }} + {{ $scale = . }} + {{ end }} + {{ end }} +{{ end }} +{{ return $scale }} \ No newline at end of file From 8ba3338cc882fa327bd1ead9538c6f7e35e86900 Mon Sep 17 00:00:00 2001 From: Alexis BENOIT Date: Tue, 24 Mar 2026 16:09:43 +0100 Subject: [PATCH 10/44] Rangement exposition (#1434) --- hugo.yaml | 2 + layouts/_partials/events/single/infos.html | 1 - .../exhibitions/partials/exhibition.html | 66 +++---------------- .../exhibitions/partials/exhibition/core.html | 16 +++++ .../partials/exhibition/core/categories.html | 4 ++ .../exhibition/{ => core}/federated.html | 0 .../partials/exhibition/core/meta.html | 13 ++++ .../exhibition/{ => core/meta}/place.html | 0 .../exhibition/{ => core/meta}/schedule.html | 0 .../partials/exhibition/core/more.html | 1 + .../exhibition/{ => core}/status.html | 0 .../partials/exhibition/core/summary.html | 5 ++ .../partials/exhibition/helpers/GetClass.html | 11 ++++ .../partials/exhibition/media.html | 3 +- .../exhibitions/partials/exhibition/meta.html | 11 ---- .../partials/exhibition/summary.html | 1 - .../exhibitions/single/exhibition-infos.html | 52 --------------- .../_partials/exhibitions/single/infos.html | 6 ++ .../single/infos/add_to_calendar.html | 27 ++++++++ .../exhibitions/single/infos/categories.html | 5 ++ .../exhibitions/single/infos/date.html | 8 +++ .../exhibitions/single/infos/share.html | 6 ++ .../exhibitions/single/infos/time.html | 13 ++++ .../_partials/exhibitions/single/sidebar.html | 2 +- 24 files changed, 129 insertions(+), 124 deletions(-) create mode 100644 layouts/_partials/exhibitions/partials/exhibition/core.html create mode 100644 layouts/_partials/exhibitions/partials/exhibition/core/categories.html rename layouts/_partials/exhibitions/partials/exhibition/{ => core}/federated.html (100%) create mode 100644 layouts/_partials/exhibitions/partials/exhibition/core/meta.html rename layouts/_partials/exhibitions/partials/exhibition/{ => core/meta}/place.html (100%) rename layouts/_partials/exhibitions/partials/exhibition/{ => core/meta}/schedule.html (100%) create mode 100644 layouts/_partials/exhibitions/partials/exhibition/core/more.html rename layouts/_partials/exhibitions/partials/exhibition/{ => core}/status.html (100%) create mode 100644 layouts/_partials/exhibitions/partials/exhibition/core/summary.html create mode 100644 layouts/_partials/exhibitions/partials/exhibition/helpers/GetClass.html delete mode 100644 layouts/_partials/exhibitions/partials/exhibition/meta.html delete mode 100644 layouts/_partials/exhibitions/partials/exhibition/summary.html delete mode 100644 layouts/_partials/exhibitions/single/exhibition-infos.html create mode 100644 layouts/_partials/exhibitions/single/infos.html create mode 100644 layouts/_partials/exhibitions/single/infos/add_to_calendar.html create mode 100644 layouts/_partials/exhibitions/single/infos/categories.html create mode 100644 layouts/_partials/exhibitions/single/infos/date.html create mode 100644 layouts/_partials/exhibitions/single/infos/share.html create mode 100644 layouts/_partials/exhibitions/single/infos/time.html diff --git a/hugo.yaml b/hugo.yaml index 41b1bc17c..ca2555586 100644 --- a/hugo.yaml +++ b/hugo.yaml @@ -221,6 +221,8 @@ params: single: calendar_links: false meta_in_sidebar: false + list: + with_more: false # share_links: # Optional # enabled: true # email: false diff --git a/layouts/_partials/events/single/infos.html b/layouts/_partials/events/single/infos.html index af4e5a351..d0c538fc4 100644 --- a/layouts/_partials/events/single/infos.html +++ b/layouts/_partials/events/single/infos.html @@ -1,4 +1,3 @@ -{{ $unique_day := eq .Params.dates.from.day .Params.dates.to.day }}
      {{ partial "events/single/infos/date.html" . }} {{ partial "events/single/infos/time.html" . }} diff --git a/layouts/_partials/exhibitions/partials/exhibition.html b/layouts/_partials/exhibitions/partials/exhibition.html index be5506d20..603970be3 100644 --- a/layouts/_partials/exhibitions/partials/exhibition.html +++ b/layouts/_partials/exhibitions/partials/exhibition.html @@ -1,66 +1,20 @@ -{{ $exhibition := .exhibition }} {{ $layout := .layout | default "list" }} -{{ $heading_level := .heading_level }} -{{ $with_more := .with_more }} -{{ $options := .options }} -{{ $layout := .layout }} +{{ $class := partial "exhibitions/partials/exhibition/helpers/GetClass" . }} -{{ with $exhibition }} - {{ $class := "exhibition" }} - {{ if and .Params.image $options.image }} - {{ $class = printf "%s exhibition--with-image" $class }} - {{ end -}} - {{ $dates := .Params.dates }} - {{ if .Params.federation.active }} - {{ $class = printf "%s is-federated" $class }} - {{ end }} - -
      +{{ if .exhibition }} +
      - {{ partial "exhibitions/partials/exhibition/heading.html" (dict - "item" . - "options" $options - "level" $heading_level + "item" .exhibition + "options" .options + "level" .heading_level "itemprop" "name" ) }} - - {{ partial "exhibitions/partials/exhibition/federated.html" . }} - - {{ partial "exhibitions/partials/exhibition/meta.html" (dict - "context" . - "options" $options - ) }} - - {{ if and $dates.status $options.status }} - {{ partial "exhibitions/partials/exhibition/status.html" (dict - "status" $dates.status - "type" "exhibition" - ) }} - {{ end }} - - {{ if and $options.summary .Params.summary }} -
      - {{ partial "exhibitions/partials/exhibition/summary.html" . }} -
      - {{ end }} - - {{ if $options.categories }} - {{ partial "commons/categories" ( dict - "context" . - "kind" "event" - ) }} - {{- end -}} - - {{ if $with_more }} - {{ partial "commons/item/more.html" . }} - {{- end -}} + {{ partial "exhibitions/partials/exhibition/core.html" . }}
      - - {{ if $options.image }} - {{ partial "exhibitions/partials/exhibition/media.html" (dict - "image" $exhibition.Params.image + {{ if .options.image }} + {{ partial "exhibitions/partials/exhibition/media.html" (dict + "exhibition" .exhibition "layout" $layout "type" "exhibitions" ) }} diff --git a/layouts/_partials/exhibitions/partials/exhibition/core.html b/layouts/_partials/exhibitions/partials/exhibition/core.html new file mode 100644 index 000000000..b0860315a --- /dev/null +++ b/layouts/_partials/exhibitions/partials/exhibition/core.html @@ -0,0 +1,16 @@ +{{ partial "exhibitions/partials/exhibition/core/federated.html" .exhibition }} +{{ partial "exhibitions/partials/exhibition/core/meta.html" . }} +{{ if .options.status }} + {{ with .exhibition.Params.dates }} + {{ partial "exhibitions/partials/exhibition/core/status.html" .status }} + {{ end }} +{{ end }} +{{ if .options.summary }} + {{ partial "exhibitions/partials/exhibition/core/summary.html" .exhibition }} +{{ end }} +{{ if .options.categories }} + {{ partial "exhibitions/partials/exhibition/core/categories.html" .exhibition }} +{{ end }} +{{ if .with_more }} + {{ partial "exhibitions/partials/exhibition/core/more.html" .exhibition }} +{{ end }} \ No newline at end of file diff --git a/layouts/_partials/exhibitions/partials/exhibition/core/categories.html b/layouts/_partials/exhibitions/partials/exhibition/core/categories.html new file mode 100644 index 000000000..51e43fc09 --- /dev/null +++ b/layouts/_partials/exhibitions/partials/exhibition/core/categories.html @@ -0,0 +1,4 @@ +{{ partial "commons/categories" ( dict + "context" . + "kind" "event" +) }} \ No newline at end of file diff --git a/layouts/_partials/exhibitions/partials/exhibition/federated.html b/layouts/_partials/exhibitions/partials/exhibition/core/federated.html similarity index 100% rename from layouts/_partials/exhibitions/partials/exhibition/federated.html rename to layouts/_partials/exhibitions/partials/exhibition/core/federated.html diff --git a/layouts/_partials/exhibitions/partials/exhibition/core/meta.html b/layouts/_partials/exhibitions/partials/exhibition/core/meta.html new file mode 100644 index 000000000..d126bf688 --- /dev/null +++ b/layouts/_partials/exhibitions/partials/exhibition/core/meta.html @@ -0,0 +1,13 @@ +{{ if or .options.dates .options.place }} +
      + {{ if .options.dates }} + {{ partial "exhibitions/partials/exhibition/core/meta/schedule.html" (dict + "dates" .exhibition.Params.dates + "on_two_lines" false + ) }} + {{ end }} + {{ if .options.place }} + {{ partial "exhibitions/partials/exhibition/core/meta/place.html" .exhibition }} + {{ end }} +
      +{{ end }} \ No newline at end of file diff --git a/layouts/_partials/exhibitions/partials/exhibition/place.html b/layouts/_partials/exhibitions/partials/exhibition/core/meta/place.html similarity index 100% rename from layouts/_partials/exhibitions/partials/exhibition/place.html rename to layouts/_partials/exhibitions/partials/exhibition/core/meta/place.html diff --git a/layouts/_partials/exhibitions/partials/exhibition/schedule.html b/layouts/_partials/exhibitions/partials/exhibition/core/meta/schedule.html similarity index 100% rename from layouts/_partials/exhibitions/partials/exhibition/schedule.html rename to layouts/_partials/exhibitions/partials/exhibition/core/meta/schedule.html diff --git a/layouts/_partials/exhibitions/partials/exhibition/core/more.html b/layouts/_partials/exhibitions/partials/exhibition/core/more.html new file mode 100644 index 000000000..4c9cf6766 --- /dev/null +++ b/layouts/_partials/exhibitions/partials/exhibition/core/more.html @@ -0,0 +1 @@ +{{ partial "commons/item/more.html" . }} \ No newline at end of file diff --git a/layouts/_partials/exhibitions/partials/exhibition/status.html b/layouts/_partials/exhibitions/partials/exhibition/core/status.html similarity index 100% rename from layouts/_partials/exhibitions/partials/exhibition/status.html rename to layouts/_partials/exhibitions/partials/exhibition/core/status.html diff --git a/layouts/_partials/exhibitions/partials/exhibition/core/summary.html b/layouts/_partials/exhibitions/partials/exhibition/core/summary.html new file mode 100644 index 000000000..f949121f2 --- /dev/null +++ b/layouts/_partials/exhibitions/partials/exhibition/core/summary.html @@ -0,0 +1,5 @@ +{{ if .Params.summary }} +
      + {{ partial "commons/item/summary.html" . }} +
      +{{ end }} \ No newline at end of file diff --git a/layouts/_partials/exhibitions/partials/exhibition/helpers/GetClass.html b/layouts/_partials/exhibitions/partials/exhibition/helpers/GetClass.html new file mode 100644 index 000000000..2bc4d83ae --- /dev/null +++ b/layouts/_partials/exhibitions/partials/exhibition/helpers/GetClass.html @@ -0,0 +1,11 @@ +{{ $class := "exhibition" }} + +{{ if and .exhibition.Params.image .options.image }} + {{ $class = printf "%s exhibition--with-image" $class }} +{{ end -}} + +{{ if .exhibition.Params.federation.active }} + {{ $class = printf "%s is-federated" $class }} +{{ end }} + +{{ return $class }} \ No newline at end of file diff --git a/layouts/_partials/exhibitions/partials/exhibition/media.html b/layouts/_partials/exhibitions/partials/exhibition/media.html index e072ff294..b78caa508 100644 --- a/layouts/_partials/exhibitions/partials/exhibition/media.html +++ b/layouts/_partials/exhibitions/partials/exhibition/media.html @@ -1,6 +1,5 @@ {{ partial "commons/item/media.html" (dict - "image" .image + "image" .exhibition.Params.image "type" "exhibitions" "layout" .layout - "sizes" .sizes ) }} \ No newline at end of file diff --git a/layouts/_partials/exhibitions/partials/exhibition/meta.html b/layouts/_partials/exhibitions/partials/exhibition/meta.html deleted file mode 100644 index 5c7f4604b..000000000 --- a/layouts/_partials/exhibitions/partials/exhibition/meta.html +++ /dev/null @@ -1,11 +0,0 @@ -{{ if or .options.dates .options.place }} -
      - {{ partial "exhibitions/partials/exhibition/schedule.html" (dict - "dates" .context.Params.dates - "on_two_lines" false - ) }} - {{ if .options.place }} - {{ partial "exhibitions/partials/exhibition/place.html" .context }} - {{ end }} -
      -{{ end }} \ No newline at end of file diff --git a/layouts/_partials/exhibitions/partials/exhibition/summary.html b/layouts/_partials/exhibitions/partials/exhibition/summary.html deleted file mode 100644 index 1aed0933f..000000000 --- a/layouts/_partials/exhibitions/partials/exhibition/summary.html +++ /dev/null @@ -1 +0,0 @@ -{{ partial "commons/item/summary.html" . }} \ No newline at end of file diff --git a/layouts/_partials/exhibitions/single/exhibition-infos.html b/layouts/_partials/exhibitions/single/exhibition-infos.html deleted file mode 100644 index 556ad46dd..000000000 --- a/layouts/_partials/exhibitions/single/exhibition-infos.html +++ /dev/null @@ -1,52 +0,0 @@ -{{ $unique_day := eq .Params.dates.from.day .Params.dates.to.day }} -
        - {{ with .Params.dates }} - {{ if .computed }} -
      • - {{ i18n "exhibitions.date" }} - {{ safeHTML .computed.two_lines.long }} -
      • - {{ end }} - {{ end }} - - {{ if .Params.exhibitions_categories }} -
      • - {{ partial "taxonomies/single/list.html" . }} -
      • - {{ end }} - {{ if site.Params.exhibitions.share_links.enabled | default site.Params.share_links.enabled }} -
      • - {{ i18n "commons.share_on" }} - {{ partial "commons/share/links.html" . }} -
      • - {{ end }} - - {{ if and (not .Params.dates.archive) site.Params.exhibitions.single.calendar_links }} - {{ with .Params.dates.add_to_calendar }} - {{ $links := . }} -
      • - {{ i18n "commons.add_to_calendar.title" }} - {{- $types := slice "ical" "google" "office" "outlook" "yahoo" -}} -
          - {{- range $type := $types -}} - {{ $label := i18n (printf "commons.add_to_calendar.%s" $type) }} - {{ with index $links $type }} -
        • - - {{- $label -}} - -
        • - {{- end }} - {{- end }} -
        -
      • - {{- end }} - {{- end }} - -
      diff --git a/layouts/_partials/exhibitions/single/infos.html b/layouts/_partials/exhibitions/single/infos.html new file mode 100644 index 000000000..f3361b906 --- /dev/null +++ b/layouts/_partials/exhibitions/single/infos.html @@ -0,0 +1,6 @@ +
        + {{ partial "exhibitions/single/infos/date.html" . }} + {{ partial "exhibitions/single/infos/categories.html" . }} + {{ partial "exhibitions/single/infos/share.html" . }} + {{ partial "exhibitions/single/infos/add_to_calendar.html" . }} +
      diff --git a/layouts/_partials/exhibitions/single/infos/add_to_calendar.html b/layouts/_partials/exhibitions/single/infos/add_to_calendar.html new file mode 100644 index 000000000..ab1eb07a2 --- /dev/null +++ b/layouts/_partials/exhibitions/single/infos/add_to_calendar.html @@ -0,0 +1,27 @@ +{{ if and (not .Params.dates.archive) site.Params.exhibitions.single.calendar_links }} + {{ with .Params.dates.add_to_calendar }} + {{ $links := . }} +
    • + {{ i18n "commons.add_to_calendar.title" }} + {{- $types := slice "ical" "google" "office" "outlook" "yahoo" -}} +
        + {{- range $type := $types -}} + {{ $label := i18n (printf "commons.add_to_calendar.%s" $type) }} + {{ with index $links $type }} +
      • + + {{- $label -}} + +
      • + {{- end }} + {{- end }} +
      +
    • + {{ end }} +{{ end }} \ No newline at end of file diff --git a/layouts/_partials/exhibitions/single/infos/categories.html b/layouts/_partials/exhibitions/single/infos/categories.html new file mode 100644 index 000000000..cbc18d813 --- /dev/null +++ b/layouts/_partials/exhibitions/single/infos/categories.html @@ -0,0 +1,5 @@ +{{ if .Params.events_categories }} +
    • + {{ partial "taxonomies/single/list.html" . }} +
    • +{{ end }} \ No newline at end of file diff --git a/layouts/_partials/exhibitions/single/infos/date.html b/layouts/_partials/exhibitions/single/infos/date.html new file mode 100644 index 000000000..4860afb8e --- /dev/null +++ b/layouts/_partials/exhibitions/single/infos/date.html @@ -0,0 +1,8 @@ +{{ with .Params.dates }} + {{ if .computed }} +
    • + {{ i18n "exhibitions.date" }} + {{ safeHTML .computed.two_lines.long }} +
    • + {{ end }} +{{ end }} \ No newline at end of file diff --git a/layouts/_partials/exhibitions/single/infos/share.html b/layouts/_partials/exhibitions/single/infos/share.html new file mode 100644 index 000000000..398344848 --- /dev/null +++ b/layouts/_partials/exhibitions/single/infos/share.html @@ -0,0 +1,6 @@ +{{ if site.Params.exhibitions.share_links.enabled | default site.Params.share_links.enabled }} +
    • + {{ i18n "commons.share_on" }} + {{ partial "commons/share/links.html" . }} +
    • +{{ end }} \ No newline at end of file diff --git a/layouts/_partials/exhibitions/single/infos/time.html b/layouts/_partials/exhibitions/single/infos/time.html new file mode 100644 index 000000000..2a8bd5294 --- /dev/null +++ b/layouts/_partials/exhibitions/single/infos/time.html @@ -0,0 +1,13 @@ +{{ with .Params.current_time_slot }} + {{ if .start.time }} +
    • + {{ i18n "commons.hour" }} + {{ with .start.time }} + + {{ end }} + {{ with .end.time }} + + {{ end }} +
    • + {{ end }} +{{ end }} \ No newline at end of file diff --git a/layouts/_partials/exhibitions/single/sidebar.html b/layouts/_partials/exhibitions/single/sidebar.html index 5306439cc..7ec075ade 100644 --- a/layouts/_partials/exhibitions/single/sidebar.html +++ b/layouts/_partials/exhibitions/single/sidebar.html @@ -2,7 +2,7 @@
      {{ if site.Params.exhibitions.single.meta_in_sidebar }} {{ end }} {{ partial "toc/container.html" (dict From 10884679a6894eef80f02d88ad7a4f9873289227 Mon Sep 17 00:00:00 2001 From: Alexis BENOIT Date: Tue, 24 Mar 2026 16:10:49 +0100 Subject: [PATCH 11/44] clean useless file --- .../_partials/exhibitions/single/infos/time.html | 13 ------------- 1 file changed, 13 deletions(-) delete mode 100644 layouts/_partials/exhibitions/single/infos/time.html diff --git a/layouts/_partials/exhibitions/single/infos/time.html b/layouts/_partials/exhibitions/single/infos/time.html deleted file mode 100644 index 2a8bd5294..000000000 --- a/layouts/_partials/exhibitions/single/infos/time.html +++ /dev/null @@ -1,13 +0,0 @@ -{{ with .Params.current_time_slot }} - {{ if .start.time }} -
    • - {{ i18n "commons.hour" }} - {{ with .start.time }} - - {{ end }} - {{ with .end.time }} - - {{ end }} -
    • - {{ end }} -{{ end }} \ No newline at end of file From 976969ada2a796f7fc33c939bdcbe7e735a36fc8 Mon Sep 17 00:00:00 2001 From: Olivia Simonet <91660674+Olivia206@users.noreply.github.com> Date: Tue, 24 Mar 2026 16:38:27 +0100 Subject: [PATCH 12/44] Rangement du "contact details" (#1432) Co-authored-by: Alexis BENOIT --- .../_partials/commons/contact-details.html | 66 +++---------------- .../commons/contact-details/address.html | 8 +++ .../commons/contact-details/links.html | 25 +++++++ .../commons/contact-details/links/phones.html | 28 ++++++++ .../contact-details/links/website.html | 13 ++++ layouts/_partials/footer/social.html | 2 +- 6 files changed, 84 insertions(+), 58 deletions(-) create mode 100644 layouts/_partials/commons/contact-details/address.html create mode 100644 layouts/_partials/commons/contact-details/links.html create mode 100644 layouts/_partials/commons/contact-details/links/phones.html create mode 100644 layouts/_partials/commons/contact-details/links/website.html diff --git a/layouts/_partials/commons/contact-details.html b/layouts/_partials/commons/contact-details.html index 251b231a5..d26ee98ff 100644 --- a/layouts/_partials/commons/contact-details.html +++ b/layouts/_partials/commons/contact-details.html @@ -1,68 +1,20 @@ -{{ $subject := .subject }} -{{ $name := $subject.Title }} +{{ $name := .subject.Title }} {{ $with_labels := .with_labels | default true }} -{{ with $subject.Params.contact_details }} + +{{ with .subject.Params.contact_details }}
      {{ if or .websites .social_networks .emails .phone_numbers .phone_professional .postal_address }}
        - {{ with .websites.website }} -
      • - {{ if $with_labels }} - {{ i18n "commons.contact.website" }} - {{ end }} - {{ partial "commons/links/website.html" (dict - "value" .value - "label" .label - "title" (i18n "commons.contact.socials.label.website" (dict "name" $name )) - ) }} -
      • - {{ end }} - - {{ partial "commons/socials" (dict + {{ partial "commons/contact-details/links.html" (dict "context" . "name" $name "with_labels" $with_labels - "in_itemscope" true ) }} - - {{ with .phone_numbers }} - {{ with or .phone_mobile .phone }} -
      • - {{ if $with_labels }} - {{ i18n "commons.contact.phone.label" }} - {{ end }} - {{ partial "commons/links/tel.html" (dict - "value" .value - "label" .label - "title" (i18n "commons.contact.phone.a11y_label" (dict "phone_number" .label)) - ) }} -
      • - {{ end }} - - {{ with .phone_professional }} -
      • - {{ if $with_labels }} - {{ i18n "commons.contact.phone_professional.label" }} - {{ end }} - {{ partial "commons/links/tel.html" (dict - "value" .value - "label" .label - "title" (i18n "commons.contact.phone_professional.a11y_label" (dict "phone_number" .label )) - ) }} -
      • - {{ end }} - {{ end }} - - {{ with .postal_address }} -
      • - {{ if $with_labels }} - {{ i18n "commons.contact.address" }} - {{ end }} - {{ partial "commons/address.html" . }} -
      • - {{ end }} - + {{ partial "commons/contact-details/address.html" (dict + "postal_address" .postal_address + "with_labels" $with_labels + ) }}
      {{ end }}
      -{{ end }} +{{ end }} \ No newline at end of file diff --git a/layouts/_partials/commons/contact-details/address.html b/layouts/_partials/commons/contact-details/address.html new file mode 100644 index 000000000..dfd4ef097 --- /dev/null +++ b/layouts/_partials/commons/contact-details/address.html @@ -0,0 +1,8 @@ +{{ if .postal_address }} +
    • + {{ if .with_labels }} + {{ i18n "commons.contact.address" }} + {{ end }} + {{ partial "commons/address.html" .postal_address }} +
    • +{{ end }} \ No newline at end of file diff --git a/layouts/_partials/commons/contact-details/links.html b/layouts/_partials/commons/contact-details/links.html new file mode 100644 index 000000000..935872b48 --- /dev/null +++ b/layouts/_partials/commons/contact-details/links.html @@ -0,0 +1,25 @@ +{{ $name := .name }} +{{ $with_labels := .with_labels }} + +{{ with .context.websites.website }} + {{ partial "commons/contact-details/links/website.html" (dict + "name" $name + "value" .value + "label" .label + "with_labels" $with_labels + ) }} +{{ end }} + +{{ partial "commons/socials.html" (dict + "context" .context + "name" $name + "with_labels" $with_labels + "in_itemscope" true +) }} + +{{ with .context.phone_numbers }} + {{ partial "commons/contact-details/links/phones.html" (dict + "phones" . + "with_labels" $with_labels + ) }} +{{ end }} \ No newline at end of file diff --git a/layouts/_partials/commons/contact-details/links/phones.html b/layouts/_partials/commons/contact-details/links/phones.html new file mode 100644 index 000000000..a7a97e272 --- /dev/null +++ b/layouts/_partials/commons/contact-details/links/phones.html @@ -0,0 +1,28 @@ +{{ $with_labels := .with_labels }} +{{ with or .phones.phone_mobile .phones.phone }} + {{ $title := i18n "commons.contact.phone.a11y_label" ( dict "phone_number" .label ) }} +
    • + {{ if $with_labels }} + {{ i18n "commons.contact.phone.label" }} + {{ end }} + {{ partial "commons/links/tel.html" (dict + "value" .value + "label" .label + "title" $title + ) }} +
    • +{{ end }} + +{{ with .phones.phone_professional }} + {{ $title := i18n "commons.contact.phone_professional.a11y_label" ( dict "phone_number" .label ) }} +
    • + {{ if $with_labels }} + {{ i18n "commons.contact.phone_professional.label" }} + {{ end }} + {{ partial "commons/links/tel.html" (dict + "value" .value + "label" .label + "title" $title + ) }} +
    • +{{ end }} \ No newline at end of file diff --git a/layouts/_partials/commons/contact-details/links/website.html b/layouts/_partials/commons/contact-details/links/website.html new file mode 100644 index 000000000..a374ceaf4 --- /dev/null +++ b/layouts/_partials/commons/contact-details/links/website.html @@ -0,0 +1,13 @@ +{{ $title := i18n "commons.contact.socials.label.website" (dict "name" .name ) }} + +
    • + {{ if .with_labels }} + {{ i18n "commons.contact.website" }} + {{ end }} + + {{ partial "commons/links/website.html" (dict + "value" .value + "label" .label + "title" $title + ) }} +
    • \ No newline at end of file diff --git a/layouts/_partials/footer/social.html b/layouts/_partials/footer/social.html index 4f43d03ab..a00044b70 100644 --- a/layouts/_partials/footer/social.html +++ b/layouts/_partials/footer/social.html @@ -6,7 +6,7 @@ {{ with site.Params.contact_details }}