Skip to content
Snippets Groups Projects
Commit f8fa3b9f authored by Arnaud Levy's avatar Arnaud Levy
Browse files

init

parent 5806e239
No related branches found
No related tags found
No related merge requests found
......@@ -21,6 +21,15 @@ params:
home:
toc:
disabled: true
events:
default_image: false
date_format: ":date_long"
index:
show_categories: false
show_author: false
show_description: true
truncate_description: 200 # Set to 0 to disable truncate
layout: list # grid | list
organizations:
dark_logo_background: false
pages:
......@@ -117,6 +126,19 @@ params:
mobile: 400
tablet: 800
desktop: 900
events:
hero:
mobile: 400
tablet: 800
desktop: 900
hero_single:
mobile: 400
tablet: 800
desktop: 900
item:
mobile: 350
tablet: 450
desktop: 900
organizations:
hero:
mobile: 400
......
......@@ -136,6 +136,8 @@ cookie_banner:
title: Cookie banner
diplomas:
type: Type de diplôme
events:
none: No event
formats:
pdf: Adobe Portable Document Format
jpg: JPEG image
......
......@@ -136,6 +136,8 @@ cookie_banner:
title: Bandeau cookie
diplomas:
type: Type de diplôme
events:
none: Aucun événement
formats:
pdf: Adobe Portable Document Format
jpg: JPEG image
......
{{ define "main" }}
{{ partial "events/hero-list.html" . }}
<div class="document-content">
{{ partial "commons/list-content.html" . }}
{{ partial "events/summary.html" (dict
"with_container" true
"context" .
) }}
{{ partial "contents/list.html" . }}
<div class="container">
{{ partial "events/events.html" . }}
{{ partial "commons/pagination.html" . }}
</div>
</div>
{{ end }}
{{- if .Params.Categories -}}
<ul class="events-categories">
{{- range $index, $s := .GetTerms "categories" -}}
<li>
<a href="{{ .Permalink }}">
{{- safeHTML .Title -}}
</a>
</li>
{{- end }}
</ul>
{{- end -}}
{{ $event := .event }}
{{ . }}
{{- $direction := "" -}}
{{ $heading := .heading | default "h2" }}
{{ $heading_tag := (dict
"open" ((printf "<%s itemprop='headline'>" $heading) | safeHTML)
"close" ((printf "</%s>" $heading) | safeHTML)
) }}
{{ $index := .index}}
{{ $alternate := .alternate}}
{{ with $event }}
{{ if .Params.image }}
{{- $direction = partial "GetImageDirection" .Params.image -}}
{{ end }}
<article class='event {{ if $alternate }}{{ $direction }} {{if not (modBool $index 2)}}left{{ else}}right{{end}}{{end}}' itemprop="blogPosts" itemscope itemtype="http://schema.org/BlogPosting">
<div class="event-content">
{{- $title := partial "PrepareHTML" .Title -}}
{{ $heading_tag.open }}
<a href="{{ .Permalink }}" title="{{ safeHTML (i18n "commons.more_aria" (dict "Title" $title)) }}">{{ $title }}</a>
{{ $heading_tag.close }}
{{ if site.Params.events.index.show_categories }}
{{- partial "events/categories" . -}}
{{ end }}
{{ if site.Params.events.index.show_description }}
{{- if (partial "GetTextFromHTML" .Params.summary) -}}
{{ if site.Params.events.index.truncate_description }}
<p itemprop="articleBody">{{ partial "GetTruncateContent" ( dict
"text" .Params.summary
"length" site.Params.events.index.truncate_description
) }}</p>
{{ else }}
<p itemprop="articleBody">{{ partial "PrepareText" .Params.summary }}</p>
{{ end }}
{{- end -}}
{{- end -}}
<div class="event-meta">
</div>
</div>
<div class="media">
{{- if .Params.image -}}
{{- partial "commons/image.html"
(dict
"image" .Params.image
"sizes" site.Params.image_sizes.sections.events.item
) -}}
{{- else if site.Params.events.default_image -}}
{{- partial "commons/image-default.html" -}}
{{- end -}}
</div>
</article>
{{ end }}
\ No newline at end of file
<div class="events events--{{- site.Params.events.index.layout -}}">
{{ if not .Pages }}
<p>{{ i18n "events.none" }}</p>
{{ end }}
{{ range .Paginator.Pages }}
{{ partial "events/event.html" (dict "event" . )}}
{{ end }}
</div>
{{- $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" .
) -}}
{{- partial "commons/summary-in-content.html" . -}}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment