Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DO NOT MERGE: just a diff between python and this repo #26

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
Binary file added .DS_Store
Binary file not shown.
Binary file added layouts/.DS_Store
Binary file not shown.
Binary file added layouts/_default/.DS_Store
Binary file not shown.
6 changes: 0 additions & 6 deletions layouts/_default/_markup/render-heading.html

This file was deleted.

1 change: 0 additions & 1 deletion layouts/_default/_markup/render-image.html
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
{{/* (C) 2023 GoodData Corporation */}}
<p><img src="{{ .Destination | relURL }}" alt="{{ .Text }}" {{ with .Title}} title="{{ . }}"{{ end }} /></p>
1 change: 0 additions & 1 deletion layouts/_default/_markup/render-link.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{{/* (C) 2023 GoodData Corporation */}}
{{- $scratch := newScratch }}
{{- $scratch.Set "attrs" slice }}
{{- if ne .Title "" }}
Expand Down
10 changes: 3 additions & 7 deletions layouts/_default/baseof.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
{{/* (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">
<html lang="{{ .Site.Language.Lang }}" 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 }}">
<body class="td-{{ .Kind }}">
{{ partial "gtm-body.html" }}
<header>
{{ partial "navbar.html" . }}
Expand All @@ -18,8 +15,7 @@
</main>
{{ partialCached "footer.html" . }}
</div>
{{ partial "custom-scripts.html" . }}
{{ partialCached "scripts.html" . }}
{{ partial "search.html" . }}
</body>
</html>
</html>
4 changes: 3 additions & 1 deletion layouts/_default/content.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{{/* (C) 2023 GoodData Corporation */}}
{{/* PETR: This is for child articles only? */}}

<div class="td-content">
{{ partial "superheading.html" . }}
<h1>{{ .Title }}</h1>
{{ partial "article-label.html" . }}
{{ with .Params.description }}<div class="lead">{{ . | markdownify }}</div>{{ end }}
Expand Down
31 changes: 0 additions & 31 deletions layouts/_default/sitemap.xml

This file was deleted.

13 changes: 5 additions & 8 deletions layouts/docs/baseof.html
Original file line number Diff line number Diff line change
@@ -1,30 +1,28 @@
{{/* (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">
<html lang="{{ .Site.Language.Lang }}" class="no-js">
<head>
{{ partial "head.html" . }}
<link rel="canonical" href="{{ .RelPermalink }}">
{{ partial "meta-version.html" . }}
{{ if .Params.externalLink }}
<meta http-equiv="refresh" content="0;url={{ .Params.externalLink }}" />
{{ end }}
</head>
<body class="td-{{ .Kind }}{{ if .Page.Params.edition }} doc{{ .Page.Params.edition }}{{ end }}{{ if .Page.Params.type }} {{ .Page.Params.type }}{{ end }}">
<body class="td-{{ .Kind }}">
{{ partial "gtm-body.html" }}
<header>
{{ partial "navbar.html" . }}
</header>
<div class="container-fluid td-outer">
<div class="td-main">
<div class="row flex-xl-nowrap">
<div class="col-12 col-lg-4 col-xl-3 td-sidebar d-print-none">
<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">
<main class="col-12 col-md-8 col-xl-7 pl-md-5" role="main">
{{ partial "version-banner.html" . }}
{{ if not .Site.Params.ui.breadcrumb_disable }}{{ partial "breadcrumb.html" . }}{{ end }}
{{ if .Draft }}
Expand All @@ -39,7 +37,6 @@ <h1>DRAFT</h1>
</div>
{{ partialCached "footer.html" . }}
</div>
{{ partial "custom-scripts.html" . }}
{{ partial "scripts.html" . }}
{{ partial "search.html" . }}
</body>
Expand Down
7 changes: 3 additions & 4 deletions layouts/docs/list.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
{{/* (C) 2023 GoodData Corporation */}}
{{/* PETR: This is for parent articles only? */}}

