diff --git a/docs/layouts/_default/baseof.html b/docs/layouts/_default/baseof.html index 94adb78f7..113febb9a 100644 --- a/docs/layouts/_default/baseof.html +++ b/docs/layouts/_default/baseof.html @@ -10,7 +10,7 @@ {{ partial "navbar.html" . }}
-
+
{{ block "main" . }}{{ end }}
{{ partialCached "footer.html" . }} diff --git a/docs/layouts/api-reference/baseof.html b/docs/layouts/api-reference/baseof.html new file mode 100644 index 000000000..349503649 --- /dev/null +++ b/docs/layouts/api-reference/baseof.html @@ -0,0 +1,25 @@ +{{/* (C) 2023 GoodData Corporation */}} +{{ $pageLang := cond (isset .Page.Params "lang") (default "en" (index (split .Page.Params.lang "_") 0)) .Site.Language.Lang }} + + + + + {{ partial "head.html" . }} + {{ partial "meta-version.html" . }} + + + {{ partial "gtm-body.html" }} +
+ {{ partial "navbar.html" . }} +
+
+
+ {{ block "main" . }}{{ end }} +
+ {{ partialCached "footer.html" . }} +
+ {{ partial "custom-scripts.html" . }} + {{ partialCached "scripts.html" . }} + {{ partial "search.html" . }} + + diff --git a/docs/layouts/docs/baseof.html b/docs/layouts/docs/baseof.html index 56c1d0fb4..3f73dad7a 100644 --- a/docs/layouts/docs/baseof.html +++ b/docs/layouts/docs/baseof.html @@ -15,9 +15,6 @@
-
- {{ partial "navbar-breadcrumb.html" . }} -
{{ partial "sidebar.html" . }} @@ -25,7 +22,7 @@
{{ partial "toc.html" . }}
-
+
{{ partial "version-banner.html" . }} {{ if not .Site.Params.ui.breadcrumb_disable }}{{ partial "breadcrumb.html" . }}{{ end }} {{ if .Draft }} diff --git a/docs/layouts/partials/header-menu.html b/docs/layouts/partials/header-menu.html new file mode 100644 index 000000000..0bfd7f028 --- /dev/null +++ b/docs/layouts/partials/header-menu.html @@ -0,0 +1,24 @@ + diff --git a/docs/layouts/partials/hooks/body-end.html b/docs/layouts/partials/hooks/body-end.html index 8f159e7c1..d808b0ab0 100644 --- a/docs/layouts/partials/hooks/body-end.html +++ b/docs/layouts/partials/hooks/body-end.html @@ -5,5 +5,3 @@ - - diff --git a/docs/layouts/partials/navbar-version-selector.html b/docs/layouts/partials/navbar-version-selector.html index e11073a57..2dbc92370 100644 --- a/docs/layouts/partials/navbar-version-selector.html +++ b/docs/layouts/partials/navbar-version-selector.html @@ -9,16 +9,19 @@ {{ $.Scratch.Set "activeVersion" .version }} {{ end }} {{ end }} - diff --git a/docs/layouts/partials/navbar.html b/docs/layouts/partials/navbar.html index 804dd3f2e..ef0ee6d2d 100644 --- a/docs/layouts/partials/navbar.html +++ b/docs/layouts/partials/navbar.html @@ -1,39 +1,93 @@ -{{/* (C) 2023 GoodData Corporation */}} - -{{ $cover := .HasShortcode "blocks/cover" }} -
- - {{ partial "header-menu.html" . }} - {{ partial "header-right.html" . }} -
-
-
- {{ partial "navbar-breadcrumb.html" . }} -
-
- -
- {{ if .Site.Params.versions }} - + + + +
+ + +{{ define "root-link" }} + {{ $isCurrent := eq .currentPage .root.FirstSection }} + {{ with .root }} + + {{ end }} +{{ end }} + +{{ define "section-tree-nav-sections" }} + {{ $root := .root }} + {{ $site := .site }} + {{ $currentPage := .currentPage }} + {{ $firstInSection := (index $root 0) }} + {{ $isRootSection := eq $firstInSection.Parent .site.Home }} + + {{ if gt (len (where $root.ByWeight "Params.toc_hide" "ne" true)) 0 }} + +
    + {{ range $page := $root.ByWeight }} + {{ $page := $page.Page }} + {{ $pageId := replace (replaceRE "^/|/$" "" $page.RelPermalink) "/" "_" }} + + {{ if and (not (eq $page.Params.toc_hide true)) (not (eq $page $site.Home)) }} + {{ $activePage := eq $page $currentPage }} + {{ $activeSection := $currentPage.IsDescendant $page }} + {{ $pageId := replace (replaceRE "^/|/$" "" $page.RelPermalink) "/" "_" }} + +
  • + {{ if $page.Params.navigationLabel }} + {{ $page.LinkTitle }} + {{ else }} + {{ if $page.Pages }} + + {{ end }} + +
    + {{ if $page.Params.externalLink }} + {{ $page.LinkTitle }} + {{ else }} + {{ $page.LinkTitle }} + {{ end }} + + {{ if $page.Pages }} + + {{ end }} +
    + {{ end }} + + {{ if $page.Pages }} + {{ template "section-tree-nav-sections" (dict "root" $page.Pages "currentPage" $currentPage "activeSection" $activeSection "site" $site) }} + {{ end }} +
  • + {{ end }} {{ end }} -
