mirror of
https://github.com/qdrant/landing_page.git
synced 2026-10-03 09:58:30 +02:00
* Add Course page * Added shortcodes and buttons to navigate to the next page * move course images from layout * decouple documentation and course layout * decouple course sidebar * move accordion js handlers into global unconditional js * enable search on courses * allow nested courses * disable links for now --------- Co-authored-by: generall <andrey@vasnetsov.com>
63 lines
2.3 KiB
HTML
63 lines
2.3 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 }}
|
|
|
|
|
|
{{ if eq .Section "course" }}
|
|
{{ $subject := . }}
|
|
|
|
{{ if and $subject.Params $subject.Params.content $subject.Params.content.getStarted }}
|
|
<a
|
|
href="{{ $subject.Params.content.getStarted.url }}"
|
|
class="table-of-contents__button button button_contained button_sm"
|
|
>
|
|
{{ $subject.Params.content.getStarted.text }}
|
|
</a>
|
|
{{ end }}
|
|
{{ else }}
|
|
<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>
|
|
{{ end }}
|
|
</div>
|
|
{{ end }}
|
|
{{ end }}
|