refactor: move list of posts to main page

master
ptrcnull 2 months ago
parent 6c2f880cef
commit 8be945824c
Signed by: ptrcnull
GPG Key ID: 411F7B30801DD9CA
  1. 12
      layouts/index.html
  2. 10
      layouts/partials/header.html

@ -4,5 +4,17 @@
<div>
{{ .Content }}
</div>
{{ range .Pages }}
<h2>{{ .Title }}</h2>
<ul>
{{ range .Pages }}
<li>
<div class="post-title">
{{ .Date.Format "2006-01-02" }} <a href="{{ .RelPermalink }}">{{.Title }}</a>
</div>
</li>
{{ end }}
</ul>
{{ end }}
</main>
{{ end }}

@ -3,14 +3,4 @@
= <a href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a> =<br>
{{ strings.Repeat ( .Site.Title | len | add 4 ) "=" }}
<div style="float: right;">{{ .Site.Params.subtitle }}</div><br>
<p>
<nav>
<a href="/"><b>Home</b></a> .
{{ with .Site.Menus.main }}
{{ range $i, $e := . }}
<a href="{{ $e.URL | relURL }}"><b>{{ $e.Name }}</b></a>{{ if ne (sub (len $.Site.Menus.main) 1) $i }} . {{ end }}
{{ end }}
{{ end }}
</nav>
</p>
</header>

Loading…
Cancel
Save