Add basic scaffolding for site.
This commit is contained in:
15
themes/mainroad/layouts/partials/widgets/recent.html
Normal file
15
themes/mainroad/layouts/partials/widgets/recent.html
Normal file
@ -0,0 +1,15 @@
|
||||
{{- $recent := where .Site.RegularPages "Type" "in" .Site.Params.mainSections }}
|
||||
{{- $recent_num := (.Site.Params.widgets.recent_num | default 10) }}
|
||||
|
||||
{{- if $recent }}
|
||||
<div class="widget-recent widget">
|
||||
<h4 class="widget__title">{{ T "recent_title" }}</h4>
|
||||
<div class="widget__content">
|
||||
<ul class="widget__list">
|
||||
{{- range first $recent_num $recent }}
|
||||
<li class="widget__item"><a class="widget__link" href="{{ .RelPermalink }}">{{ .Title }}</a></li>
|
||||
{{- end }}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
{{- end }}
|
Reference in New Issue
Block a user