mirror of
https://github.com/qdrant/landing_page.git
synced 2026-10-03 09:58:30 +02:00
reuse TOC from docs on blog pages (#1286)
This commit is contained in:
@@ -1,4 +1,10 @@
|
||||
<section class="qdrant-post {{ if eq .variant "centered" }}qdrant-post_centered{{ else if eq .variant "blog-post" }}qdrant-blog-post{{ end }}">
|
||||
<section
|
||||
class="qdrant-post {{ if eq .variant "centered" }}
|
||||
qdrant-post_centered
|
||||
{{ else if eq .variant "blog-post" }}
|
||||
qdrant-blog-post
|
||||
{{ end }}"
|
||||
>
|
||||
<article id="article" class="container">
|
||||
<div class="qdrant-post__header">
|
||||
<h1 class="qdrant-post__title">{{ .context.Params.title }}</h1>
|
||||
@@ -26,27 +32,10 @@
|
||||
|
||||
<div class="qdrant-post__body">
|
||||
{{ if eq .variant "blog-post" }}
|
||||
<div class="qdrant-post__nav">
|
||||
{{ with (.context.Site.GetPage "/headless/share-buttons") }}
|
||||
<h6 class="qdrant-post__nav-title">{{ .Params.navTitle }}</h6>
|
||||
{{ end }}
|
||||
{{ .context.TableOfContents }}
|
||||
<div class="qdrant-post__nav-links">
|
||||
{{ $link := urlquery .context.Permalink }}
|
||||
{{ $title := .context.Title }}
|
||||
{{ with (.context.Site.GetPage "/headless/share-buttons") }}
|
||||
{{ range .Params.buttons }}
|
||||
{{ $url := .url | replaceRE "\\{\\{\\s*\\$link\\s*\\}\\}" $link | replaceRE "\\{\\{\\s*\\$title\\s*\\}\\}" $title }}
|
||||
<a href="{{ $url }}" target="_blank" rel="noopener noreferrer" title="{{ .title }}">
|
||||
{{ .icon | safeHTML }}
|
||||
{{ .subtitle }}
|
||||
</a>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
{{ partial "table-of-contents" .context }}
|
||||
{{ end }}
|
||||
|
||||
|
||||
<div class="qdrant-post__content">
|
||||
{{ partial "article-content" .context }}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user