Skip to content

Commit 919f2ef

Browse files
committed
fix: cover page rendering on docs posts
1 parent e141a1c commit 919f2ef

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

layouts/docs/list.html

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{{ define "main" }}
2+
<div class="row flex-xl-wrap">
3+
{{ range .Pages.ByWeight }}
4+
<div id="list-item" class="col-md-4 col-12 mt-4 pt-2">
5+
<a class="text-decoration-none text-reset" href="{{ .Permalink }}">
6+
<div class="card h-100 features feature-full-bg rounded p-0 overflow-hidden border-1">
7+
8+
{{ with .Resources.GetMatch .Params.cover }}
9+
<img src="{{ .RelPermalink }}" class="card-img-top" alt="{{ .Title }}">
10+
{{ end }}
11+
12+
<div class="p-4 position-relative">
13+
<span class="icon-color d-flex my-3">
14+
<i class="material-icons align-middle">{{- .Params.icon | default "article" }}</i>
15+
{{ if .Draft }}<span class="badge bg-default ms-2 fs-6 align-middle">DRAFT</span>{{ end }}
16+
{{ if .IsSection }}<i class="material-icons icon-faint align-middle ms-auto" title="Directory">folder</i>{{ end }}
17+
</span>
18+
<div class="card-body p-0 content">
19+
<p class="fs-5 fw-semibold card-title mb-1">{{ .Title }}</p>
20+
<p class="para card-text mb-0">{{ .Description | truncate (.Site.Params.docs.listDescTrunc | default 100) | markdownify }}</p>
21+
</div>
22+
</div>
23+
24+
</div>
25+
</a>
26+
</div><!--end col-->
27+
{{ end }}
28+
</div>
29+
{{ end }}

0 commit comments

Comments
 (0)