Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
30 lines (28 sloc) 1.42 KB
{{ define "heading" }}
<div class="jumbotron">
<h1 class="display-4">{{ .Title }}</h1>
<p class="lead">{{ .Params.subtitle }}</p>
<p class="text-muted"><i class="fas fa-exclamation-triangle bycon"></i>{{ T "underConstruction" }}</p>
</div>
{{ end }}
{{ define "main" }}
<section id="glossary">
<!-- Iterate all glossary terms -->
{{- range sort .Pages "Title" }}
<h4><a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>{{- with .Params.altTitles }} <small class="text-muted">({{ delimit . ", "}})</small>{{ end }}</h4>
<article class="ml-5">
{{- with default (markdownify .Params.description) .Summary }}
<!-- If there's at least one paragraph in description, render as is; otherwise wrap it in one -->
{{- if in (. | string) "<p>" }}{{ . }}{{ else }}<p>{{ . }}</p>{{ end }}
{{- end }}
<!-- Grab only the first page corresponding to the glossary term, if any -->
{{- with first 1 .Pages }}
{{- range . }}<p><a href="{{ .Permalink }}" class="btn btn-outline-primary">{{ T "details" }}: {{ .Title | markdownify }}</a></p>{{ end }}
<!-- Check for detail link otherwise -->
{{- else }}{{ if .Truncated }}
<p><a href="{{ .Permalink }}" class="btn btn-outline-primary">{{ T "details" }}</a></p>
{{- end }}{{ end }}
</article>
{{- end }}
</section>
{{ end }}
You can’t perform that action at this time.