agenda.html 3.08 KiB
{{- $template := .block.template -}}
{{- $position := .block.position -}}
{{- $title := .block.title -}}
{{- with .block.data }}
<div itemscope itemtype="http://schema.org/Blog" 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 -}}
<div class="events">
{{ range .elements }}
<article class="event" itemprop="events" 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)) }}">{{ $title }}</a></h3>
{{ if site.Params.events.index.show_description }}
{{- if (partial "GetTextFromHTML" .summary) -}}
<p itemprop="articleBody">
{{ 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 -}}">
{{ .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>