Skip to content

Commit

Permalink
Add items-small and set default items to large
Browse files Browse the repository at this point in the history
  • Loading branch information
sebousan committed Dec 11, 2023
1 parent 0a18958 commit f5abc43
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
2 changes: 2 additions & 0 deletions config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ module:

params:
places:
items:
large: true
thumbnail:
desktop: '306x202'
desktop_large: '526x347'
Expand Down
5 changes: 5 additions & 0 deletions layouts/partials/places/items-small.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{{ $dict := . }}
{{ if reflect.IsMap . }}
{{ $dict = (dict "pages" .pages "abovethefold" .abovethefold "scrollsnap" .scrollsnap) }}
{{ end }}
{{ partial "commons/items" $dict }}
8 changes: 4 additions & 4 deletions layouts/partials/places/items.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{ $dict := . }}
{{ if reflect.IsMap . }}
{{ $dict = (dict "pages" .pages "abovethefold" .abovethefold "scrollsnap" .scrollsnap) }}
{{- $size := cond (site.Params.places.items.large | default false) "large" "small" -}}
{{- $partial := print "places/items-" $size ".html" -}}
{{ if templates.Exists (printf "partials/%s" $partial) }}
{{ partial $partial . }}
{{ end }}
{{ partial "commons/items" $dict }}

0 comments on commit f5abc43

Please sign in to comment.