Nouveau thème pour 2026
This commit is contained in:
38
themes/2026/layouts/_partials/spotlight-block.html
Normal file
38
themes/2026/layouts/_partials/spotlight-block.html
Normal file
@@ -0,0 +1,38 @@
|
||||
{{- $cards := slice -}}
|
||||
{{- with .Cards -}}
|
||||
{{- $cards = . -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- $feedPages := slice -}}
|
||||
{{- with .FeedPages -}}
|
||||
{{- $feedPages = . -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- $asideFirst := false -}}
|
||||
{{- with .AsideFirst -}}
|
||||
{{- $asideFirst = . -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- $showSection := false -}}
|
||||
{{- with .ShowSection -}}
|
||||
{{- $showSection = . -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- $spotlightClass := "spotlight" -}}
|
||||
{{- if $asideFirst -}}
|
||||
{{- $spotlightClass = printf "%s spotlight-aside-first" $spotlightClass -}}
|
||||
{{- end -}}
|
||||
|
||||
<div class="spotlight-block {{ $spotlightClass }}">
|
||||
{{- if and $asideFirst (gt (len $feedPages) 0) -}}
|
||||
{{ partial "spotlight-feed.html" . }}
|
||||
{{- end -}}
|
||||
|
||||
{{- range $cards -}}
|
||||
{{ partial "card.html" (dict "Page" . "ShowSection" $showSection "LinkSection" false "ShowMeta" false "ThumbnailSize" "spotlight") }}
|
||||
{{- end -}}
|
||||
|
||||
{{- if and (not $asideFirst) (gt (len $feedPages) 0) -}}
|
||||
{{ partial "spotlight-feed.html" . }}
|
||||
{{- end -}}
|
||||
</div>
|
||||
Reference in New Issue
Block a user