forked from kubernetes/website
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocsportal_home.html
49 lines (46 loc) · 1.47 KB
/
docsportal_home.html
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
{{ define "content" }}
{{ if not .Params.notitle }}
<h1>{{ .Title }}</h1>
{{ end }}
{{ template "docs-portal-content" . }}
{{ end }}
{{ define "content-id" }}content{{ end }}
{{ define "docs-portal-content" }}
<section id="mainContent">
<div class="launch-content">
<p>{{ .Params.overview | safeHTML }}</p>
<br>
<div class="launch-cards">
{{ template "docs-portal-card" . }}
</div>
</div>
</section>
{{ end }}
{{ define "docs-portal-card" }}
{{ range .Params.cards }}
<div class="launch-card">
<h4>{{ .title }}</h4>
<p>{{ .description }}</p>
<br>
<ul>
{{ $name := .name }}
{{ range where ($.Site.Pages.ByParam "card.weight") ".Params.card" "!=" nil }}
{{ if eq .Params.card.name $name }}
{{ $p := . }}
{{ if (isset .Params.card "anchors") }}
{{ range .Params.card.anchors }}
<li><a href="{{ $p.Permalink }}{{ .anchor }}">{{ .title }}</a></li>
{{ end }}
{{ else }}
<li><a href={{ .Permalink }}>
{{ if (isset .Params.card "title") }}{{ .Params.card.title }}{{ else }}{{ .LinkTitle }}{{ end }}
</a></li>
{{ end }}
{{ end }}
{{ end }}
</ul>
<br><br>
<button id="btn-concepts" class="button" onClick="location.href='{{ .button_path | relLangURL }}';" aria-label="{{ .title }}">{{ .button }}</button>
</div>
{{ end }}
{{ end }}