| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 | {{/* Featured Content Widget */}}{{/* Initialise */}}{{ $ := .root }}{{ $st := .page }}{{ $items_type := $st.Params.content.page_type | default "post" }}{{ $items_count := $st.Params.content.count | default 65535 }}{{ $items_sort := $st.Params.content.order| default "desc" }}{{/* Query */}}{{ $query := where (where site.RegularPages "Type" $items_type) "Params.featured" true }}{{ $archive_page := site.GetPage "Section" $items_type }}{{/* Filters */}}{{ if $st.Params.content.filters.tag }}  {{ $archive_page := site.GetPage (printf "tags/%s" (urlize $st.Params.content.filters.tag)) }}  {{ $query = $query | intersect $archive_page.Pages }}{{ end }}{{ if $st.Params.content.filters.category }}  {{ $archive_page := site.GetPage (printf "categories/%s" (urlize $st.Params.content.filters.category)) }}  {{ $query = $query | intersect $archive_page.Pages }}{{ end }}{{ if $st.Params.content.filters.publication_type }}  {{ $archive_page := site.GetPage (printf "publication_types/%s" $st.Params.content.filters.publication_type) }}  {{ $query = $query | intersect $archive_page.Pages }}{{ end }}{{ if $st.Params.content.filters.author }}  {{ $archive_page = site.GetPage (printf "authors/%s" (urlize $st.Params.content.filters.author)) }}  {{ $query = $query | intersect $archive_page.Pages }}{{ end }}{{/* Sort */}}{{ $sort_by := "Date" }}{{ $query = sort $query $sort_by $items_sort }}{{/* Limit */}}{{ $query = first $items_count $query }}{{/* Localisation */}}{{ $i18n := "" }}{{ if eq $items_type "post" }}  {{ $i18n = "more_posts" }}{{ else if eq $items_type "talk" }}  {{ $i18n = "more_talks" }}{{ else if eq $items_type "publication" }}  {{ $i18n = "more_publications" }}{{ else }}  {{ $i18n = "more_pages" }}{{ end }}{{ $columns := $st.Params.design.columns | default "2" }}<div class="col-12 {{if eq $columns "2"}}col-lg-8{{end}}">  {{ with $st.Content }}{{ . }}{{ end }}  {{ range $post := $query }}    {{ if eq $st.Params.design.view 1 }}      {{ partial "li_list" . }}    {{ else if eq $st.Params.design.view 3 }}      {{ partial "li_card" . }}    {{ else if eq $st.Params.design.view 4 | and (eq $items_type "publication") }}      {{ partial "li_citation" . }}    {{ else }}      {{ partial "li_compact" . }}    {{ end }}  {{end}}  {{ if $st.Params.content.link_to_archive }}    <div class="see-all">      <a href="{{ $archive_page.RelPermalink }}">        {{ i18n $i18n | default "See all" }}        <i class="fas fa-angle-right"></i>      </a>    </div>  {{ end }}</div>
 |