0625ced466
* Add Docsy, required packages and config * Apply Docsy integration work to k8s website This encompasses significant changes to the style system, layout files, as well as changes to some of the static assets. To examine this work and the iterations that were performed, the original repository can be found at https://github.com/gearbox-built/kubernetes-hugo.git * Address issues found in review The styling and positioning of the header, footer, some shortcodes and main container elements are improved. A new partial is added for favicons. The sidebars, as well as inner table of contents, have been altered for better positioning and rendering of content. Localization has also been addressed. * Enable announcements The recent Black Lives Matter announcement surfaced issues which have been addressed.
60 lines
2.4 KiB
HTML
60 lines
2.4 KiB
HTML
{{ define "side-menu" }}
|
|
{{ partial "docs/side-menu.html" . }}
|
|
{{ end }}
|
|
|
|
{{ define "main" }}
|
|
<h1>{{ .Title }}</h1>
|
|
<link href="{{ "css/glossary.css" | relURL }}" rel="stylesheet">
|
|
<script src="{{ "js/glossary.js" | relURL }}"></script>
|
|
<p>{{ T "layouts_docs_glossary_description" }}</p>
|
|
<div id="tag-container">
|
|
<p>{{ T "layouts_docs_glossary_filter" }}</p>
|
|
<div class="tag-description invisible" id="placeholder">.</div>
|
|
{{ range (index site.Data "canonical-tags") }}
|
|
<div class="tag-description hide" id="{{ printf "tag-%s-description" .id }}">
|
|
<i>{{ .description }}</i>
|
|
</div>
|
|
{{ end }}
|
|
{{ $sorted_tags := sort (index site.Data "canonical-tags") "name" }}
|
|
{{ range $sorted_tags }}
|
|
{{ $full_tag_name := printf "tag-%s" .id }}
|
|
<span id="{{ $full_tag_name }}" class="tag-option canonical-tag" data-target="{{ $full_tag_name }}">
|
|
<a href="javascript:void(0)">{{ .name }}</a>
|
|
</span>
|
|
{{ end }}
|
|
<span class="tag-option"><a id="select-all-tags" href="javascript:void(0)">{{ T "layouts_docs_glossary_select_all" }}</a></span>
|
|
<span class="tag-option"><a id="deselect-all-tags" href="javascript:void(0)">{{ T "layouts_docs_glossary_deselect_all" }}</a></span>
|
|
</div>
|
|
<p>{{ T "layouts_docs_glossary_click_details_before" }} <a href="javascript:void(0)" class="no-underline">[+]</a> {{ T "layouts_docs_glossary_click_details_after" }}</p>
|
|
{{ partial "docs/glossary-terms.html" . }}
|
|
{{ $glossary_items := $.Scratch.Get "glossary_items" }}
|
|
{{ with $glossary_items }}
|
|
{{ $glossary_terms := sort . "Title" "asc" }}
|
|
<ul>
|
|
{{ range $glossary_terms }}
|
|
{{ $.Scratch.Set "tag_classes" "" }}
|
|
{{ range .Params.tags }}
|
|
{{ $.Scratch.Add "tag_classes" (printf "tag-%s " .) }}
|
|
{{ end }}
|
|
{{ $term_identifier := (printf "term-%s" .Params.id) }}
|
|
|
|
<li class="{{ $.Scratch.Get "tag_classes" }} hide" data-show-count="0">
|
|
<div id="{{ $term_identifier }}" class="term-anchor"></div>
|
|
<div>
|
|
<div class="term-name"><b>{{ .Title }}</b><a href="{{ printf "#%s" $term_identifier }}" class="permalink hide">LINK</a></div>
|
|
{{ with .Params.aka }}
|
|
{{ T "layouts_docs_glossary_aka" }}:<i>{{ delimit . ", " }}</i>
|
|
<br>
|
|
{{ end }}
|
|
<span class="preview-text">{{ .Summary }} <a href="javascript:void(0)" class="click-controller no-underline" data-target="{{ .Params.id }}">[+]</a></span>
|
|
<div id="{{ .Params.id }}" class="hide">
|
|
{{ .Content | strings.TrimPrefix .Summary | safeHTML }}
|
|
</div>
|
|
</div>
|
|
</li>
|
|
{{ end }}
|
|
</ul>
|
|
{{ end }}
|
|
{{ end }}
|
|
|