Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/layouts/_default/baseof.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
{{ partial "navbar.html" . }}
</header>
<div class="container-fluid td-default td-outer">
<main role="main" class="td-main" aria-label="Article content">
<main id="main-content" role="main" class="td-main" aria-label="Article content">
{{ block "main" . }}{{ end }}
</main>
{{ partialCached "footer.html" . }}
Expand Down
25 changes: 25 additions & 0 deletions docs/layouts/api-reference/baseof.html
Original file line number Diff line number Diff line change
@@ -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 }}

<!doctype html>
<html lang="{{ $pageLang }}" class="no-js">
<head>
{{ partial "head.html" . }}
{{ partial "meta-version.html" . }}
</head>
<body class="td-{{ .Kind }}{{ if .Page.Params.edition }} doc{{ .Page.Params.edition }}{{ end }}{{ if .Page.Params.type }} {{ .Page.Params.type }}{{ end }}" id="top">
{{ partial "gtm-body.html" }}
<header aria-label="Main site header">
{{ partial "navbar.html" . }}
</header>
<div class="container-fluid td-default td-outer">
<main role="main" class="td-main" id="main-content" aria-label="Article content">
{{ block "main" . }}{{ end }}
</main>
{{ partialCached "footer.html" . }}
</div>
{{ partial "custom-scripts.html" . }}
{{ partialCached "scripts.html" . }}
{{ partial "search.html" . }}
</body>
</html>
5 changes: 1 addition & 4 deletions docs/layouts/docs/baseof.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,14 @@
</header>
<div class="container-fluid td-outer">
<div class="td-main">
<div class="gd-docs-header-nav__mobile">
{{ partial "navbar-breadcrumb.html" . }}
</div>
<div class="row flex-xl-nowrap">
<div class="col-12 col-md-4 col-xl-3 td-sidebar d-print-none">
{{ partial "sidebar.html" . }}
</div>
<div class="d-none d-xl-block col-xl-2 td-toc d-print-none">
{{ partial "toc.html" . }}
</div>
<main class="col-12 col-lg-8 col-xl-7 pl-lg-5 ps-lg-5" role="main" aria-label="Article content">
<main id="main-content" class="col-12 col-lg-8 col-xl-7 pl-lg-5 ps-lg-5" role="main" aria-label="Article content">
{{ partial "version-banner.html" . }}
{{ if not .Site.Params.ui.breadcrumb_disable }}{{ partial "breadcrumb.html" . }}{{ end }}
{{ if .Draft }}
Expand Down
24 changes: 24 additions & 0 deletions docs/layouts/partials/header-menu.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<nav class="gd-docs-header-nav__center gd-header" aria-label="Main">
<input type="checkbox" role="button" id="gd-header-mobile-menu-trigger-input" name="gd-header-mobile-menu-trigger-input" class="gd-header-mobile gd-header-mobile-menu-trigger-input" aria-label="Open navigation menu" aria-controls="gd-header-mobile-menu" aria-expanded="false">
<label tabindex="0" for="gd-header-mobile-menu-trigger-input" class="gd-header-mobile gd-header-mobile-menu-trigger"><span></span></label>
<ul class="gd-docs-header-nav__menu gd-header-links">
<li class="gd-docs-header-nav__menuitem gd-header-link-item gd-header-link-item-mobile-only">
<a href="https://www.gooddata.com/learn/" class="gd-docs-header-nav__menulink gd-header-link gd-header-link__main">Learn</a>
</li>
<li class="gd-docs-header-nav__menuitem gd-header-link-item">
<a href="https://university.gooddata.com/" class="gd-docs-header-nav__menulink gd-header-link">University</a>
</li>
<li class="gd-docs-header-nav__menuitem gd-header-link-item">
<a href="https://community.gooddata.com/" class="gd-docs-header-nav__menulink gd-header-link">Community</a>
</li>
<li class="gd-docs-header-nav__menuitem gd-header-link-item">
<a href="https://www.gooddata.com/docs/cloud/" class="gd-docs-header-nav__menulink gd-header-link gd-header-link__active">Documentation</a>
</li>
<li class="gd-docs-header-nav__menuitem gd-header-link-item">
<a href="https://support.gooddata.com/hc/en-us" class="gd-docs-header-nav__menulink gd-header-link">Support</a>
</li>
<li class="gd-docs-header-nav__menuitem gd-header-link-item gd-header-link-item-mobile-only">
<a href="https://www.gooddata.com/" class="button">Go to GoodData.com</a>
</li>
</ul>
</nav>
2 changes: 0 additions & 2 deletions docs/layouts/partials/hooks/body-end.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,3 @@
<script src="/js/content-select.js"></script>
<script src="/js/pactsafe.js"></script>
<script src="/js/404-old-version.js"></script>
<script src="/js/prism-accessibility.js"></script>

