From 804a3665a9ff570560b1a41456372aa2694b57a3 Mon Sep 17 00:00:00 2001 From: Alexis BENOIT Date: Mon, 16 Dec 2024 18:32:17 +0100 Subject: [PATCH 1/2] test exhibitions --- assets/sass/_theme/_variables.sass | 10 +++- assets/sass/_theme/blocks/base.sass | 4 -- assets/sass/_theme/sections/events.sass | 11 ++++ hugo.yaml | 5 +- layouts/events/list.html | 4 +- layouts/exhibitions/list.html | 19 +++++++ layouts/exhibitions/single.html | 27 ++++++++++ layouts/partials/GetHeadTitle | 5 +- layouts/partials/blocks/templates/title.html | 2 +- layouts/partials/events/event-children.html | 13 +++++ layouts/partials/events/event.html | 14 ++++- layouts/partials/events/events.html | 52 ++++++++++++++----- layouts/partials/exhibitions/exhibitions.html | 14 +++++ 13 files changed, 157 insertions(+), 23 deletions(-) create mode 100644 layouts/exhibitions/list.html create mode 100644 layouts/exhibitions/single.html create mode 100644 layouts/partials/events/event-children.html create mode 100644 layouts/partials/exhibitions/exhibitions.html diff --git a/assets/sass/_theme/_variables.sass b/assets/sass/_theme/_variables.sass index 245c7beeb..ed57e55d8 100644 --- a/assets/sass/_theme/_variables.sass +++ b/assets/sass/_theme/_variables.sass @@ -160,7 +160,15 @@ @include media-breakpoint-up(xxl) --grid-gutter: #{$grid-gutter-xxl} --grid-gutter-negative: #{-$grid-gutter-xxl} - + + // -------------- // + // SPAGINGS // + // ---------------// + --block-space-y: #{$block-space-y} + @include in-page-without-sidebar + --block-space-y: #{$block-space-y-desktop} + @include in-page-with-sidebar + --block-space-y: #{$block-space-y-with-sidebar} // -------------- // // HEADING // // ---------------// diff --git a/assets/sass/_theme/blocks/base.sass b/assets/sass/_theme/blocks/base.sass index 655ec35f6..51807b01a 100644 --- a/assets/sass/_theme/blocks/base.sass +++ b/assets/sass/_theme/blocks/base.sass @@ -1,5 +1,4 @@ .block - --block-space-y: #{$block-space-y} margin-top: var(--block-space-y) margin-bottom: var(--block-space-y) .block-title @@ -12,12 +11,9 @@ .block-title.sr-only + .description margin-top: 0 @include in-page-without-sidebar - --block-space-y: #{$block-space-y-desktop} .top .description max-width: columns(8) - @include in-page-with-sidebar - --block-space-y: #{$block-space-y-with-sidebar} .heading + .block, .block-title + .block margin-top: var(--heading-margin-bottom) diff --git a/assets/sass/_theme/sections/events.sass b/assets/sass/_theme/sections/events.sass index e1c117a05..428d43edf 100644 --- a/assets/sass/_theme/sections/events.sass +++ b/assets/sass/_theme/sections/events.sass @@ -15,6 +15,17 @@ height: 1px .events__section + .exhibitions + margin-bottom: $spacing-6 + h2 + margin-bottom: var(--heading-margin-bottom) + .events-date-title + margin-bottom: var(--heading-margin-bottom) + &:not(:first-child) + margin-top: var(--heading-margin-top) + .event + &--child + margin-left: offset(4) .archive-link @include icon(arrow-right-line, after, true) @include hover-translate-icon(after) diff --git a/hugo.yaml b/hugo.yaml index 9f9bff63e..c5e7f0ecc 100644 --- a/hugo.yaml +++ b/hugo.yaml @@ -67,8 +67,11 @@ params: date_format: false # You can add date format to override the date from static (two_lines) time_format: false # You can add time format to override the time from static (from.hour & to.hour) index: - truncate_description: 200 # Set to 0 to disable truncate + group_by_date: "Monday 2 January 2006" + highlight_expositions: true layout: list # grid | list + per_page: 10 + truncate_description: 200 # Set to 0 to disable truncate options: dates: true categories: false diff --git a/layouts/events/list.html b/layouts/events/list.html index d770c2c54..4bfa53054 100644 --- a/layouts/events/list.html +++ b/layouts/events/list.html @@ -11,10 +11,12 @@ {{ partial "contents/list.html" . }}
+ {{ if site.Params.events.index.highlight_expositions }} + {{ partial "exhibitions/exhibitions.html" . }} + {{ end }} {{ partial "events/events.html" . }} {{ partial "events/archive-link.html" . }} {{ partial "commons/pagination.html" . }}
- {{ end }} diff --git a/layouts/exhibitions/list.html b/layouts/exhibitions/list.html new file mode 100644 index 000000000..b7163eb95 --- /dev/null +++ b/layouts/exhibitions/list.html @@ -0,0 +1,19 @@ +{{ define "main" }} + {{ partial "events/hero-list.html" . }} +
+ {{ partial "commons/list-content.html" . }} + + {{ partial "events/summary.html" (dict + "with_container" true + "context" . + ) }} + + {{ partial "contents/list.html" . }} + +
+ {{ partial "events/events.html" . }} + {{ partial "events/archive-link.html" . }} + {{ partial "commons/pagination.html" . }} +
+
+{{ end }} diff --git a/layouts/exhibitions/single.html b/layouts/exhibitions/single.html new file mode 100644 index 000000000..6ee1a50eb --- /dev/null +++ b/layouts/exhibitions/single.html @@ -0,0 +1,27 @@ +{{ define "main" }} + {{ partial "events/hero-single.html" . }} + +
+ + + {{ with .Params.summary }}{{ end }} + + {{ partial "events/sidebar.html" . }} + + {{ partial "events/summary.html" (dict + "context" . + "block_wrapped" true + ) }} + + {{ partial "contents/list.html" . }} + + {{ partial "commons/siblings-navigation.html" (dict + "context" . + "previous_label" (i18n "events.previous") + "next_label" (i18n "events.next") + "reversed" (not .Params.dates.archive) + ) }} + + {{ partial "hooks/before-document-content-end.html" . }} +
+{{ end }} diff --git a/layouts/partials/GetHeadTitle b/layouts/partials/GetHeadTitle index 3b1ef0cf7..d6833631f 100644 --- a/layouts/partials/GetHeadTitle +++ b/layouts/partials/GetHeadTitle @@ -17,13 +17,14 @@ {{/* PAGINATION */}} {{ if and (not .IsHome) (eq .Kind "section") }} - {{ with .Paginator }} + {{/* TODO : trouver un moyen de récupérer le numéro de page en utilisant .Paginate */}} + {{/* {{ with .Paginator }} {{ if or .HasPrev .HasNext }} {{ $page_label := i18n "commons.pagination.title" }} {{ $currentPageNumber := .PageNumber }} {{ $title = printf "%s %s %s %d" $title $separator $page_label $currentPageNumber }} {{ end }} - {{ end }} + {{ end }} */}} {{ end }} {{ return $title }} \ No newline at end of file diff --git a/layouts/partials/blocks/templates/title.html b/layouts/partials/blocks/templates/title.html index e9ce9d1c6..b5091b5f7 100644 --- a/layouts/partials/blocks/templates/title.html +++ b/layouts/partials/blocks/templates/title.html @@ -4,7 +4,7 @@ {{ $title := .title }} {{ $slug := .slug }} {{ $is_collapsed := eq .data.layout "collapsed" }} - + {{ with .data }}
+ {{ $class := "event" }} + {{ if .Params.image }} + {{ $class = printf "%s event--with-image" $class }} + {{ end -}} + {{ if .Params.children }} + {{ $class = printf "%s event--parent" $class }} + {{ end -}} + {{ if .Params.parent }} + {{ $class = printf "%s event--child" $class }} + {{ end -}} + +
{{- $title := partial "PrepareHTML" .Title -}} {{ if and $options.subtitle .Params.subtitle }} @@ -63,6 +74,7 @@ )}} {{- end -}}
+
{{- if and $options.image .Params.image -}} {{- partial "commons/image.html" diff --git a/layouts/partials/events/events.html b/layouts/partials/events/events.html index 8169cf10a..a774b4644 100644 --- a/layouts/partials/events/events.html +++ b/layouts/partials/events/events.html @@ -1,14 +1,42 @@ {{ $layout := site.Params.events.index.layout }} +{{ $collection := where .Pages "Params.parent" "eq" nil }} +{{ $is_archive := ne .File.Path "events/_index.html" }} +{{ $order := "asc" }} -
- {{ if not .Pages }} -

{{ i18n "events.none" }}

- {{ end }} - {{ range .Paginator.Pages }} - {{ partial "events/event.html" (dict - "event" . - "layout" $layout - "options" site.Params.events.index.options - )}} - {{ end }} -
+{{ if $is_archive }} + {{ $order = "desc" }} +{{ else }} + {{ $collection = where $collection "Params.dates.archive" false }} +{{ end }} + +{{ if site.Params.events.index.highlight_expositions }} + {{ $collection = where $collection "Params.event_kind" "ne" "exposition" }} +{{ end }} + +{{ $groups := $collection.GroupByDate site.Params.events.index.group_by_date $order }} +{{ $paginator := .Paginate $groups site.Params.events.index.per_page }} + +{{ if not .Pages }} +

{{ i18n "events.none" }}

+{{ else }} +
+ {{ range $paginator.PageGroups }} + +

{{ .Key }}

+ + {{ range .Pages }} + {{ partial "events/event.html" (dict + "event" . + "layout" $layout + "options" site.Params.events.index.options + )}} + + {{ partial "events/event-children.html" (dict + "event" . + "layout" $layout + "options" site.Params.events.index.options + )}} + {{ end }} + {{ end }} +
+{{ end }} diff --git a/layouts/partials/exhibitions/exhibitions.html b/layouts/partials/exhibitions/exhibitions.html new file mode 100644 index 000000000..56a6ef8bb --- /dev/null +++ b/layouts/partials/exhibitions/exhibitions.html @@ -0,0 +1,14 @@ +{{ $exhibitions := where .Site.RegularPages "Section" "exhibitions" }} +
+

Expositions

+ +
+ {{ range $exhibitions }} + {{ partial "events/event.html" (dict + "event" . + "layout" "grid" + "options" site.Params.events.index.options + )}} + {{ end }} +
+
\ No newline at end of file From 7270f52fb80533cd2600ccbebadc2d78ef02842f Mon Sep 17 00:00:00 2001 From: Arnaud Levy Date: Wed, 18 Dec 2024 09:51:56 +0100 Subject: [PATCH 2/2] structure --- assets/sass/_theme/hugo-osuny.sass | 3 +- .../_theme/sections/{ => agenda}/events.sass | 0 .../_theme/sections/agenda/exhibitions.sass | 299 ++++++++++++++++++ hugo.yaml | 108 ++++--- .../list.html | 0 .../term.html | 2 +- layouts/{events => agenda_events}/list.html | 12 +- layouts/{events => agenda_events}/single.html | 6 +- .../list.html | 8 +- .../single.html | 6 +- .../{ => agenda}/events/archive-link.html | 0 .../{ => agenda}/events/event-children.html | 4 +- .../{ => agenda}/events/event-infos.html | 6 +- .../{ => agenda}/events/event-schedule.html | 6 +- .../partials/{ => agenda}/events/event.html | 2 +- .../partials/{ => agenda}/events/events.html | 20 +- .../{ => agenda}/events/hero-list.html | 0 .../{ => agenda}/events/hero-single.html | 0 .../partials/{ => agenda}/events/sidebar.html | 2 +- .../partials/{ => agenda}/events/summary.html | 0 .../agenda/exhibitions/exhibition.html | 90 ++++++ .../agenda/exhibitions/exhibitions.html | 12 + .../partials/agenda/exhibitions/schedule.html | 13 + .../partials/agenda/exhibitions/summary.html | 1 + layouts/partials/contents/backlinks.html | 4 +- layouts/partials/exhibitions/exhibitions.html | 14 - 26 files changed, 519 insertions(+), 99 deletions(-) rename assets/sass/_theme/sections/{ => agenda}/events.sass (100%) create mode 100644 assets/sass/_theme/sections/agenda/exhibitions.sass rename layouts/{events_categories => agenda_categories}/list.html (100%) rename layouts/{events_categories => agenda_categories}/term.html (90%) rename layouts/{events => agenda_events}/list.html (50%) rename layouts/{events => agenda_events}/single.html (82%) rename layouts/{exhibitions => agenda_exhibitions}/list.html (59%) rename layouts/{exhibitions => agenda_exhibitions}/single.html (83%) rename layouts/partials/{ => agenda}/events/archive-link.html (100%) rename layouts/partials/{ => agenda}/events/event-children.html (68%) rename layouts/partials/{ => agenda}/events/event-infos.html (89%) rename layouts/partials/{ => agenda}/events/event-schedule.html (89%) rename layouts/partials/{ => agenda}/events/event.html (98%) rename layouts/partials/{ => agenda}/events/events.html (50%) rename layouts/partials/{ => agenda}/events/hero-list.html (100%) rename layouts/partials/{ => agenda}/events/hero-single.html (100%) rename layouts/partials/{ => agenda}/events/sidebar.html (78%) rename layouts/partials/{ => agenda}/events/summary.html (100%) create mode 100644 layouts/partials/agenda/exhibitions/exhibition.html create mode 100644 layouts/partials/agenda/exhibitions/exhibitions.html create mode 100644 layouts/partials/agenda/exhibitions/schedule.html create mode 100644 layouts/partials/agenda/exhibitions/summary.html delete mode 100644 layouts/partials/exhibitions/exhibitions.html diff --git a/assets/sass/_theme/hugo-osuny.sass b/assets/sass/_theme/hugo-osuny.sass index 161bd01f4..b09b954d0 100644 --- a/assets/sass/_theme/hugo-osuny.sass +++ b/assets/sass/_theme/hugo-osuny.sass @@ -73,10 +73,11 @@ // Sections @import sections/administrators +@import sections/agenda/events +@import sections/agenda/exhibitions @import sections/authors @import sections/categories @import sections/diplomas -@import sections/events @import sections/locations @import sections/organizations @import sections/pages diff --git a/assets/sass/_theme/sections/events.sass b/assets/sass/_theme/sections/agenda/events.sass similarity index 100% rename from assets/sass/_theme/sections/events.sass rename to assets/sass/_theme/sections/agenda/events.sass diff --git a/assets/sass/_theme/sections/agenda/exhibitions.sass b/assets/sass/_theme/sections/agenda/exhibitions.sass new file mode 100644 index 000000000..10485d012 --- /dev/null +++ b/assets/sass/_theme/sections/agenda/exhibitions.sass @@ -0,0 +1,299 @@ +.exhibitions__page + .lead + @include h3 + // Safe spacing if post is empty + &:not(.full-width) + .exhibition-sidebar + @include sidebar + @include media-breakpoint-up(desktop) + .document-content + min-height: 600px + // Add after element to avoid "min-height" to ignore the last block's margin-bottom + &::after + content: '' + display: block + height: 1px + +.exhibitions__section + .exhibitions + margin-bottom: $spacing-6 + h2 + margin-bottom: var(--heading-margin-bottom) + .exhibitions-date-title + margin-bottom: var(--heading-margin-bottom) + &:not(:first-child) + margin-top: var(--heading-margin-top) + .exhibition + &--child + margin-left: offset(4) + .archive-link + @include icon(arrow-right-line, after, true) + @include hover-translate-icon(after) + display: block + text-align: right + text-decoration: none + @include media-breakpoint-down(desktop) + .exhibitions + margin-bottom: $spacing-4 + .archive-link + text-align: left + +.exhibition-infos + @include list-reset + @include media-breakpoint-up(desktop) + font-size: $table-body-size-desktop + padding-bottom: $spacing-5 + .exhibition-date + text-transform: capitalize + ul + @include list-reset + > li + padding-top: $spacing-2 + &:not(:last-child) + padding-bottom: $spacing-2 + > span + @include meta + color: var(--color-text-alt) + padding-left: 0 + display: block + white-space: nowrap + time + time + @include icon(arrow-right-line) + &::before + padding-right: 0.3rem + .exhibitions-categories + display: flex + column-gap: $spacing-1 + flex-wrap: wrap + a + @include link(var(--color-accent)) + .exhibitions-actions + ul + align-items: start + display: flex + flex-direction: column + gap: space(1) + padding-bottom: 0 + margin-top: space(1) + a + display: block + &::after + display: none + .share + a + color: inherit + li:first-child a + padding-left: 0 + +.exhibition + &-title + a + @include stretched-link + text-decoration: none + &-subtitle + @include h3 + color: var(--color-text-alt) + &-categories + @include meta + @include list-reset + margin-top: $spacing-2 + display: flex + flex-wrap: wrap + column-gap: $spacing-1 + position: relative + z-index: 2 + li:not(:last-child) + a::after + content: ', ' + &-schedule + p + p + margin-top: 0 + &-dates + span + span + &::before + content: ' — ' + &-time + @include meta + span + white-space: nowrap + + span + @include icon(arrow-right-line, before) + margin-left: space() + margin-right: space() + .media + &:empty + display: none + img + display: block + @include media-breakpoint-up(desktop) + &-time + display: flex + +.exhibitions + &--list + .exhibition + border-bottom: 1px solid var(--color-border) + display: flex + flex-direction: column + margin-bottom: $spacing-3 + padding-bottom: $spacing-3 + position: relative + &-title + @include h3 + &-schedule + @include h4 + &-content + order: 2 + @include media-breakpoint-down(desktop) + @include media-breakpoint-up(md) + flex-direction: row + gap: $spacing-3 + .media + width: columns(4) + &-content + order: 1 + width: columns(8) + @include media-breakpoint-down(md) + .media + max-width: 33% + margin-bottom: $spacing-2 + &-content + order: 1 + @include media-breakpoint-up(md) + .media + grid-column: 10 / 13 + @include media-breakpoint-up(desktop) + flex-direction: row + gap: var(--grid-gutter) + align-items: start + &-content + > hgroup, > .exhibition-title + margin-bottom: $spacing-2 + .media + order: 2 + @include in-page-without-sidebar + &-schedule + margin-bottom: $spacing-3 + &-dates + @include h3 + span + display: block + + span + &::before + display: none + &-time + margin-top: $spacing-2 + &-content + @include grid(10, desktop, 0) + order: 1 + grid-column: 1 / 11 + width: columns(10) + > .exhibition-title, > hgroup, .exhibition-description, .exhibition-categories, .exhibition-status + grid-column: 5 / 11 + > .exhibition-schedule + grid-column: 1 / 5 + grid-row: 1 / 4 + .media + width: columns(2) + @include in-page-with-sidebar + @include grid(8) + &-content + order: 1 + grid-column: 6 span + margin-top: $spacing-1 + &-schedule + margin-top: $spacing-1 + margin-bottom: $spacing-2 + &-time + display: inline + .media + grid-column: 2 span + + &--grid + @include grid(2, md, $spacing-4) + .exhibition + display: flex + flex-direction: column + position: relative + &-schedule + @include meta + margin-top: $spacing-2 + &-content + .exhibition-title, hgroup + @include h3 + &-description + margin-top: $spacing-2 + .media + margin-bottom: $spacing-2 + order: -1 + img + aspect-ratio: 1 + object-fit: cover + width: 100% + @include media-breakpoint-down(md) + .exhibition + + .exhibition + margin-top: $spacing-4 + @include in-page-without-sidebar + @include grid(3, desktop) + + &--large + .exhibition + display: flex + flex-direction: row + position: relative + gap: var(--grid-gutter) + + .exhibition + margin-top: $spacing-5 + &-content + display: flex + flex-direction: column + .exhibition-description + order: 2 + .exhibition-description + .exhibition-categories + margin-bottom: $spacing-2 + &-dates + @include h4 + margin-top: $spacing-2 + &-content + flex: 1 + .exhibition-title, + .exhibition-subtitle, + hgroup + @include h2 + .more + @include icon(arrow-right, after) + margin-top: $spacing-3 + &::after + margin-left: $spacing-1 + .media + order: -1 + img + aspect-ratio: 1 + object-fit: cover + width: 100% + @include media-breakpoint-up(desktop) + + .exhibition + margin-top: var(--grid-gutter) + .media + width: columns(4) + .exhibition-schedule + margin-bottom: $spacing-4 + @include media-breakpoint-down(desktop) + flex-direction: column + .media + margin-left: var(--grid-gutter-negative) + margin-right: var(--grid-gutter-negative) + @include in-page-without-sidebar + align-items: center + .exhibition-dates + @include h3 + .exhibition-title, + .exhibition-subtitle, + hgroup + @include lead + .media + width: columns(6) + &:not(.exhibition--with-image) + width: columns(5) + margin-left: offset(4) diff --git a/hugo.yaml b/hugo.yaml index c5e7f0ecc..596b14ce8 100644 --- a/hugo.yaml +++ b/hugo.yaml @@ -4,16 +4,16 @@ ignoreLogs: ['warning-goldmark-raw-html'] pagination: pagerSize: 36 params: + + +################ +# Design system +################ + breadcrumb: + position: hero-start # hero-start | hero-end | after-hero | none debug: active: false productionUrl: "" - keycdn: https://osuny-1b4da.kxcdn.com - plausible: false - seo: - title: - separator: "|" - - # DESIGN SYSTEM logo: header: "/assets/images/logo.svg" footer: "/assets/images/logo.svg" @@ -29,22 +29,19 @@ params: linkToLevel1: false i18n: display: true - breadcrumb: - position: hero-start # hero-start | hero-end | after-hero | none - summary: - position: hero # hero | content + keycdn: https://osuny-1b4da.kxcdn.com + plausible: false + seo: + title: + separator: "|" search: active: false position: primary # primary | upper-menu | fixed | footer appearance: icon # icon | text | both - home: - head: - title: both # both | page | site - toc: - disabled: true + summary: + position: hero # hero | content toc: force_offcanvas: false - # Enabled network for share action # You can also specify this options for each sharable Section share_links: @@ -57,37 +54,50 @@ params: twitter: false whatsapp: false - # SECTIONS +################ +# Sections +################ + agenda: + events: + default_image: false + date_format: false # You can add date format to override the date from static (two_lines) + time_format: false # You can add time format to override the time from static (from.hour & to.hour) + index: + group_by_date: "Monday 2 January 2006" + highlight_exhibitions: true + layout: list # grid | list + per_page: 10 + truncate_description: 200 # Set to 0 to disable truncate + options: + dates: true + categories: false + image: true + status: false + subtitle: true + summary: true + # share_links: # Optional + # enabled: true + # email: false + # facebook: true + # linkedin: true + # mastodon: false + # telegram: false + # twitter: true + # whatsapp: false + exhibitions: + default_image: false + date_format: false # You can add date format to override the date from static (two_lines) + time_format: false # You can add time format to override the time from static (from.hour & to.hour) + diplomas: single: programs: options: false # You can set options for programs layout (see programs.index.options) - events: - default_image: false - date_format: false # You can add date format to override the date from static (two_lines) - time_format: false # You can add time format to override the time from static (from.hour & to.hour) - index: - group_by_date: "Monday 2 January 2006" - highlight_expositions: true - layout: list # grid | list - per_page: 10 - truncate_description: 200 # Set to 0 to disable truncate - options: - dates: true - categories: false - image: true - status: false - subtitle: true - summary: true - # share_links: # Optional - # enabled: true - # email: false - # facebook: true - # linkedin: true - # mastodon: false - # telegram: false - # twitter: true - # whatsapp: false + home: + head: + title: both # both | page | site + toc: + disabled: true organizations: dark_logo_background: false map_marker_icon: '/assets/images/map-marker.svg' @@ -223,7 +233,10 @@ params: volumes: default_image: false - # BLOCKS + +################ +# Blocks +################ blocks: gallery: slider: @@ -246,6 +259,11 @@ params: slider: arrows: true progression: true + + +################ +# Image sizes +################ image_sizes: design_system: lightbox: diff --git a/layouts/events_categories/list.html b/layouts/agenda_categories/list.html similarity index 100% rename from layouts/events_categories/list.html rename to layouts/agenda_categories/list.html diff --git a/layouts/events_categories/term.html b/layouts/agenda_categories/term.html similarity index 90% rename from layouts/events_categories/term.html rename to layouts/agenda_categories/term.html index 42a68b544..662b94b24 100644 --- a/layouts/events_categories/term.html +++ b/layouts/agenda_categories/term.html @@ -15,7 +15,7 @@ {{ partial "contents/list.html" . }}
- {{ partial "events/events.html" . }} + {{ partial "agenda/events/events.html" . }} {{ partial "commons/pagination.html" . }}
diff --git a/layouts/events/list.html b/layouts/agenda_events/list.html similarity index 50% rename from layouts/events/list.html rename to layouts/agenda_events/list.html index 4bfa53054..e37fa30f0 100644 --- a/layouts/events/list.html +++ b/layouts/agenda_events/list.html @@ -1,9 +1,9 @@ {{ define "main" }} - {{ partial "events/hero-list.html" . }} + {{ partial "agenda/events/hero-list.html" . }}
{{ partial "commons/list-content.html" . }} - {{ partial "events/summary.html" (dict + {{ partial "agenda/events/summary.html" (dict "with_container" true "context" . ) }} @@ -11,11 +11,11 @@ {{ partial "contents/list.html" . }}
- {{ if site.Params.events.index.highlight_expositions }} - {{ partial "exhibitions/exhibitions.html" . }} + {{ if site.Params.agenda.events.index.highlight_exhibitions }} + {{ partial "agenda/exhibitions/exhibitions.html" }} {{ end }} - {{ partial "events/events.html" . }} - {{ partial "events/archive-link.html" . }} + {{ partial "agenda/events/events.html" . }} + {{ partial "agenda/events/archive-link.html" . }} {{ partial "commons/pagination.html" . }}
diff --git a/layouts/events/single.html b/layouts/agenda_events/single.html similarity index 82% rename from layouts/events/single.html rename to layouts/agenda_events/single.html index d3e446a4c..9d0360923 100644 --- a/layouts/events/single.html +++ b/layouts/agenda_events/single.html @@ -1,14 +1,14 @@ {{ define "main" }} - {{ partial "events/hero-single.html" . }} + {{ partial "agenda/events/hero-single.html" . }}
{{ with .Params.summary }}{{ end }} - {{ partial "events/sidebar.html" . }} + {{ partial "agenda/events/sidebar.html" . }} - {{ partial "events/summary.html" (dict + {{ partial "agenda/events/summary.html" (dict "context" . "block_wrapped" true ) }} diff --git a/layouts/exhibitions/list.html b/layouts/agenda_exhibitions/list.html similarity index 59% rename from layouts/exhibitions/list.html rename to layouts/agenda_exhibitions/list.html index b7163eb95..9a9ad63d4 100644 --- a/layouts/exhibitions/list.html +++ b/layouts/agenda_exhibitions/list.html @@ -1,9 +1,9 @@ {{ define "main" }} - {{ partial "events/hero-list.html" . }} + {{ partial "agenda/events/hero-list.html" . }}
{{ partial "commons/list-content.html" . }} - {{ partial "events/summary.html" (dict + {{ partial "agenda/exhibitions/summary.html" (dict "with_container" true "context" . ) }} @@ -11,8 +11,8 @@ {{ partial "contents/list.html" . }}
- {{ partial "events/events.html" . }} - {{ partial "events/archive-link.html" . }} + {{ partial "agenda/exhibitions/exhibitions.html" }} + {{ partial "agenda/events/archive-link.html" . }} {{ partial "commons/pagination.html" . }}
diff --git a/layouts/exhibitions/single.html b/layouts/agenda_exhibitions/single.html similarity index 83% rename from layouts/exhibitions/single.html rename to layouts/agenda_exhibitions/single.html index 6ee1a50eb..e3235f150 100644 --- a/layouts/exhibitions/single.html +++ b/layouts/agenda_exhibitions/single.html @@ -1,14 +1,14 @@ {{ define "main" }} - {{ partial "events/hero-single.html" . }} + {{ partial "agenda/events/hero-single.html" . }}
{{ with .Params.summary }}{{ end }} - {{ partial "events/sidebar.html" . }} + {{ partial "agenda/events/sidebar.html" . }} - {{ partial "events/summary.html" (dict + {{ partial "agenda/events/summary.html" (dict "context" . "block_wrapped" true ) }} diff --git a/layouts/partials/events/archive-link.html b/layouts/partials/agenda/events/archive-link.html similarity index 100% rename from layouts/partials/events/archive-link.html rename to layouts/partials/agenda/events/archive-link.html diff --git a/layouts/partials/events/event-children.html b/layouts/partials/agenda/events/event-children.html similarity index 68% rename from layouts/partials/events/event-children.html rename to layouts/partials/agenda/events/event-children.html index 6afa69a35..d1da2b1bb 100644 --- a/layouts/partials/events/event-children.html +++ b/layouts/partials/agenda/events/event-children.html @@ -4,10 +4,10 @@ {{ range .event.Params.children_for_the_day }} {{ $child := site.GetPage .path }} {{ with $child }} - {{ partial "events/event.html" (dict + {{ partial "agenda/events/event.html" (dict "event" . "layout" $layout - "options" site.Params.events.index.options + "options" site.Params.agenda.events.index.options )}} {{ end }} {{ end }} \ No newline at end of file diff --git a/layouts/partials/events/event-infos.html b/layouts/partials/agenda/events/event-infos.html similarity index 89% rename from layouts/partials/events/event-infos.html rename to layouts/partials/agenda/events/event-infos.html index c467e2d5b..a9e9e6d9f 100644 --- a/layouts/partials/events/event-infos.html +++ b/layouts/partials/agenda/events/event-infos.html @@ -19,16 +19,16 @@ {{ end }} {{ end }} - {{ if .Params.events_categories }} + {{ if .Params.agenda.events_categories }}
  • - {{ i18n "events.category" ( len .Params.events_categories ) }} + {{ i18n "events.category" ( len .Params.agenda.events_categories ) }} {{ partial "commons/categories" ( dict "context" . "kind" "event" )}}
  • {{ end }} - {{ if site.Params.events.share_links.enabled | default site.Params.share_links.enabled }} + {{ if site.Params.agenda.events.share_links.enabled | default site.Params.share_links.enabled }}
  • {{ i18n "events.share" }} {{ partial "commons/share.html" . }} diff --git a/layouts/partials/events/event-schedule.html b/layouts/partials/agenda/events/event-schedule.html similarity index 89% rename from layouts/partials/events/event-schedule.html rename to layouts/partials/agenda/events/event-schedule.html index 77355d146..27179aac3 100644 --- a/layouts/partials/events/event-schedule.html +++ b/layouts/partials/agenda/events/event-schedule.html @@ -7,7 +7,7 @@ {{ if ne $layout "list" }} {{ $formated_date = $dates.computed.short }} {{ end }} - {{ with site.Params.events.date_format }} + {{ with site.Params.agenda.events.date_format }} {{ $formated_date = time.Format . $dates.from.day }} {{ if ne $dates.from.day $dates.to.day }} {{ $formated_date = printf "%s%s" $formated_date ( time.Format . $dates.to.day ) }} @@ -20,14 +20,14 @@

    {{ with $dates.from.hour }} {{- $hour = . -}} - {{- with site.Params.events.time_format }} + {{- with site.Params.agenda.events.time_format }} {{- $hour = time.Format . (printf "2021-09-01T%s:00" $hour) -}} {{ end -}} {{- $hour -}} {{- end -}} {{- with $dates.to.hour -}} {{- $hour = . -}} - {{- with site.Params.events.time_format -}} + {{- with site.Params.agenda.events.time_format -}} {{- $hour = time.Format . (printf "2021-09-01T%s:00" $hour) -}} {{- end -}} {{- $hour -}} diff --git a/layouts/partials/events/event.html b/layouts/partials/agenda/events/event.html similarity index 98% rename from layouts/partials/events/event.html rename to layouts/partials/agenda/events/event.html index 4ea9139a3..b27661872 100644 --- a/layouts/partials/events/event.html +++ b/layouts/partials/agenda/events/event.html @@ -37,7 +37,7 @@ {{ $dates := .Params.dates }} {{ if $options.dates }} - {{ partial "events/event-schedule" (dict + {{ partial "agenda/events/event-schedule" (dict "dates" $dates "layout" $layout )}} diff --git a/layouts/partials/events/events.html b/layouts/partials/agenda/events/events.html similarity index 50% rename from layouts/partials/events/events.html rename to layouts/partials/agenda/events/events.html index a774b4644..d7d31ea88 100644 --- a/layouts/partials/events/events.html +++ b/layouts/partials/agenda/events/events.html @@ -1,6 +1,6 @@ -{{ $layout := site.Params.events.index.layout }} +{{ $layout := site.Params.agenda.events.index.layout }} {{ $collection := where .Pages "Params.parent" "eq" nil }} -{{ $is_archive := ne .File.Path "events/_index.html" }} +{{ $is_archive := ne .File.Path "agenda_events/_index.html" }} {{ $order := "asc" }} {{ if $is_archive }} @@ -9,12 +9,12 @@ {{ $collection = where $collection "Params.dates.archive" false }} {{ end }} -{{ if site.Params.events.index.highlight_expositions }} +{{ if site.Params.agenda.events.index.highlight_exhibitions }} {{ $collection = where $collection "Params.event_kind" "ne" "exposition" }} {{ end }} -{{ $groups := $collection.GroupByDate site.Params.events.index.group_by_date $order }} -{{ $paginator := .Paginate $groups site.Params.events.index.per_page }} +{{ $groups := $collection.GroupByDate site.Params.agenda.events.index.group_by_date $order }} +{{ $paginator := .Paginate $groups site.Params.agenda.events.index.per_page }} {{ if not .Pages }}

    {{ i18n "events.none" }}

    @@ -22,19 +22,19 @@
    {{ range $paginator.PageGroups }} -

    {{ .Key }}

    +

    {{ .Key | humanize }}

    {{ range .Pages }} - {{ partial "events/event.html" (dict + {{ partial "agenda/events/event.html" (dict "event" . "layout" $layout - "options" site.Params.events.index.options + "options" site.Params.agenda.events.index.options )}} - {{ partial "events/event-children.html" (dict + {{ partial "agenda/events/event-children.html" (dict "event" . "layout" $layout - "options" site.Params.events.index.options + "options" site.Params.agenda.events.index.options )}} {{ end }} {{ end }} diff --git a/layouts/partials/events/hero-list.html b/layouts/partials/agenda/events/hero-list.html similarity index 100% rename from layouts/partials/events/hero-list.html rename to layouts/partials/agenda/events/hero-list.html diff --git a/layouts/partials/events/hero-single.html b/layouts/partials/agenda/events/hero-single.html similarity index 100% rename from layouts/partials/events/hero-single.html rename to layouts/partials/agenda/events/hero-single.html diff --git a/layouts/partials/events/sidebar.html b/layouts/partials/agenda/events/sidebar.html similarity index 78% rename from layouts/partials/events/sidebar.html rename to layouts/partials/agenda/events/sidebar.html index e491bc701..af5a1546d 100644 --- a/layouts/partials/events/sidebar.html +++ b/layouts/partials/agenda/events/sidebar.html @@ -1,7 +1,7 @@