{{- $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 }}