Welcome to mirror list, hosted at ThFree Co, Russian Federation.

preview_micropost.html « partials « layouts - github.com/jnjosh/internet-weblog.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: b0c42f5ec1ac3d7bd1c91bd42842ac6b556e685b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<article class="micropost">
  {{ 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>