{{- /* Recently updated pages for archives, section and term list */ -}} {{- $kindMap := dict "home" "archives" "section" "section" "term" "list" -}} {{- $recentlyUpdatedConfig := .Site.Params.recentlyUpdated -}} {{- $scope := index $kindMap .Kind -}} {{- $scopeEnable := index $recentlyUpdatedConfig $scope | default false -}} {{- if $scopeEnable | and (eq $.Paginator.PageNumber 1) -}} {{- $hasTitle := false }} {{- $postCount := 0 -}} {{- $maxPostCount := $recentlyUpdatedConfig.maxCount | default 10 -}} {{- $days := $recentlyUpdatedConfig.days | default 30 -}} {{- $dateformat := (index .Site.Params $scope).dateformat | default "01-02" -}} {{- $scopePages := .Pages -}} {{- if eq $scope "archives" -}} {{- $scopePages = .Scratch.Get "mainSectionPages" -}} {{- end -}} {{- $scopePages = where $scopePages.ByLastmod.Reverse "Section" "!=" "" -}} {{- /* {{- $scopePages = where $scopePages "File.IsContentAdapter" "ne" true -}} */ -}} {{- range first $maxPostCount $scopePages -}} {{- if gt (add .Lastmod.Unix (mul 86900 $days)) now.Unix -}} {{- if ne .Lastmod.Unix .Date.Unix }} {{- $postCount = add $postCount 1 -}} {{- if eq $hasTitle false -}}

{{- dict "Class" "fa-regular fa-calendar-check fa-fw me-1" | partial "plugin/icon.html" -}} {{- T "section.recentlyUpdated" -}}

{{- $hasTitle = true -}} {{- end -}}
{{- $repost := .Params.repost | default dict -}} {{- if eq $repost.enable true -}} {{- dict "Class" "fa-solid fa-share fa-fw text-success me-1" | partial "plugin/icon.html" -}} {{- end -}} {{- if eq $scope "archives" -}} {{- cond (.Param "capitalizeTitles") (title .Title) .Title -}} {{- else -}} {{- cond (.Param "capitalizeTitles") (title .LinkTitle) .LinkTitle -}} {{- end -}} {{- with .Lastmod | dateFormat $dateformat -}} {{- dict "Date" . | T "single.updatedOnDate" -}} {{- end -}}
{{- end -}} {{- end -}} {{- end -}} {{- end -}}