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

excerpt.html « partials « layouts - github.com/chipzoller/hugo-clarity.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 0e2c355b8be1a716483b9bb70a2318521c32c76e (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
<li class="post_item">
  <div class="excerpt">
    <div class="excerpt_header">
      <h3 class="post_link">
        <a href="{{ .Permalink }}" title="{{ .Title }}">{{ .Title  }}</a>
      </h3>
      {{ partial "post-meta" . }}
    </div>
    {{- with .Params.thumbnail }}
    <div class="excerpt_footer partition">
      <div class="excerpt_thumbnail">
        {{- partial "image" (dict "file" . "alt" $.Title "type" "thumbnail" "Page" $.Page ) }}
      </div>
      {{ else }}
      <div class="excerpt_footer">
        {{- end }}
        <div class="pale">
          {{- $summary := truncate 320 .Summary }}
          {{- if .Params.summary }}
            {{- $summary = .Params.summary }}
          {{- else if .Params.abstract }}
            {{ $summary = .Params.abstract }}
          {{- end }}
          {{ if not ( strings.Contains $summary "<p>" ) }}
            <p>{{ $summary }}</p>
          {{ else }}
            {{ $summary }}
          {{ end }}
          <br>
          {{- $r := T "read_more" }}
          <a href="{{ .Permalink }}" title="{{ $r }}" class="excerpt_more button">{{ $r }}</a>
        </div>
      </div>
    </div>
  </li>