mirror of
https://github.com/qdrant/landing_page.git
synced 2026-10-03 18:08:30 +02:00
Add Course page (#1844)
* 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>
This commit is contained in:
@@ -11,39 +11,52 @@
|
||||
{{ .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 "course" }}
|
||||
{{ $subject := . }}
|
||||
|
||||
{{ 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 }}
|
||||
{{ 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 }}
|
||||
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ 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 }}
|
||||
|
||||
Reference in New Issue
Block a user