Skip to content
Snippets Groups Projects
Commit 8c03b7f2 authored by Olivia206's avatar Olivia206
Browse files

added conditions to agenda block

parent e7f458c2
No related branches found
No related tags found
No related merge requests found
......@@ -2,6 +2,11 @@
{{- $position := .block.position -}}
{{- $title := .block.title -}}
{{- with .block.data -}}
{{- $show_summary := .show_summary -}}
{{- $show_category := .show_category -}}
{{- $show_status := .show_status -}}
{{- $layout := .layout | default "list" -}}
<div class="block block-agenda{{ if $title }} block-with-title{{ end }} block-agenda--{{- $layout }}">
<div class="container">
......@@ -26,6 +31,9 @@
{{ partial "events/event" (dict
"event" .
"layout" $layout
"show_summary" $show_summary
"show_category" $show_category
"show_status" $show_status
) }}
{{ end }}
{{ end }}
......
......@@ -7,6 +7,9 @@
) }}
{{ $index := .index }}
{{ $alternate := .alternate }}
{{ $show_summary := .show_summary }}
{{ $show_category := .show_category }}
{{ $show_status := .show_status }}
{{ with $event }}
<article class="event {{ if .Params.image }}event--with-image{{ end -}}" itemscope itemtype="https://schema.org/Event">
......@@ -39,7 +42,7 @@
</div>
{{ end }}
{{ if and (site.Params.events.index.show_description) }}
{{ if and (site.Params.events.index.show_description) ($show_summary) }}
{{- if (partial "GetTextFromHTML" .Params.summary) -}}
<div class="event-description">
<p itemprop="description">
......@@ -55,7 +58,7 @@
</div>
{{- end -}}
{{ if .Params.categories }}
{{ if and (.Params.categories) ($show_category) }}
<p class="event-categories">
{{- range $index, $category := .GetTerms "categories" -}}
<span>{{- $category.Title -}}</span>
......
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