Newer
Older
{{- $template := .block.template -}}
{{- $position := .block.position -}}
{{- $title := .block.title -}}
{{- with .block.data }}
<div class="block block-agenda{{ if $title }} block-with-title{{ end }}">
<div class="container">
<div class="block-content">
{{ if or $title .description }}
<div class="top">
{{ if $title }}
<p class="block-title">{{ partial "PrepareHTML" $title }}</p>
{{ end }}
{{- if .description }}
<div class="description">
{{ partial "PrepareHTML" .description }}
</div>
{{ end -}}
</div>
{{ end -}}
<article class="event" itemscope itemtype="https://schema.org/Event">
{{ if .data.image }}
{{- $direction = partial "GetImageDirection" .data.image -}}
<h3><a href="{{ .url }}" title="{{ safeHTML (i18n "commons.more_aria" (dict "Title" $title)) }}" itemprop="name">{{ $title }}</a></h3>
{{ if site.Params.events.index.truncate_description }}
{{ partial "GetTruncateContent" ( dict
"length" site.Params.events.index.truncate_description
) }}
{{ else }}
{{ end }}
</p>
{{- end -}}
{{- end -}}
</div>
<div class="event-dates" itemprop="startDate" content="{{- if .dates.from.day -}}{{ .dates.from.day }}{{- end -}} {{- if .dates.from.hour -}}{{ .dates.from.hour }}{{- end -}}">
<!-- TODO : trouver une solution pour placer le intemprop EndDate -->
<div class="event-time">
{{ if .dates.from.hour }}
<span>{{ .dates.from.hour }}</span>
{{ end }}
{{ if .dates.to.hour }}
<span> {{ .dates.to.hour }}</span>
{{ end }}
</div>
"sizes" site.Params.image_sizes.sections.events.item
) -}}
{{- else if site.Params.events.default_image -}}
{{- partial "commons/image-default.html" -}}
{{- end -}}
</div>