mirror of
https://github.com/davegallant/davegallant.github.io.git
synced 2025-08-07 00:58:13 +00:00
Switch themes to minimo
This commit is contained in:
20
themes/minimo/layouts/partials/widgets/recent_posts.html
Normal file
20
themes/minimo/layouts/partials/widgets/recent_posts.html
Normal file
@@ -0,0 +1,20 @@
|
||||
{{- $defaultConfig := .Site.Data.config.default.widgets.recent_posts -}}
|
||||
{{- $configData := ( or .Site.Data.config.widgets.recent_posts $defaultConfig ) -}}
|
||||
{{- $lang := .Site.Language.Lang -}}
|
||||
{{- $config := ( ( index $configData $lang ) | default $configData ) -}}
|
||||
|
||||
{{- $length := ( $config.length | default 5 ) -}}
|
||||
|
||||
<section class='widget widget-recent_posts sep-after'>
|
||||
<header>
|
||||
<h4 class='title widget-title'>
|
||||
{{- $config.title | default ( i18n "recentPosts" ) -}}
|
||||
</h4>
|
||||
</header>
|
||||
|
||||
<ul class='list'>
|
||||
{{ range ( first $length ( where .Site.RegularPages "Type" "not in" $config.excludeTypes ) ) }}
|
||||
{{ .Render "li" }}
|
||||
{{ end }}
|
||||
</ul>
|
||||
</section>
|
Reference in New Issue
Block a user