Split duplicated .page-list div into separate partial

This commit is contained in:
2022-05-06 21:14:42 -05:00
parent a9d1c25ee4
commit 805dc65ccb
10 changed files with 28 additions and 115 deletions

View File

@ -6,16 +6,6 @@
</h1>
{{ with .Site.RegularPages | first 5 }}
<div class="page-list">
<ul>
{{ range . }}
<li>{{ .Render "summary/post" }}</li>
{{ end }}
</ul>
</div>
{{ else }}
<div>
{{ i18n "no_posts" }}
</div>
{{ partial "page-list.html" . }}
{{ end }}
</div>

View File

@ -0,0 +1,13 @@
<div class="page-list">
{{ with . }}
<ul>
{{ range . }}
<li>{{ .Render "summary/post" }}</li>
{{ end }}
</ul>
{{ else }}
<div>
{{ i18n "no_posts" }}
</div>
{{ end }}
</div>