Aanpassen template zodat deze modulair is

This commit is contained in:
Michael Boelen 2023-05-07 10:47:24 +02:00
parent d22e405452
commit ef3be36585
5 changed files with 66 additions and 72 deletions

View file

@ -1,13 +1,6 @@
<!doctype html>
<html lang="en">
{{ partial "head.html" . }}
<body>
<a class="skip-link" href="#main">Skip to main</a>
<main id="main">
<div class="content">
{{ partial "header.html" . }}
{{ .Content }}
{{ if gt (len ( where .Site.RegularPages "Section" "posts" )) 0 }}
{{ define "content" }}
{{ .Content }}
{{ if gt (len ( where .Site.RegularPages "Section" "posts" )) 0 }}
<h1>Latest Post</h1>
<section>
{{ range (first 3 (where .Site.RegularPages "Section" "posts" ).ByDate.Reverse) }}
@ -17,8 +10,5 @@
<p>
{{ end }}
</section>
{{ end }}
</div>
</main>
</body>
</html>
{{ end }}
{{ end }}