Files
landing_page/qdrant-landing/themes/qdrant-2024/layouts/partials/table-of-contents.html
T
5baacc44ec Updated Articles Pages (#1329)
* Updated Articles Pages

* fixes

* Links removed

* Fixed url

* light theme fix

* toc fix

* new article categories

* categorize articles

* fix article preview images

* rename categories

---------

Co-authored-by: trean <trean.mi@gmail.com>
Co-authored-by: generall <andrey@vasnetsov.com>
2024-12-20 12:10:51 +00:00

50 lines
1.8 KiB
HTML

{{ if not .Params.hideTOC }}
{{ if gt (.TableOfContents | len) 34 }}
<div class="table-of-contents">
<p class="table-of-contents__head">On this page:</p>
{{ $tocStartLevel := .Params.toc_start_level }}
{{ if not $tocStartLevel }}
{{ $tocStartLevel = default 1 $.Parent.Params.toc_start_level }}
{{ end }}
{{ $tocEndLevel := default 3 .Params.toc_end_level }}
{{ $tocOrdered := false }}
{{ .Fragments.ToHTML $tocStartLevel $tocEndLevel $tocOrdered | safeHTML }}
<ul class="table-of-contents__external-links">
{{ if or (eq .Section "documentation") (eq .Section "articles") }}
<li class="table-of-contents__link">
<a href="{{ .Site.Params.githubDocPrefix }}{{ path.Clean .File.Path }}" target="_blank">
{{ partial "svg" "github.svg" }}
Edit on Github
</a>
</li>
<li class="table-of-contents__link">
<a href="{{ .Site.Params.githubIssueLink }}" target="_blank">
{{ partial "svg" "bug.svg" }}
Create an issue
</a>
</li>
{{ end }}
{{ if eq .Section "blog" }}
{{ $link := urlquery .Permalink }}
{{ $title := .Title }}
{{ with (.Site.GetPage "/headless/share-buttons") }}
{{ range .Params.buttons }}
{{ $url := .url | replaceRE "\\{\\{\\s*\\$link\\s*\\}\\}" $link | replaceRE "\\{\\{\\s*\\$title\\s*\\}\\}" $title }}
<li class="table-of-contents__link">
<a href="{{ $url }}" target="_blank" rel="noopener noreferrer" title="{{ .title }}">
{{ .icon | safeHTML }}
{{ .subtitle }}
</a>
</li>
{{ end }}
{{ end }}
{{ end }}
</ul>
</div>
{{ end }}
{{ end }}