Newer
Older
{{- $template := .block.template -}}
{{- $position := .block.position -}}
{{- $title := .block.title -}}
{{- with .block.data }}
{{ $event := .event }}
{{- $direction := "" -}}
{{ $heading := .heading | default "h2" }}
{{ $heading_tag := (dict
"open" ((printf "<%s itemprop='headline'>" $heading) | safeHTML)
"close" ((printf "</%s>" $heading) | safeHTML)
) }}
{{ $index := .index }}
{{ with $event }}
{{ if .Params.image }}
{{- $direction = partial "GetImageDirection" .Params.image -}}
{{ end }}
<div itemscope itemtype="http://schema.org/Blog" class="block block-agenda--list 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 -}}
{{ range .events }}
<article class='event' itemprop="events" itemscope itemtype="https://schema.org/Event">
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<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_description }}
{{- if (partial "GetTextFromHTML" .Params.summary) -}}
<p itemprop="articleBody">
{{ if site.Params.events.index.truncate_description }}
{{ partial "GetTruncateContent" ( dict
"text" .Params.summary
"length" site.Params.events.index.truncate_description
) }}
{{ else }}
{{ partial "PrepareText" .Params.summary }}
{{ end }}
</p>
{{- end -}}
{{- end -}}
</div>
<div class="event-dates">
{{ .Params.dates.computed.short }}
</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 -}}
</div>
</div>
</div>
{{ end -}}
{{ end -}}