{{ define "main" }}
<div class="td-content">
<div>
{{ partial "addon-widget.html" . }}
</div>
{{ partial "superheading.html" . }}
<h1>{{ .Title }}</h1>
{{ partial "article-label.html" . }}
{{ with .Params.description }}<div class="lead">{{ . | markdownify }}</div>{{ end }}
Expand Down
7 changes: 7 additions & 0 deletions layouts/index.redir
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Redirect homepage to the latest version
/ {{ .Site.BaseURL }}/1.4/ 301!
/latest/ {{ .Site.BaseURL }}/1.4/ 301
/docs/ {{ .Site.BaseURL }}/1.4/ 301!
/1.4.0/ {{ .Site.BaseURL }}/1.4 301!
/1.3.0/ {{ .Site.BaseURL }}/1.3 301!
/1.2.0/ {{ .Site.BaseURL }}/1.2 301!
16 changes: 0 additions & 16 deletions layouts/partials/addon-widget.html

This file was deleted.

5 changes: 2 additions & 3 deletions layouts/partials/article-label.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{{/* (C) 2023 GoodData Corporation */}}
{{ $label := "" }}

{{ if isset . "labelId" }}
Expand All @@ -12,7 +11,7 @@
{{ range site.Data.articleLabels }}
{{ if and (eq (index . "labelId") $label) $hasLabel }}
<div class="alert alert-label" role="alert">
{{ with resources.Get "icons/icon-alert-label.svg" }}{{ ( . | minify).Content | safeHTML }}{{ end }}
{{ with resources.Get "icons/icon-info.svg" }}{{ ( . | minify).Content | safeHTML }}{{ end }}
{{ (index . "text") | markdownify }}
{{ $hasLabel = false }}
</div>
Expand All @@ -22,4 +21,4 @@
{{ if $hasLabel }}
{{ warnf "Article label %q isn't specified in articleLabels.yml" $label }}
{{ end }}
{{ end }}
{{ end }}
1 change: 0 additions & 1 deletion layouts/partials/custom-related-content.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{{/* (C) 2023 GoodData Corporation */}}
{{ if .Params.related }}
<h3>Learn more:</h3>
<nav class="gd-docs-learn-more">
Expand Down
6 changes: 3 additions & 3 deletions layouts/partials/custom-scripts.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{{/* (C) 2023 GoodData Corporation */}}
<script src="https://www.gooddata.com/location/location.js"></script>
<script type="text/javascript" src="https://www.gooddata.com/js/modules/cookies.js?v=1"></script>
{{ if .Site.Params.prism_syntax_highlighting }}
<script src="{{"/js/prism-python-plugin.js" | relURL}}" defer></script>
{{ end }}
51 changes: 0 additions & 51 deletions layouts/partials/edition-switch.html

This file was deleted.

3 changes: 1 addition & 2 deletions layouts/partials/favicons.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
{{/* (C) 2023 GoodData Corporation */}}
<link rel="shortcut icon" href="https://www.gooddata.com/favicon.ico" >
<link rel="apple-touch-icon" href="https://www.gooddata.com/apple-touch-icon.png" sizes="180x180">
<link rel="apple-touch-icon" href="https://www.gooddata.com/apple-touch-icon.png" sizes="180x180">
25 changes: 12 additions & 13 deletions layouts/partials/footer.html
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
{{/* (C) 2023 GoodData Corporation */}}
{{ $footer := getJSON "https://www.gooddata.com/learn-assets/js/footer-definition.json" }}

