Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions hugo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,11 @@ params:
show_name: true
sitemap:
ignore_children: false
layouts:
alternate:
more: true
grid:
more: false
categories:
index:
layout: grid # alternate | cards | grid | large | list
Expand Down Expand Up @@ -419,9 +424,6 @@ params:
progression: true
key_figures:
animated: true
pages:
alternate:
more: true
posts:
slider:
arrows: true
Expand Down
6 changes: 6 additions & 0 deletions layouts/partials/GetTypeParamWithDefault
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{{ $param := partial "GetSiteParamWithDefault" (dict
"param" (printf "%s.%s" .type .param)
"default" (printf "default.%s" .param)
) }}

{{ return $param }}
6 changes: 3 additions & 3 deletions layouts/partials/events/partials/event.html
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
"kind" "events"
)}}
{{ if eq $layout "large" }}
<p class="more meta" aria-hidden="true">{{- i18n "commons.more" -}}</p>
{{ partial "events/partials/event/more.html" . }}
{{ end }}
</div>
{{ end }}
Expand All @@ -94,8 +94,8 @@
)}}
{{- end -}}

{{ if $with_more }}
{{ partial "commons/item/more.html" . }}
{{ if and $with_more (ne $layout "large") }}
{{ partial "events/partials/event/more.html" . }}
{{- end -}}
</div>
<div class="media">
Expand Down
1 change: 1 addition & 0 deletions layouts/partials/events/partials/event/more.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{ partial "commons/item/more.html" . }}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
"level" $heading_level
"attributes" "class='page-title'"
)}}
{{ $with_more := partial "GetTypeParamWithDefault" (dict
"param" "layouts.alternate.more"
"type" "pages"
) }}

<div class="alternate">
{{ range .pages }}
Expand Down Expand Up @@ -36,8 +40,8 @@
)}}
{{ end }}

{{ if site.Params.blocks.pages.alternate.more }}
<p class="more meta" aria-hidden="true">{{- i18n "commons.more" -}}</p>
{{ if $with_more }}
{{ partial "pages/partials/page/more.html" . }}
{{ end }}

{{ if $options.image }}
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/pages/partials/layouts/cards/cards.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
)}}
{{ end }}

<p class="more meta" aria-hidden="true">{{- i18n "commons.more" -}}</p>
{{ partial "pages/partials/page/more.html" . }}

{{ if $options.image }}
{{- partial "pages/partials/page/page-media.html" . -}}
Expand Down
16 changes: 13 additions & 3 deletions layouts/partials/pages/partials/layouts/grid/grid.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
{{ $options := .options }}
{{ $heading_level := .heading_level | default 3 }}
{{ $heading_tag := partial "GetHeadingTag" (dict
"level" $heading_level
"attributes" "class='page-title'"
)}}
"level" $heading_level
"attributes" "class='page-title'"
)}}
{{ $with_more := partial "GetTypeParamWithDefault" (dict
"param" "layouts.grid.more"
"type" "pages"
) }}

{{ with .pages }}
<div class="grid">
{{ range . }}
Expand Down Expand Up @@ -38,6 +43,11 @@
"kind" "page"
)}}
{{ end }}

{{ if $with_more }}
{{ partial "pages/partials/page/more.html" . }}
{{ end }}

{{ if $options.image }}
{{- partial "pages/partials/page/page-media.html" . -}}
{{ end }}
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/pages/partials/layouts/large/large.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
)}}
{{ end }}

<p class="more meta" aria-hidden="true">{{- i18n "commons.more" -}}</p>
{{ partial "pages/partials/page/more.html" . }}
</div>

{{- if and $options.image .Params.image -}}
Expand Down
1 change: 1 addition & 0 deletions layouts/partials/pages/partials/page/more.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{ partial "commons/item/more.html" . }}