diff --git a/assets/sass/_theme/hugo-osuny.sass b/assets/sass/_theme/hugo-osuny.sass index 216dc1a36961d8272f38687b9b0b7dc3b4df5d6a..e998ad1616e131fb89d5f23027acd41af6821cce 100644 --- a/assets/sass/_theme/hugo-osuny.sass +++ b/assets/sass/_theme/hugo-osuny.sass @@ -67,6 +67,7 @@ @import "sections/categories" @import "sections/diplomas" @import "sections/events" +@import "sections/locations" @import "sections/organizations" @import "sections/pages" @import "sections/papers" diff --git a/assets/sass/_theme/sections/locations.sass b/assets/sass/_theme/sections/locations.sass new file mode 100644 index 0000000000000000000000000000000000000000..8cd29ad82caefdb95f0258901553cd9d182c8d4d --- /dev/null +++ b/assets/sass/_theme/sections/locations.sass @@ -0,0 +1,22 @@ +.locations__taxonomy + .locations + .location + @include media-breakpoint-up(desktop) + .media + width: col(4) + &-content + width: col(6) + +.location + display: flex + gap: $grid-gutter + .media + order: -1 + &-title + @include icon(arrow-right, after) + @include media-breakpoint-down(desktop) + flex-direction: column + .media + // TODO : REMOVE HALF + margin-left: half(-$grid-gutter) + margin-right: half(-$grid-gutter) \ No newline at end of file diff --git a/config.yaml b/config.yaml index fa8733f4a06d13be3a29d58c30618d166d8531a1..319c75be035609595d677a3bbb20e029096a877a 100644 --- a/config.yaml +++ b/config.yaml @@ -52,6 +52,8 @@ params: direction: start volumes: default_image: false + locations: + default_image: false persons: index: layout: grid # grid | list @@ -271,4 +273,17 @@ params: item: mobile: 327x388 tablet: 208x247 - desktop: 300x356 \ No newline at end of file + desktop: 300x356 + locations: + hero: + mobile: 400 + tablet: 800 + desktop: 900 + hero_single: + mobile: 400 + tablet: 800 + desktop: 900 + item: + mobile: 350 + tablet: 450 + desktop: 900 \ No newline at end of file diff --git a/layouts/locations/list.html b/layouts/locations/list.html new file mode 100644 index 0000000000000000000000000000000000000000..68d9923f33bf9ea13088257345d03af5084f1ca8 --- /dev/null +++ b/layouts/locations/list.html @@ -0,0 +1,19 @@ +{{ define "main" }} + {{ partial "locations/hero-list.html" . }} + + <div class="document-content"> + {{ partial "commons/list-content.html" . }} + + {{ partial "locations/summary.html" (dict + "with_container" true + "context" . + ) }} + + {{ partial "contents/list.html" . }} + + <div class="container"> + {{ partial "locations/locations.html" . }} + </div> + </div> + +{{ end }} diff --git a/layouts/locations/term.html b/layouts/locations/term.html new file mode 100644 index 0000000000000000000000000000000000000000..5f5e7743fdf355186bbec4806cc354b20cfb4a1e --- /dev/null +++ b/layouts/locations/term.html @@ -0,0 +1,19 @@ +{{ define "main" }} + {{ partial "locations/hero-single.html" . }} + + <div class="document-content" itemscope itemtype="https://schema.org/EducationalOrganization"> + <meta itemprop="name" content="{{ partial "PrepareHTML" .Title }}"> + <meta itemprop="url" content="{{ .Permalink }}"> + {{ with .Params.summary }}<meta itemprop="abstract" content="{{ . | safeHTML }}">{{ end }} + {{ with .Summary }}<meta itemprop="description" content="{{ . | safeHTML }}">{{ end }} + + {{ partial "locations/summary.html" (dict + "context" . + "block_wrapped" true + ) }} + + {{ partial "contents/list.html" . }} + + {{ partial "hooks/before-document-content-end.html" . }} + </div> +{{ end }} diff --git a/layouts/partials/locations/hero-list.html b/layouts/partials/locations/hero-list.html new file mode 100644 index 0000000000000000000000000000000000000000..b356483e36715e2266e9d0c729a4edf9f9d68bb8 --- /dev/null +++ b/layouts/partials/locations/hero-list.html @@ -0,0 +1,8 @@ +{{- $title := or .Params.header_text .Title -}} +{{- partial "header/hero.html" + (dict + "title" $title + "image" .Params.image + "sizes" site.Params.image_sizes.sections.events.hero + "context" . + ) -}} diff --git a/layouts/partials/locations/hero-single.html b/layouts/partials/locations/hero-single.html new file mode 100644 index 0000000000000000000000000000000000000000..d13a6df8e12dab19693241749dfc9fe457affead --- /dev/null +++ b/layouts/partials/locations/hero-single.html @@ -0,0 +1,13 @@ +{{- $title := or .Params.header_text .Title -}} + +{{ with .Params.subtitle }} + {{- $title = printf "%s <span>%s</span>" $title . -}} +{{ end }} + +{{- partial "header/hero.html" + (dict + "title" $title + "image" .Params.image + "sizes" site.Params.image_sizes.sections.events.hero_single + "context" . + ) -}} diff --git a/layouts/partials/locations/location.html b/layouts/partials/locations/location.html new file mode 100644 index 0000000000000000000000000000000000000000..23ffb50b17fa313d063b3de4943edd205c77e884 --- /dev/null +++ b/layouts/partials/locations/location.html @@ -0,0 +1,34 @@ +{{ $location := . }} + +{{ with $location }} + <article class="location" itemscope itemtype="https://schema.org/EducationalOrganization"> + <div class="location-content"> + {{- $title := partial "PrepareHTML" .Title -}} + <h2 class="location-title"> + <a href="{{ .Permalink }}" title="{{ safeHTML (i18n "commons.more_aria" (dict "Title" $title)) }}">{{ $title }}</a> + </h2> + + {{- if (partial "GetTextFromHTML" .Params.summary) -}} + <div class="location-description"> + <p itemprop="description"> + {{ partial "GetTruncateContent" ( dict + "text" .Params.summary + "length" site.Params.locations.index.truncate_description + ) }} + </p> + </div> + {{- end -}} + </div> + <div class="media"> + {{- if .Params.image -}} + {{- partial "commons/image.html" + (dict + "image" .Params.image + "sizes" site.Params.image_sizes.sections.locations.item + ) -}} + {{- else -}} + {{- partial "commons/image-default.html" "locations" -}} + {{- end -}} + </div> + </article> +{{ end }} \ No newline at end of file diff --git a/layouts/partials/locations/locations.html b/layouts/partials/locations/locations.html new file mode 100644 index 0000000000000000000000000000000000000000..1ad976ad7df24796932262203ddad70583b2ff51 --- /dev/null +++ b/layouts/partials/locations/locations.html @@ -0,0 +1,6 @@ + +<div class="locations"> + {{ range .Paginator.Pages }} + {{ partial "locations/location.html" . }} + {{ end }} +</div> diff --git a/layouts/partials/locations/sidebar.html b/layouts/partials/locations/sidebar.html new file mode 100644 index 0000000000000000000000000000000000000000..e491bc701e84e96c7b261eafc950394b3eefb010 --- /dev/null +++ b/layouts/partials/locations/sidebar.html @@ -0,0 +1,14 @@ +<div class="section-sidebar event-sidebar"> + <div> + <aside> + {{- partial "events/event-infos.html" . -}} + </aside> + + {{ partial "toc/container.html" + (dict + "toc" "toc/default.html" + "context" . + ) + }} + </div> +</div> diff --git a/layouts/partials/locations/summary copy.html b/layouts/partials/locations/summary copy.html new file mode 100644 index 0000000000000000000000000000000000000000..85e4edf81a14c7fedc7c790f755b91710a4d9224 --- /dev/null +++ b/layouts/partials/locations/summary copy.html @@ -0,0 +1 @@ +{{- partial "commons/summary-in-content.html" . -}} diff --git a/layouts/partials/locations/summary.html b/layouts/partials/locations/summary.html new file mode 100644 index 0000000000000000000000000000000000000000..089279d8e6196a9d0353cd6bb18928a2eaeedaca --- /dev/null +++ b/layouts/partials/locations/summary.html @@ -0,0 +1 @@ +{{- partial "commons/summary-in-content.html" . -}} \ No newline at end of file