Add favorite posts. Close #19

This commit is contained in:
Dmitry Kolosov 2020-06-06 22:05:21 +03:00
parent 518f134ac2
commit 82727c8e8a
13 changed files with 55 additions and 88 deletions

View file

@ -3,16 +3,14 @@
{{ .Content }}
</div>
<h1>{{ i18n .Title }}</h1>
<h1 class="post-title{{ if .Params.favorite }} favorite{{end}}">{{ i18n .Title }}</h1>
{{ $pages := where site.RegularPages "Type" "in" site.Params.mainSections }}
{{ range $pages }}
<div class="post-short-list">
<header>
<h2>
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
</h2>
<h2 class="post-title{{ if .Params.favorite }} favorite{{end}}"><a href="{{ .RelPermalink }}">{{ trim .Title " " }}</a></h2>
</header>
{{ partial "articleInfoFull.html" . }}
{{ partial "postInfoFull.html" . }}
</div>
{{ end }}

View file

@ -2,12 +2,12 @@
<article class="post">
<header>
<h1>{{ .Title }}</h1>
<h1 class="post-title{{ if .Params.favorite }} favorite{{end}}">{{ trim .Title " " }}</h1>
</header>
<div class="content">
{{ .Content }}
</div>
{{ partial "articleInfoFull.html" . }}
{{ partial "postInfoFull.html" . }}
</article>
{{ if .Site.DisqusShortname }}
{{ template "_internal/disqus.html" . }}