Debian Codegraph @

docs/layouts/single.html

raw
1 {{ define "main" }}
2 {{ $ttop := debug.Timer "single" }}
3 <article class="max-w-5xl lg:max-w-3xl" id="article">
4 {{ partial "layouts/docsheader.html" . }}
5 <div class="content">
6 {{ with .Params.description }}
7 <div class="lead">
8 {{ . | markdownify }}
9 </div>
10 {{ end }}
11 {{ if .Params.show_publish_date }}
12 {{ with .PublishDate }}
13 <p
14 class="text-gray-500 dark:text-gray-400 text-sm/5 md:text-base/2 mb-2 sm:mb-4">
15 {{ partial "layouts/date.html" . }}
16 </p>
17 {{ end }}
18 {{ end }}
19 {{ $t := debug.Timer "single.categories" }}
20 {{ $categories := .GetTerms "categories" }}
21 {{ with $categories }}
22 <div class="mb-4 sm:mb-6 flex flex-wrap gap-2">
23 {{ range . }}
24 {{ $text := .LinkTitle }}
25 {{ $class := "" }}
26 {{ range (slice true false) }}
27 {{ $color := partial "helpers/funcs/color-from-string.html" (dict "text" $text "dark" . "--single" "green") }}
28
29 {{ $prefix := "" }}
30 {{ if . }}
31 {{ $prefix = "dark:" }}
32 {{ end }}
33 {{ $class = printf "%sbg-%s-%d %stext-%s-%d border %sborder-%s-%d"
34 $prefix $color.color $color.shade1
35 $prefix $color.color $color.shade2
36 $prefix $color.color $color.shade3
37 }}
38 {{ end }}
39
40
41 <a
42 href="{{ .RelPermalink }}"
43 class="{{ $class }} text-xs h-auto tracking-widest uppercase font-light not-prose no-underline inline-block py-1 px-3 rounded-xl shadow-xs hover:opacity-80 hover:shadow-none">
44 {{ .LinkTitle }}
45 </a>
46 {{ end }}
47 </div>
48 {{ end }}
49 {{ $t.Stop }}
50
51 {{ if .Params.functions_and_methods.signatures }}
52 <div class="mb-4 not-prose">
53 {{- partial "docs/functions-signatures.html" . -}}
54 {{- partial "docs/functions-return-type.html" . -}}
55 {{- partial "docs/functions-aliases.html" . -}}
56 </div>
57 {{ end }}
58 {{ $t := debug.Timer "single.content" }}
59 {{ .Content }}
60 {{ $t.Stop }}
61 {{ $t := debug.Timer "single.page-edit" }}
62 {{ partial "layouts/page-edit.html" . }}
63 {{ $t.Stop }}
64 </div>
65 </article>
66 {{ $ttop.Stop }}
67 {{ end }}
68
69 {{ define "rightsidebar_content" }}
70 {{/* in-this-section.html depends on these being reneredc first. */}}
71 {{ $related := partial "layouts/related.html" . }}
72 {{ $toc := partial "layouts/toc.html" . }}
73 {{ if not .Params.hide_in_this_section }}
74 {{ partial "layouts/in-this-section.html" . }}
75 {{ end }}
76 {{ $related }}
77 {{ if $.Store.Get "hasToc" }}
78 {{ $toc }}
79 {{ end }}
80 {{ end }}