Newer
Older
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
{{ $heading_level := .heading_level | default 3 }}
{{ $heading := printf "h%d" $heading_level }}
<div class="large">
{{ range $project := .projects -}}
{{ with site.GetPage .file }}
{{ $heading_tag := (dict
"open" ((printf "<%s class='project-title' itemprop='name'>" $heading) | safeHTML)
"close" ((printf "</%s>" $heading) | safeHTML)
) }}
<article class="project" itemscope itemtype="https://schema.org/CreativeWork">
<div class="project-content">
<div class="project-description">
{{- $title := partial "PrepareHTML" .Title -}}
{{ $heading_tag.open }}
<a href="{{ .Permalink }}" itemprop="url" title="{{ safeHTML (i18n "commons.more_aria" (dict "Title" $title)) }}">{{ $title }}</a>
{{ $heading_tag.close }}
{{ if and site.Params.projects.index.show_description (partial "GetTextFromHTML" .Params.summary) }}
<p itemprop="abstract">{{ partial "GetTruncateContent" ( dict
"text" .Params.summary
"length" site.Params.projects.index.truncate_description
) }}
</p>
{{ end }}
<div class="project-meta">
{{ if and site.Params.projects.index.show_year .Params.year }}
<time itemprop="datePublished" datetime="{{ .Params.year }}">{{ .Params.year }}</time>
{{ end }}
{{ if site.Params.projects.index.show_categories }}
{{- partial "projects/categories" . -}}
{{ end }}
</div>
<p class="more meta" aria-hidden="true">{{- i18n "commons.more" -}}</p>
</div>
</div>
<div class="media">
{{- if .Params.image -}}
{{- partial "commons/image.html"
(dict
"image" .Params.image
"sizes" site.Params.image_sizes.sections.projects.item
) -}}
{{- else -}}
{{- partial "commons/image-default.html" "projects" -}}
{{- end -}}
</div>
</article>
{{ end }}
{{ end }}
</div>