<footer class="gd-footer">
{{ if $footer.footer.bannerLinks }}
<ul class="gd-footer-banner-links gd-footer-links">
{{ range $index, $link := $footer.footer.bannerLinks }}
<li class="gd-footer-banner-links-item gd-footer-links-item">
<input
type="checkbox"
tabindex="-1"
id="gd-footer-banner-links-item-trigger-{{ $index }}"
name="gd-footer-banner-links-item-trigger-{{ $index }}"
<input
type="checkbox"
tabindex="-1"
id="gd-footer-banner-links-item-trigger-{{ $index }}"
name="gd-footer-banner-links-item-trigger-{{ $index }}"
class="gd-footer-banner-links-item-trigger gd-footer-links-item-trigger"
/>
<label
for="gd-footer-banner-links-item-trigger-{{ $index }}"
for="gd-footer-banner-links-item-trigger-{{ $index }}"
class="gd-footer-banner-links-item-text gd-footer-links-item-text"
>
{{ $link.title }}
Expand All @@ -36,15 +35,15 @@
<ul class="gd-footer-links">
{{ range $index, $link := $footer.footer.links }}
<li class="gd-footer-links-item">
<input
type="checkbox"
tabindex="-1"
id="gd-footer-links-item-trigger-{{ $index }}"
name="gd-footer-links-item-trigger-{{ $index }}"
<input
type="checkbox"
tabindex="-1"
id="gd-footer-links-item-trigger-{{ $index }}"
name="gd-footer-links-item-trigger-{{ $index }}"
class="gd-footer-links-item-trigger"
/>
<label
for="gd-footer-links-item-trigger-{{ $index }}"
for="gd-footer-links-item-trigger-{{ $index }}"
class="gd-footer-links-item-text"
>
{{ $link.title }}
Expand Down
3 changes: 1 addition & 2 deletions layouts/partials/gtm-body.html
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
{{/* (C) 2023 GoodData Corporation */}}
<noscript><iframe src="//www.googletagmanager.com/ns.html?id=GTM-5G49LK" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<noscript><iframe src="//www.googletagmanager.com/ns.html?id=GTM-5G49LK" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
3 changes: 1 addition & 2 deletions layouts/partials/gtm.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{{/* (C) 2023 GoodData Corporation */}}
<script>
dataLayer = [];
</script>
Expand All @@ -16,4 +15,4 @@
f.parentNode.insertBefore(j, f);
})(window, document, 'script', 'dataLayer', 'GTM-5G49LK');
</script>
<!-- End Google Tag Manager -->
<!-- End Google Tag Manager -->
3 changes: 1 addition & 2 deletions layouts/partials/head-css.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{/* (C) 2023 GoodData Corporation */}}

{{ $scssMain := "scss/main.scss"}}
{{ if .Site.IsServer }}
{{/* Note the missing postCSS. This makes it snappier to develop in Chrome, but makes it look sub-optimal in other browsers. */}}
Expand All @@ -11,5 +11,4 @@
{{ end }}
<link rel="stylesheet" href="https://www.gooddata.com/learn-assets/css/Header.css">
<link rel="stylesheet" href="https://www.gooddata.com/learn-assets/css/Footer.css">
<link rel="stylesheet" type="text/css" href="https://www.gooddata.com/learn-assets/css/CookiesBanner.css?v=1">
{{ partial "gtm.html" . }}
10 changes: 5 additions & 5 deletions layouts/partials/head.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{{/* (C) 2023 GoodData Corporation */}}
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
{{ hugo.Generator }}
Expand All @@ -15,12 +14,10 @@
{{ end -}}

{{ partialCached "favicons.html" . }}
<title>{{ if .IsHome }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{ . }} | {{ end }}{{ .Site.Title }}{{ end }}{{ if .Page.Params.edition }} {{ humanize .Page.Params.edition }}{{ end }}</title>
<title>{{ if .IsHome }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{ . }} | {{ end }}{{ .Site.Title }}{{ end }}</title>
<meta name="description" content="{{ .Site.Params.Description }}">
{{ if isset .Page.Params "redirect" }}
<meta http-equiv="refresh" content="0;URL='{{ .Page.Params.redirect }}'" />
{{ end }}
{{- template "_internal/opengraph.html" . -}}
{{- template "_internal/google_news.html" . -}}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Incompatible with newer Hugo

{{- template "_internal/schema.html" . -}}
{{- template "_internal/twitter_cards.html" . -}}

Expand All @@ -38,5 +35,8 @@
{{ if .Site.Params.prism_syntax_highlighting }}
<!-- stylesheet for Prism -->
<link rel="stylesheet" href="{{ "/css/prism.css" | relURL }}"/>
<link rel="stylesheet" href="{{ "/css/prism-extensions.css" | relURL }}"/>

{{ end }}
{{ partialCached "custom-scripts.html" .}}
{{ partial "hooks/head-end.html" . }}
24 changes: 0 additions & 24 deletions layouts/partials/header-menu.html

This file was deleted.

Loading