Newer
Older
{{- $direction := "" -}}
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
{{ $heading_tag := partial "GetHeadingTag" (dict
"level" $heading_level
"attributes" "class='page-title'"
)}}
{{ $index := .index}}
<div class="large">
{{ range .posts }}
{{ with site.GetPage (printf "/posts/%s" .) }}
{{ if .Params.image }}
{{- $direction = partial "GetImageDirection" .Params.image -}}
{{ end }}
<article class='post' itemprop="blogPosts" itemscope itemtype="http://schema.org/BlogPosting">
<div class="post-content">
{{- $title := partial "PrepareHTML" .Title -}}
{{ $heading_tag.open }}
<a href="{{ .Permalink }}" title="{{ safeHTML (i18n "commons.more_aria" (dict "Title" $title)) }}">{{ $title }}</a>
{{ $heading_tag.close }}
{{ if site.Params.posts.index.show_categories }}
{{- partial "posts/categories" . -}}
{{ end }}
<div class="post-meta">
<time itemprop="datePublished" datetime="{{ .Date.Format "2006-01-02T15:04" }}">{{ .Date | time.Format site.Params.posts.date_format }}</time>
{{ if site.Params.posts.index.show_author }}
{{- partial "posts/author" . -}}
{{ end }}
</div>
{{ if site.Params.posts.index.show_description }}
{{- if (partial "GetTextFromHTML" .Params.summary) -}}
{{ if site.Params.posts.index.truncate_description }}
<p itemprop="articleBody">{{ partial "GetTruncateContent" ( dict
"text" .Params.summary
"length" site.Params.posts.index.truncate_description
) }}</p>
{{ else }}
<p itemprop="articleBody">{{ partial "PrepareText" .Params.summary }}</p>
{{ end }}
{{- end -}}
{{- end -}}
<p class="more meta" aria-hidden="true">{{- i18n "commons.more" -}}</p>
</div>
<div class="media">
{{- if .Params.image -}}
{{- partial "commons/image.html"
(dict
"image" .Params.image
"sizes" site.Params.image_sizes.sections.posts.item
) -}}
{{- else if site.Params.posts.default_image -}}
{{- partial "commons/image-default.html" -}}
{{- end -}}
</div>
</article>