Reorganize post list partial
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
@@ -4,7 +4,8 @@
|
||||
<h1>404</h1>
|
||||
<p>This is a dead link. Whatever was here, it's gone now.</p>
|
||||
<p>
|
||||
<a href="{{ .Site.BaseURL }}">Let's pretend this never happened</a>.
|
||||
<a href="{{ .Site.BaseURL }}">Let's pretend this never happened</a
|
||||
>.
|
||||
</p>
|
||||
</div>
|
||||
</main>
|
||||
|
@@ -1,7 +1,9 @@
|
||||
{{ define "main" }}
|
||||
<main>
|
||||
<div class="content">
|
||||
{{ partial "posts/list.html" . }}
|
||||
{{ with .Site.GetPage "/posts" }}
|
||||
{{ partial "posts/list.html" . }}
|
||||
{{ end }}
|
||||
</div>
|
||||
</main>
|
||||
{{ end }}
|
||||
|
@@ -1,11 +0,0 @@
|
||||
{{ if not .Params.private }}
|
||||
<a href="{{ .Permalink }}" class="post">
|
||||
<h1 class="title">{{ .Title }}</h1>
|
||||
<div class="summary">{{ .Summary }}</div>
|
||||
<div class="meta">
|
||||
<span class="date">{{ .Date | time.Format ":date_medium" }}</span>
|
||||
·
|
||||
<span class="duration">{{ printf "%d MIN READ" .ReadingTime }}</span>
|
||||
</div>
|
||||
</a>
|
||||
{{ end }}
|
@@ -1,7 +1,15 @@
|
||||
<div class="posts-list">
|
||||
{{ with .Site.GetPage "/posts" }}
|
||||
{{ range sort .Pages "Date" "desc" }}
|
||||
{{ partial "posts/item.html" . }}
|
||||
{{ range sort .Pages "Date" "desc" }}
|
||||
{{ if not .Params.private }}
|
||||
<a href="{{ .Permalink }}" class="post">
|
||||
<h1 class="title">{{ .Title }}</h1>
|
||||
<div class="summary">{{ .Summary }}</div>
|
||||
<div class="meta">
|
||||
<span class="date">{{ .Date | time.Format ":date_medium" }}</span>
|
||||
·
|
||||
<span class="duration">{{ printf "%d MIN READ" .ReadingTime }}</span>
|
||||
</div>
|
||||
</a>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user