9 changes: 6 additions & 3 deletions docs/layouts/partials/navbar-version-selector.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,19 @@
{{ $.Scratch.Set "activeVersion" .version }}
{{ end }}
{{ end }}
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<button class="nav-link dropdown-toggle" id="navbarDropdown" type="button" data-toggle="dropdown" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
{{ printf "%s" ($.Scratch.Get "docLabel") }}
</a>
</button>
<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
{{ range .Site.Params.versions }}
{{ $finalUrl := cond (gt (len (findRE "^http(s)?://" .url)) 0) .url (relURL .url) }}
{{ if $finalUrl }}
<a
class="dropdown-item{{ if eq ( $.Scratch.Get "activeVersion" ) ( printf "%s" .version ) }} active{{ end }}"
href="{{ cond (gt (len (findRE "^http(s)?://" .url)) 0) .url (relURL .url) }}"
href="{{ $finalUrl }}"
>
{{ .version }}
</a>
{{ end }}
{{ end }}
</div>
126 changes: 90 additions & 36 deletions docs/layouts/partials/navbar.html
Original file line number Diff line number Diff line change
@@ -1,39 +1,93 @@
{{/* (C) 2023 GoodData Corporation */}}

{{ $cover := .HasShortcode "blocks/cover" }}
<div class="gd-docs-header-nav gd-docs-header-nav__first">
<nav class="gd-docs-header-nav__left" aria-label="Homepage">
<a class="gd-docs-header-nav__logo gd-header-nav__logo" href="{{ (printf "%s%s/" .Site.Home.Permalink "latest" ) | safeURL }}" aria-label="Go to documentation homepage">
{{ with resources.Get "icons/GoodDataLearn.svg" }}{{ ( . | minify).Content | safeHTML }}{{ end }}
</a>
<span class="gd-header-nav__logo-text">Learn</span>
</nav>
{{ partial "header-menu.html" . }}
{{ partial "header-right.html" . }}
</div>
<div class="gd-docs-header-nav gd-docs-header-nav__second">
<div class="gd-docs-header-nav__desktop">
{{ partial "navbar-breadcrumb.html" . }}
</div>
<div class="gd-docs-header-nav__center">
<div id="adds-container" class="gd-docs-header-nav__search"></div>
</div>
{{ if .Site.Params.versions }}
<div class="gd-docs-header-nav__right">
{{ partial "navbar-version-selector.html" . }}
<a href="https://github.com/gooddata/gooddata-python-sdk" class="gd-docs-header-nav__cta gd-docs-header-nav__github">
{{ with resources.Get "icons/github.svg" }}{{ ( . | minify).Content | safeHTML }}{{ end }}
GitHub
</a>
</div>
<!-- PETR: Menu assembled here -->
<input type="checkbox" id="gd-docs-menu__mobile-trigger" class="gd-docs-menu__mobile-trigger" />
<label for="gd-docs-menu__mobile-trigger" class="gd-docs-menu__mobile-icon"></label>
<div class="gd-docs-menu__mobile-bg"></div>
<nav id="gd-docs-menu" class="gd-docs-menu init" aria-label="Articles">
{{ $additionalNavRoot := .Site.GetPage "/versions" }}
{{ $root := .Site.GetPage "/docs" }}

