Skip to content
Snippets Groups Projects
Unverified Commit 2ed799cf authored by Alexis BENOIT's avatar Alexis BENOIT Committed by GitHub
Browse files

Merge pull request #163 from noesya/fix-block-events

Fix block agenda
parents 53e78861 9ef40312
No related branches found
No related tags found
No related merge requests found
......@@ -20,58 +20,13 @@
{{ end -}}
<div class="events">
{{ range .elements }}
<article class="event" itemscope itemtype="https://schema.org/Event">
{{ if .data.image }}
{{- $direction = partial "GetImageDirection" .data.image -}}
{{ end }}
<div class="event-content">
{{- $title := partial "PrepareHTML" .title -}}
<h3><a href="{{ .url }}" title="{{ safeHTML (i18n "commons.more_aria" (dict "Title" $title)) }}" itemprop="name">{{ $title }}</a></h3>
{{ if site.Params.events.index.show_description }}
{{- if (partial "GetTextFromHTML" .summary) -}}
<p itemprop="description">
{{ if site.Params.events.index.truncate_description }}
{{ partial "GetTruncateContent" ( dict
"text" .summary
"length" site.Params.events.index.truncate_description
) }}
{{ else }}
{{ partial "PrepareText" .summary }}
{{ 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 -->
{{ .dates.computed.short }}
<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>
</div>
<div class="media">
{{- if .image -}}
{{- partial "commons/image.html"
(dict
"image" .image
"sizes" site.Params.image_sizes.sections.events.item
) -}}
{{- else if site.Params.events.default_image -}}
{{- partial "commons/image-default.html" -}}
{{- end -}}
</div>
</article>
{{ range .events }}
{{ $event := site.GetPage .file }}
{{ with $event }}
{{ partial "events/event" (dict "event" . ) }}
{{ end -}}
{{ end -}}
</div>
</div>
</div>
</div>
......
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