2022-10-06 17:52:51 -05:00
|
|
|
|
2023-01-24 16:35:14 -06:00
|
|
|
{{ $limit := .Get "limit" | default 1 }}
|
2023-01-24 16:39:45 -06:00
|
|
|
{{ $title := .Get "title" | default (i18n "shortcode.recent_articles" | emojify) }}
|
2022-10-06 17:52:51 -05:00
|
|
|
{{ $parent := .Page.RelPermalink }}
|
|
|
|
{{ $where := .Get "where" }}
|
|
|
|
{{ $value := .Get "value" }}
|
2023-01-24 16:39:45 -06:00
|
|
|
<h2 class="mt-20 text-2xl font-extrabold mb-10">{{ $title }}</h2>
|
2022-10-06 17:52:51 -05:00
|
|
|
<section class="space-y-10 w-full mt-10 mb-10">
|
|
|
|
{{ if $where }}
|
2023-01-24 16:35:14 -06:00
|
|
|
{{ range ( where .Site.RegularPages $where $value | first $limit ) }}
|
2022-10-06 17:52:51 -05:00
|
|
|
{{ if not (eq .RelPermalink $parent) }}
|
2022-12-31 09:58:20 -06:00
|
|
|
{{ partial "article-link/simple.html" . }}
|
2022-10-06 17:52:51 -05:00
|
|
|
{{ end }}
|
|
|
|
{{end}}
|
|
|
|
{{ else }}
|
|
|
|
{{ range .Site.RegularPages | first $limit }}
|
|
|
|
{{ if not (eq .RelPermalink $parent) }}
|
2022-12-31 09:58:20 -06:00
|
|
|
{{ partial "article-link/simple.html" . }}
|
2022-10-06 17:52:51 -05:00
|
|
|
{{ end }}
|
|
|
|
{{end}}
|
|
|
|
{{ end }}
|
|
|
|
</section>
|