{{ 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 }}
<div class="gd-docs-header-nav__right">
{{ with .Site.GetPage "docs" }}
<a href="https://github.com/gooddata/gooddata-python-sdk" class="gd-docs-header-nav__cta gd-docs-header-nav__github">
{{ with resources.Get "icons/github.svg" }}{{ ( . | minify).Content | safeHTML }}{{ end }}
GitHub
</a>
{{ $root = .FirstSection }}
{{ end }}

{{ template "site-title" . }}

{{ template "root-link" (dict "currentPage" . "root" $root "site" .Site) }}
{{ template "section-tree-nav-sections" (dict "root" $root.CurrentSection.Pages "currentPage" . "site" .Site) }}
{{ template "section-tree-nav-sections" (dict "root" $additionalNavRoot.CurrentSection.Pages "currentPage" . "site" .Site) }}
</nav>

{{ define "root-link" }}
{{ $isCurrent := eq .currentPage .root.FirstSection }}
{{ with .root }}
<ul class="gd-docs-menu-section gd-docs-menu-section__root">
<li class="gd-docs-menu-page{{ if $isCurrent }} active{{ end }}">
<div class="gd-docs-menu-page__title">
<a href="{{ .RelPermalink }}" class="gd-docs-menu-page__link">{{ .LinkTitle }}</a>
</div>
</li>
</ul>
{{ 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 }}

<ul class="gd-docs-menu-section{{ if .activeSection }} active{{ end }}">
{{ 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) "/" "_" }}

<li class="gd-docs-menu-page{{ if $activePage }} active{{ end }}{{ if $page.Params.navSeparator }} gd-docs-menu-page__separator{{ end }}">
{{ if $page.Params.navigationLabel }}
<span class="gd-docs-menu-page__label">{{ $page.LinkTitle }}</span>
{{ else }}
{{ if $page.Pages }}
<input type="checkbox" id="gd-docs-menu-page__{{ $pageId }}" class="gd-docs-menu-page__toggle"{{ if $activeSection }} checked{{ end }} />
{{ end }}

<div class="gd-docs-menu-page__title">
{{ if $page.Params.externalLink }}
<a href ="{{ $page.Params.externalLink }}" class="gd-docs-menu-page__link" target="_blank">{{ $page.LinkTitle }}</a>
{{ else }}
<a href ="{{ $page.Permalink }}" class="gd-docs-menu-page__link">{{ $page.LinkTitle }}</a>
{{ end }}

{{ if $page.Pages }}
<label for="gd-docs-menu-page__{{ $pageId }}" class="gd-docs-menu-page__chevron">
{{ with resources.Get "icons/chevron-menu.svg" }}{{ ( . | minify).Content | safeHTML }}{{ end }}
</label>
{{ end }}
</div>
{{ end }}

{{ if $page.Pages }}
{{ template "section-tree-nav-sections" (dict "root" $page.Pages "currentPage" $currentPage "activeSection" $activeSection "site" $site) }}
{{ end }}
</li>
{{ end }}
{{ end }}
</div>
</ul>
{{ end }}
{{ end }}

{{ define "site-title" }}
{{ if .Site.Params.menuTitle }}
<h4>{{ .Site.Params.menuTitle }}</h4>
{{ end }}
</div>
{{ end }}
106 changes: 89 additions & 17 deletions docs/layouts/partials/sidebar-tree.html
Original file line number Diff line number Diff line change
@@ -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 }}
<!-- PETR: Menu assembled here -->
<input type="checkbox" id="gd-docs-menu__mobile-trigger" class="gd-docs-menu__mobile-trigger" />
<label for="gd-docs-menu__mobile-trigger" class="gd-docs-menu__mobile-icon"></label>
<div class="gd-docs-menu__mobile-bg"></div>
<nav id="gd-docs-menu" class="gd-docs-menu init" aria-label="Articles">
{{ $additionalNavRoot := .Site.GetPage "/versions" }}
{{ $root := .Site.GetPage "/docs" }}

{{ 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 }}
{{ end }}

{{ template "site-title" . }}