+ + {{ end }} +{{ end }} + +{{ define "site-title" }} + {{ if .Site.Params.menuTitle }} +

{{ .Site.Params.menuTitle }}

{{ end }} -
+{{ end }} diff --git a/docs/layouts/partials/sidebar-tree.html b/docs/layouts/partials/sidebar-tree.html index 5778b641e..ef0ee6d2d 100644 --- a/docs/layouts/partials/sidebar-tree.html +++ b/docs/layouts/partials/sidebar-tree.html @@ -1,21 +1,93 @@ -{{/* (C) 2023 GoodData Corporation */}} -{{ $additionalNavRoot := .Site.GetPage "/versions" }} -{{ $root := .Site.GetPage "/latest" }} - -{{ if or (eq .FirstSection $additionalNavRoot) (eq .FirstSection .Site.Home) }} - {{- if .Site.Params.versions -}} - {{- $root = index (where .Site.Sections "RelPermalink" (index .Site.Params.versions 0).url) 0 -}} - {{- end -}} -{{ else }} - {{ $root = .FirstSection }} + + + +
+ + +{{ define "root-link" }} + {{ $isCurrent := eq .currentPage .root.FirstSection }} + {{ with .root }} + + {{ end }} {{ end }} -

Python SDK

+{{ define "section-tree-nav-sections" }} + {{ $root := .root }} + {{ $site := .site }} + {{ $currentPage := .currentPage }} + {{ $firstInSection := (index $root 0) }} + {{ $isRootSection := eq $firstInSection.Parent .site.Home }} + + {{ if gt (len (where $root.ByWeight "Params.toc_hide" "ne" true)) 0 }} + +
    + {{ range $page := $root.ByWeight }} + {{ $page := $page.Page }} + {{ $pageId := replace (replaceRE "^/|/$" "" $page.RelPermalink) "/" "_" }} + + {{ if and (not (eq $page.Params.toc_hide true)) (not (eq $page $site.Home)) }} + {{ $activePage := eq $page $currentPage }} + {{ $activeSection := $currentPage.IsDescendant $page }} + {{ $pageId := replace (replaceRE "^/|/$" "" $page.RelPermalink) "/" "_" }} + +
  • + {{ if $page.Params.navigationLabel }} + {{ $page.LinkTitle }} + {{ else }} + {{ if $page.Pages }} + + {{ end }} + +
    + {{ if $page.Params.externalLink }} + {{ $page.LinkTitle }} + {{ else }} + {{ $page.LinkTitle }} + {{ end }} + + {{ if $page.Pages }} + + {{ end }} +
    + {{ end }} + + {{ if $page.Pages }} + {{ template "section-tree-nav-sections" (dict "root" $page.Pages "currentPage" $currentPage "activeSection" $activeSection "site" $site) }} + {{ end }} +
  • + {{ end }} + {{ end }} +
+ {{ end }} +{{ end }} -{{ template "root-link" (dict "currentPage" . "root" $root "site" .Site) }} -{{ if $root.CurrentSection }} -{{ template "section-tree-nav-sections" (dict "root" $root.CurrentSection.Pages "currentPage" . "site" .Site) }} +{{ define "site-title" }} + {{ if .Site.Params.menuTitle }} +

{{ .Site.Params.menuTitle }}

+ {{ end }} {{ end }} -{{ if $additionalNavRoot.CurrentSection }} -{{ template "section-tree-nav-sections" (dict "root" $additionalNavRoot.CurrentSection.Pages "currentPage" . "site" .Site) }} -{{ end }} \ No newline at end of file diff --git a/docs/layouts/partials/sidebar.html b/docs/layouts/partials/sidebar.html new file mode 100644 index 000000000..ff8f87787 --- /dev/null +++ b/docs/layouts/partials/sidebar.html @@ -0,0 +1 @@ +{{ partial "sidebar-tree.html" . }} diff --git a/docs/layouts/partials/skip-links.html b/docs/layouts/partials/skip-links.html new file mode 100644 index 000000000..7d501800c --- /dev/null +++ b/docs/layouts/partials/skip-links.html @@ -0,0 +1,4 @@ +{{/* (C) 2023 GoodData Corporation */}} + diff --git a/docs/layouts/swagger/baseof.html b/docs/layouts/swagger/baseof.html index 83563423a..ee033d2a4 100644 --- a/docs/layouts/swagger/baseof.html +++ b/docs/layouts/swagger/baseof.html @@ -23,7 +23,7 @@
{{ partial "toc.html" . }}
-
+
{{ if not .Site.Params.ui.breadcrumb_disable }}{{ partial "breadcrumb.html" . }}{{ end }}