diff options
Diffstat (limited to 'layouts/partials/preview_micropost.html')
-rw-r--r-- | layouts/partials/preview_micropost.html | 37 |
1 files changed, 35 insertions, 2 deletions
diff --git a/layouts/partials/preview_micropost.html b/layouts/partials/preview_micropost.html index e622cc1..b0c42f5 100644 --- a/layouts/partials/preview_micropost.html +++ b/layouts/partials/preview_micropost.html @@ -1,4 +1,37 @@ <article class="micropost"> - {{ .Content }} - <a href='{{ .Permalink }}'><aside class="dates">→ {{ .Date.Format "2006/01/02 3:04 PM" }}</aside></a> + {{ if isset .Site.Params "summarizemicroposts" | and ( eq .Site.Params.summarizemicroposts true ) }} + {{ if (not (isset .Params "externalurl")) }} + <h2><a rel="full-article" href="{{ .Permalink }}">{{ .Title }}</a></h2> + {{ else }} + <h2><a rel="remote-article" href="{{ .Params.externalurl }}">→ {{ .Title }}</a> <a href="{{ .Permalink }}">∞</a></h2> + {{ end }} + + <div class="postmeta">Posted on <time datetime="{{ .Date }}" pubdate="">{{ .Date.Format "January 2, 2006" }}</time> + {{ if (isset .Params "categories") }} + in + <span class="categories"> + {{ range $i, $v := .Params.categories }} + <a class="category" href="/categories/{{ $v | urlize }}">{{ $v }}</a>{{ if ne (len $.Params.categories) (add $i 1) }}, {{ end }} + {{ end }} + </span> + {{ end }} + </div> + + <p> + {{ if or (not (isset .Params "externalurl")) }} + {{ .Summary }} + {{ else }} + {{ .Content }} + {{ end }} + </p> + + {{ if .Truncated }} + {{ if (not (isset .Params "externalurl")) }} + <a class="continue" rel="full-article" href="{{ .Permalink }}">Continue Reading »</a> + {{ end }} + {{ end }} + {{ else }} + {{ .Content }} + <a href='{{ .Permalink }}'><aside class="dates">→ {{ .Date.Format "2006/01/02 3:04 PM" }}</aside></a> + {{ end }} </article> |