Add favorite posts. Close #19
This commit is contained in:
parent
518f134ac2
commit
82727c8e8a
13 changed files with 55 additions and 88 deletions
|
@ -1,10 +0,0 @@
|
|||
{{ $dateFormat := "2006-01-02" }}
|
||||
{{ if .Site.Params.dateFormat }}
|
||||
{{ $dateFormat = .Site.Params.dateFormat }}
|
||||
{{ end }}
|
||||
|
||||
<div class="article-info">
|
||||
{{ if .Params.date }}
|
||||
<div class="article-date">{{ .Params.date.Format $dateFormat }}</div>
|
||||
{{ end }}
|
||||
</div>
|
|
@ -3,20 +3,20 @@
|
|||
{{ $dateFormat = .Site.Params.dateFormat }}
|
||||
{{ end }}
|
||||
|
||||
<div class="article-info">
|
||||
<div class="post-info">
|
||||
{{ if .Params.date }}
|
||||
<div class="article-date">{{ .Params.date.Format $dateFormat }}</div>
|
||||
<div class="post-date">{{ .Params.date.Format $dateFormat }}</div>
|
||||
{{ end }}
|
||||
<div class="article-taxonomies">
|
||||
<div class="post-taxonomies">
|
||||
{{ if .Params.categories }}
|
||||
<ul class="article-categories">
|
||||
<ul class="post-categories">
|
||||
{{ range .Params.categories }}
|
||||
<li><a href="{{ "categories/" | absLangURL }}{{ . }}">{{ . }}</a></li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
{{ if .Params.tags }}
|
||||
<ul class="article-tags">
|
||||
<ul class="post-tags">
|
||||
{{ range .Params.tags }}
|
||||
<li><a href="{{ "tags/" | absLangURL }}{{ . | urlize }}">#{{ . }}</a></li>
|
||||
{{ end }}
|
16
layouts/partials/postSummary.html
Normal file
16
layouts/partials/postSummary.html
Normal file
|
@ -0,0 +1,16 @@
|
|||
<article class="post-list">
|
||||
<header>
|
||||
<h1 class="post-title{{ if .Params.favorite }} favorite{{end}}"><a href="{{ .RelPermalink }}">{{ trim .Title " " }}</a></h1>
|
||||
</header>
|
||||
|
||||
<div class="content post-summary">
|
||||
{{ .Summary | safeHTML }}
|
||||
</div>
|
||||
<!-- {{ if .Truncated }}
|
||||
<div class="read-more">
|
||||
<a href="{{ .RelPermalink }}">{{ i18n "readMore" | humanize }}</a>
|
||||
</div>
|
||||
{{ end }} -->
|
||||
|
||||
{{ partial "postInfoFull.html" . }}
|
||||
</article>
|
Loading…
Add table
Add a link
Reference in a new issue