{{ template "root-link" (dict "currentPage" . "root" $root "site" .Site) }}
{{ template "section-tree-nav-sections" (dict "root" $root.CurrentSection.Pages "currentPage" . "site" .Site) }}
{{ template "section-tree-nav-sections" (dict "root" $additionalNavRoot.CurrentSection.Pages "currentPage" . "site" .Site) }}
</nav>

{{ define "root-link" }}
{{ $isCurrent := eq .currentPage .root.FirstSection }}
{{ with .root }}
<ul class="gd-docs-menu-section gd-docs-menu-section__root">
<li class="gd-docs-menu-page{{ if $isCurrent }} active{{ end }}">
<div class="gd-docs-menu-page__title">
<a href="{{ .RelPermalink }}" class="gd-docs-menu-page__link">{{ .LinkTitle }}</a>
</div>
</li>
</ul>
{{ end }}
{{ end }}

<h4>Python SDK</h4>
{{ 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 }}

<ul class="gd-docs-menu-section{{ if .activeSection }} active{{ end }}">
{{ 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) "/" "_" }}

<li class="gd-docs-menu-page{{ if $activePage }} active{{ end }}{{ if $page.Params.navSeparator }} gd-docs-menu-page__separator{{ end }}">
{{ if $page.Params.navigationLabel }}
<span class="gd-docs-menu-page__label">{{ $page.LinkTitle }}</span>
{{ else }}
{{ if $page.Pages }}
<input type="checkbox" id="gd-docs-menu-page__{{ $pageId }}" class="gd-docs-menu-page__toggle"{{ if $activeSection }} checked{{ end }} />
{{ end }}

<div class="gd-docs-menu-page__title">
{{ if $page.Params.externalLink }}
<a href ="{{ $page.Params.externalLink }}" class="gd-docs-menu-page__link" target="_blank">{{ $page.LinkTitle }}</a>
{{ else }}
<a href ="{{ $page.Permalink }}" class="gd-docs-menu-page__link">{{ $page.LinkTitle }}</a>
{{ end }}

{{ if $page.Pages }}
<label for="gd-docs-menu-page__{{ $pageId }}" class="gd-docs-menu-page__chevron">
{{ with resources.Get "icons/chevron-menu.svg" }}{{ ( . | minify).Content | safeHTML }}{{ end }}
</label>
{{ end }}
</div>
{{ end }}

{{ if $page.Pages }}
{{ template "section-tree-nav-sections" (dict "root" $page.Pages "currentPage" $currentPage "activeSection" $activeSection "site" $site) }}
{{ end }}
</li>
{{ end }}
{{ end }}
</ul>
{{ 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 }}
<h4>{{ .Site.Params.menuTitle }}</h4>
{{ end }}
{{ end }}
{{ if $additionalNavRoot.CurrentSection }}
{{ template "section-tree-nav-sections" (dict "root" $additionalNavRoot.CurrentSection.Pages "currentPage" . "site" .Site) }}
{{ end }}
1 change: 1 addition & 0 deletions docs/layouts/partials/sidebar.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{ partial "sidebar-tree.html" . }}
4 changes: 4 additions & 0 deletions docs/layouts/partials/skip-links.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{{/* (C) 2023 GoodData Corporation */}}
<div class="skip-links">

</div>
2 changes: 1 addition & 1 deletion docs/layouts/swagger/baseof.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<div class="d-none d-xl-block col-xl-2 td-toc d-print-none">
{{ partial "toc.html" . }}
</div>
<main class="col-12 col-lg-8 col-xl-7 pl-lg-5 ps-lg-5" role="main" aria-label="Article content">
<main id="main-content" class="col-12 col-lg-8 col-xl-7 pl-lg-5 ps-lg-5" role="main" aria-label="Article content">
{{ if not .Site.Params.ui.breadcrumb_disable }}{{ partial "breadcrumb.html" . }}{{ end }}
<script src="/js/swagger-ui-bundle.js"></script>
<script src="/js/swagger-ui-standalone-preset.js"></script>
Expand Down
Loading