forked from kubernetes/website
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlist.html
43 lines (43 loc) · 1.33 KB
/
list.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
{{ define "main" }}
{{- $child_of_first_section := false -}}
{{- with .Parent -}}
{{- if eq .CurrentSection .FirstSection -}}
{{- $child_of_first_section = true -}}
{{- end -}}
{{- end -}}
<div class="td-content">
{{ $hasContent := false }}
{{ with .File }}
{{ if ne .Filename "" }}
{{ $hasContent = (ge (len $.RawContent) 100) }}
{{ end }}
{{ end }}
{{ if $hasContent }}
{{- if $child_of_first_section -}}
{{ partial "docs/top-section-page" (dict "ctx" $ "page" $ ) }}
{{- else -}}
{{ partial "docs/content-page" (dict "ctx" $ "page" $ ) }}
{{- end -}}
{{ else }}
<h1>{{ .Title }}</h1>
{{ with .Params.description }}<div class="lead">{{ . | markdownify }}</div>{{ end }}
{{ end }}
{{ partial "section-index.html" . }}
</div>
{{ end }}
{{ define "hero" }}
{{- $child_of_first_section := false -}}
{{- with .Parent -}}
{{- if eq .CurrentSection .FirstSection -}}
{{- $child_of_first_section = true -}}
{{- end -}}
{{- end -}}
{{- if $child_of_first_section -}}
<section class="header-hero text-white pb-4 light-text ">
<h1>{{ .Title }}</h1>
</section>
{{- else -}}
<section class="header-hero filler">
</section>
{{- end -}}
{{ end }}