Adjust post.html to take a dict
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
This commit is contained in:
parent
df22cb2b87
commit
b1d4dd7a32
|
@ -4,7 +4,7 @@
|
|||
|
||||
<ul class="post-list">
|
||||
{{ range .Pages.ByDate.Reverse }}
|
||||
{{ partial "post.html" . }}
|
||||
{{ partial "post.html" (dict "page" .) }}
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
<ul class="post-list">
|
||||
{{ range (where (where .Site.Pages.ByDate.Reverse "Section" "blog") ".Kind" "!=" "section") }}
|
||||
{{ if .Params.favorite }}{{ partial "post.html" . }}{{ end }}
|
||||
{{ if .Params.favorite }}{{ partial "post.html" (dict "page" .) }}{{ end }}
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
{{ i18n "recentPosts" }}:
|
||||
<ul class="post-list">
|
||||
{{ range first 10 (where (where .Site.Pages.ByDate.Reverse "Section" "blog") ".Kind" "!=" "section") }}
|
||||
{{ partial "post.html" . }}
|
||||
{{ partial "post.html" (dict "page" .) }}
|
||||
{{ end }}
|
||||
</ul>
|
||||
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
<li>
|
||||
<a href="{{ .Permalink }}" class="post-title">{{ if .Params.favorite }}{{ partial "icon.html" "star" }}{{ end }} {{ .Title }}</a>
|
||||
{{ if (not (eq .WordCount 0)) }}
|
||||
<p class="post-wordcount">{{ i18n "nWords" .WordCount }}, {{ i18n "nMinutesToRead" .ReadingTime }}.</p>
|
||||
<a href="{{ .page.Permalink }}" class="post-title">{{ if .page.Params.favorite }}{{ partial "icon.html" "star" }}{{ end }} {{ .page.Title }}</a>
|
||||
{{ if (not (eq .page.WordCount 0)) }}
|
||||
<p class="post-wordcount">{{ i18n "nWords" .page.WordCount }}, {{ i18n "nMinutesToRead" .page.ReadingTime }}.</p>
|
||||
{{ end }}
|
||||
{{ if .Params.status }}
|
||||
{{ if .page.Params.status }}
|
||||
<p class="post-status">
|
||||
{{ partial "seriesstatus.html" .Params.status }}
|
||||
{{ partial "seriesstatus.html" .page.Params.status }}
|
||||
</p>
|
||||
{{ end }}
|
||||
<p class="post-preview">{{ .Summary }} {{ if .Truncated }}. . .{{ end }}</p>
|
||||
<p class="post-preview">{{ .page.Summary }} {{ if .page.Truncated }}. . .{{ end }}</p>
|
||||
</li>
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
<ul class="post-list">
|
||||
{{ range $pages }}
|
||||
{{ partial "post.html" . }}
|
||||
{{ partial "post.html" (dict "page" .) }}
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
<ul class="post-list">
|
||||
{{ range sort .Pages "Title" }}
|
||||
{{ partial "post.html" . }}
|
||||
{{ partial "post.html" (dict "page" .) }}
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
<ul class="post-list">
|
||||
{{ range .Pages.ByDate.Reverse }}
|
||||
{{ partial "post.html" . }}
|
||||
{{ partial "post.html" (dict "page" .) }}
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
|
|
Loading…
Reference in New Issue
Block a user