From af1e2c5ac0d9eabd00e9ddea34f511aa020e9f9b Mon Sep 17 00:00:00 2001 From: ParzivalPavlis Date: Mon, 25 Aug 2025 11:42:28 +0200 Subject: [PATCH] docs: updated theme, added accordion, accessibility updates risk: low JIRA: DP-3086 JIRA: DP-3219 JIRA: DP-3226 --- docs/assets/scss/_styles_project.scss | 1 + docs/assets/scss/breadcrumbs.scss | 34 --- docs/assets/scss/code-select.scss | 132 ------------ docs/assets/scss/header.scss | 79 ++++++- docs/assets/scss/layout.scss | 19 -- docs/assets/scss/menu.scss | 245 ---------------------- docs/go.mod | 2 +- docs/go.sum | 2 + docs/layouts/docs/baseof.html | 5 +- docs/layouts/partials/header-menu.html | 24 --- docs/layouts/partials/hooks/body-end.html | 1 + docs/layouts/partials/navbar.html | 4 +- docs/layouts/partials/sidebar-tree.html | 106 ++-------- docs/layouts/partials/sidebar.html | 1 - docs/layouts/swagger/baseof.html | 5 +- docs/static/css/prism.css | 5 - docs/static/js/code-select.js | 27 --- docs/static/js/content-select.js | 19 -- 18 files changed, 106 insertions(+), 605 deletions(-) delete mode 100644 docs/assets/scss/breadcrumbs.scss delete mode 100644 docs/assets/scss/code-select.scss delete mode 100644 docs/assets/scss/layout.scss delete mode 100644 docs/assets/scss/menu.scss delete mode 100644 docs/layouts/partials/header-menu.html delete mode 100644 docs/layouts/partials/sidebar.html delete mode 100644 docs/static/css/prism.css delete mode 100644 docs/static/js/code-select.js delete mode 100644 docs/static/js/content-select.js diff --git a/docs/assets/scss/_styles_project.scss b/docs/assets/scss/_styles_project.scss index 0ae5ae964..8e4e58602 100644 --- a/docs/assets/scss/_styles_project.scss +++ b/docs/assets/scss/_styles_project.scss @@ -28,6 +28,7 @@ @import "404"; @import "parameters-block"; @import "parameter"; +@import "skip-links"; @import "heading-anchor"; #print { diff --git a/docs/assets/scss/breadcrumbs.scss b/docs/assets/scss/breadcrumbs.scss deleted file mode 100644 index 51ca01dee..000000000 --- a/docs/assets/scss/breadcrumbs.scss +++ /dev/null @@ -1,34 +0,0 @@ -.gd-breadcrumb { - display: none; - list-style-type: none; - margin: 0; - padding: 0; - font-size: 14px; - white-space: nowrap; - - @include mq(large) { - display: flex; - } - - &-item { - &::before { - content: "/"; - margin-left: 4px; - } - - &:first-child { - &::before { - display: none; - } - } - - a { - &, - &:hover, - &:focus, - &:active { - color: $color-deep-purple; - } - } - } -} diff --git a/docs/assets/scss/code-select.scss b/docs/assets/scss/code-select.scss deleted file mode 100644 index 524e5cf79..000000000 --- a/docs/assets/scss/code-select.scss +++ /dev/null @@ -1,132 +0,0 @@ -@import "variables/variables"; - -.td-content .highlight, -.td-content .code-toolbar { - border: none; - border-radius: 0; - background-color: $color-text; - - pre { - outline: none; - font-size: 12.2px; - line-height: 1.5; - background-color: transparent !important; - } - - .toolbar { - top: auto; - right: 10px; - bottom: 10px; - - button { - height: 27px; - padding: 0 11px; - border: 1px solid $color-share-button; - border-radius: 3px; - box-shadow: 0 1px 1px 0 rgba(20, 56, 93, 0.15); - outline: none; - color: #778491; - font-size: 12px; - line-height: 25px; - background: #fcfcfd; - - &:hover { - box-shadow: 0 1px 1px 0 rgba(20, 56, 93, 0.15), inset 0 -1px 0 0 rgba(177, 193, 209, 0.6); - color: #464e56; - background: #f5f8fa; - border-color: rgba(31,52,73,0.2); - } - - &:focus { - box-shadow: 0 0 3px 1px rgba(69, 199, 239, 0), 0 1px 2px 0 rgba(20, 56, 93, 0.15), inset 0 -1px 0 0 rgba(177, 193, 209, 0.6); - border-color: rgba(20, 178, 226, 0.75); - } - - &:active { - box-shadow: inset 0 1px 0 0 rgba(177, 193, 209, 0.65); - color: #464e56; - border-color: #b1c1d1; - background: #ecf0f5; - background-image: linear-gradient(to top, #dee6ef, #ecf0f5); - } - - span { - padding: 0; - border: none; - box-shadow: none; - color: inherit; - font-size: inherit; - background: none; - } - } - } -} - -.td-content .highlight, -.td-content > .code-toolbar { - margin: 1.5rem 0; - border-left: 5px solid #717B82; -} - -.gd-docs-code-select, -.highlight { - @include mq(xxx-large) { - width: 80%; - } -} - -.gd-docs-code-select { - display: flex; - flex-direction: column; - margin-top: 20px; - margin-bottom: 20px; - border-left: 5px solid #717B82; - background-color: $color-text; - - &__tabs { - display: flex; - align-self: flex-end; - margin: 10px; - padding: 1px; - border-radius: 5px; - background-color: #545C61; - } - - &__tab { - padding: 1px 10px; - border-radius: 4px; - color: transparentize($color-white, 0.2); - line-height: 18px; - font-size: 14px; - cursor: pointer; - - &:hover { - color: $color-white; - } - - &.active { - color: $color-white; - background-color: $color-shocking-pink; - } - } - - &__code { - display: none; - - &.active { - display: block; - } - - .highlight { - width: 100%; - margin-top: 0; - margin-bottom: 0; - border: none; - background-color: transparent; - - pre { - background: none !important; - } - } - } -} diff --git a/docs/assets/scss/header.scss b/docs/assets/scss/header.scss index 394d2e7d5..41ca0cf4f 100644 --- a/docs/assets/scss/header.scss +++ b/docs/assets/scss/header.scss @@ -1,5 +1,33 @@ +// (C) 2023 GoodData Corporation @import "variables/variables"; +.gd-docs-header { + &-tag { + display: block; + margin-left: 30px; + padding: 4px 10px; + border-radius: 50px; + color: $color-white; + font-family: $gdfont-demibold; + font-size: 14px; + line-height: 19px; + background: #94A1AE; + } + + &-breadcrumb { + display: flex; + align-items: center; + color: #2F3336; + font-size: 14px; + line-height: 30px; + opacity: 0.8; + + svg { + margin-right: 10px; + } + } +} + .gd-docs-header-nav { position: fixed; right: 0; @@ -15,6 +43,24 @@ overflow-y: auto; } + &__desktop { + display: flex; + min-width: 55px; + nav { + display: none; + @include mq(large) { + display: block; + } + } + } + + &__mobile { + display: block; + @include mq(large) { + display: none; + } + } + &__first { top: 0; min-height: $header-first-nav-height; @@ -42,12 +88,18 @@ } &__second &__left, + &__desktop, &__second &__right { - flex: 1 0 0; + flex: 0 0 auto; + + @include mq(x-large) { + flex: 1 0 0; + } } &__second &__left { - align-self: center; + min-width: 55px; + align-self: stretch; } &__second &__center { @@ -100,7 +152,7 @@ line-height: 1.375; background-color: $color-shocking-pink; transition: $transition; - + &, &:hover, &:focus, @@ -118,6 +170,10 @@ & + & { margin-left: 1rem; } + + svg { + margin-right: 10px; + } } &__secondary, @@ -155,7 +211,7 @@ font-size: 14px; line-height: 1; height: 2rem; - padding: .5rem 0.8rem; + padding: 0.5rem 0.8rem; &, &:hover, @@ -180,11 +236,18 @@ } } - &__search { + position: relative; align-items: center; justify-content: center; } + + .gd-docs-edition-switch, .gd-docs-language-switch { + @include mq(large) { + display: flex; + } + display: none; + } } .td-search-input { @@ -208,6 +271,10 @@ .gd-header-mobile-menu-trigger { margin-bottom: 0; + border: none; + &:focus-visible { + border: 2px solid; + } } .search-result-close-button { @@ -235,7 +302,7 @@ } &:hover, - &:focus, + &:focus, &:active { color: $color-black; } diff --git a/docs/assets/scss/layout.scss b/docs/assets/scss/layout.scss deleted file mode 100644 index 242cd4c53..000000000 --- a/docs/assets/scss/layout.scss +++ /dev/null @@ -1,19 +0,0 @@ -@import "variables/variables"; - -.td-main { - flex-shrink: 0; - - main { - padding-top: 20px; - - @include mq(large) { - padding-top: $header-height + 20px; - } - } -} - -.section-index { - .panel-line:only-child { - display: none; - } -} diff --git a/docs/assets/scss/menu.scss b/docs/assets/scss/menu.scss deleted file mode 100644 index 3e8ba5304..000000000 --- a/docs/assets/scss/menu.scss +++ /dev/null @@ -1,245 +0,0 @@ -@import "variables/variables"; - -.td-sidebar { - position: relative; - display: flex; - flex-direction: column; - padding-top: $header-height; - padding-left: 0; - padding-bottom: 0; - border: none; - background: none; -} - -.gd-docs-menu { - position: fixed; - top: $header-first-nav-height + 1px; - bottom: 0; - left: -100%; - z-index: 33; - overflow: auto; - width: calc(100% - 55px); - flex: 1 1 auto; - padding: 32px 40px; - background: #f8f8f8; - transition: $transition; - - @include mq(medium) { - position: absolute; - top: $header-height; - left: 0; - right: 0; - bottom: 0; - z-index: 0; - width: 100%; - max-width: 380px; - - @supports(position: sticky) { - position: sticky; - bottom: auto; - max-height: calc(100vh - #{$header-height}); - } - } - - &.init { - opacity: 0; - } - - &__mobile-trigger { - display: none; - } - - &__mobile-icon { - position: fixed; - top: 80px; - display: flex; - justify-content: center; - align-items: center; - width: 55px; - height: $header-second-nav-height; - left: 10px; - z-index: 34; - transition: $transition; - - &::before { - content: url("../img/burger.svg"); - display: block; - width: 26px; - height: 22px; - } - - &::after { - content: ""; - display: none; - width: 31px; - height: 31px; - background-image: url("../img/close.svg"); - background-repeat: no-repeat; - background-size: contain; - } - - @include mq(medium) { - display: none; - } - } - - &__mobile-bg { - position: fixed; - top: $header-first-nav-height + 1px; - left: -100%; - bottom: 0; - width: 100%; - z-index: 32; - background-color: rgba($color-deep-purple, 0.5); - transition: $transition; - - @include mq(medium) { - display: none; - } - } - &__mobile-trigger:checked ~ &, - &__mobile-trigger:checked ~ &__mobile-bg { - left: 0; - } - - &__mobile-trigger:checked ~ & { - left: 0; - } - - &__mobile-trigger:checked ~ &__mobile-icon { - left: calc(100% - 55px); - - &::before { - display: none; - } - - &::after { - display: block; - } - } - - & > &-section { - padding-left: 0; - } - - &-section { - padding-left: 12px; - list-style-type: none; - - & + & { - padding-top: 1rem; - border-top: 1px solid $color-dove-gray; - } - - &__root { - margin-bottom: 0; - } - - &__root + & { - padding-top: 0; - border-top: 0; - } - } - - &-page__label ~ &-section { - padding-left: 0; - } - - // PETR: Menu styling is here - - &-page { - &__separator { - margin-top: 1rem; - margin-bottom: 1rem; - padding-top: 1rem; - border-top: 1px solid $color-dove-gray; - } - - &__title { - display: flex; - } - - &__link { - position: relative; - display: inline-block; - flex: 1 1 auto; - margin: 8px 20px 3px 0; - padding: 0 0 5px; - max-width: 100%; - font-size: 15px; - line-height: 1.5; - - &, - &:hover, - &:active, - &:focus { - color: $color-deep-purple; - } - - &:hover, - &:active, - &:focus { - text-decoration: underline; - } - } - - &.active > &__title &__link { - font-family: $gdfont-demibold; - color: $color-shocking-pink; - - &, - &:hover, - &:active, - &:focus { - text-decoration: none; - } - } - - &__toggle { - display: none; - } - - &__chevron { - margin: 4px 0 0; - cursor: pointer; - - svg { - transform: rotate(180deg); - } - } - - &__toggle:checked ~ &__title &__chevron { - svg { - transform: rotate(0deg); - } - } - - &__label { - display: block; - flex: 0 0 auto; - margin: 16px 0 16px -12px; - color: rgba($color-deep-purple, 0.4); - font-family: $gdfont-demibold; - font-size: 12px; - text-transform: uppercase; - } - } - - &-page__toggle ~ &-section { - display: none; - } - - &-page__toggle:checked ~ &-section { - display: block; - } - - h4 { - margin-top: 0; - margin-bottom: 1rem; - padding-bottom: 1rem; - border-bottom: 1px solid $color-dove-gray; - font-family: $gdfont-demibold; - font-size: 21px; - line-height: 1.25; - } -} diff --git a/docs/go.mod b/docs/go.mod index cc53e23da..5a06e5906 100644 --- a/docs/go.mod +++ b/docs/go.mod @@ -4,7 +4,7 @@ go 1.20 require ( github.com/FortAwesome/Font-Awesome v0.0.0-20230327165841-0698449d50f2 // indirect - github.com/gooddata/gooddata-docs-theme v0.0.0-20250814105944-65486e0f9cfb // indirect + github.com/gooddata/gooddata-docs-theme v0.0.0-20250821103203-74c7725a1374 // indirect github.com/google/docsy v0.7.1 // indirect github.com/google/docsy/dependencies v0.7.1 // indirect github.com/twbs/bootstrap v5.3.1+incompatible // indirect diff --git a/docs/go.sum b/docs/go.sum index 2de30edde..e892d6179 100644 --- a/docs/go.sum +++ b/docs/go.sum @@ -34,6 +34,8 @@ github.com/gooddata/gooddata-docs-theme v0.0.0-20250813103715-562a4a4e4a75 h1:sw github.com/gooddata/gooddata-docs-theme v0.0.0-20250813103715-562a4a4e4a75/go.mod h1:VVNP6Cmo+vC37RD3T/YHjyU/QdqftGY5z4G513LYyrA= github.com/gooddata/gooddata-docs-theme v0.0.0-20250814105944-65486e0f9cfb h1:acb17FkbyBJjZ4e/DvIf5xJ2S/XkpF+fQqa9lNP+8LM= github.com/gooddata/gooddata-docs-theme v0.0.0-20250814105944-65486e0f9cfb/go.mod h1:VVNP6Cmo+vC37RD3T/YHjyU/QdqftGY5z4G513LYyrA= +github.com/gooddata/gooddata-docs-theme v0.0.0-20250821103203-74c7725a1374 h1:pdQfwqjy/PW2CBh0HlMtgnsSuNHNLP+SyWlACDhSBnU= +github.com/gooddata/gooddata-docs-theme v0.0.0-20250821103203-74c7725a1374/go.mod h1:VVNP6Cmo+vC37RD3T/YHjyU/QdqftGY5z4G513LYyrA= github.com/google/docsy v0.7.1 h1:DUriA7Nr3lJjNi9Ulev1SfiG1sUYmvyDeU4nTp7uDxY= github.com/google/docsy v0.7.1/go.mod h1:JCmE+c+izhE0Rvzv3y+AzHhz1KdwlA9Oj5YBMklJcfc= github.com/google/docsy/dependencies v0.7.1 h1:NbzYKJYMin2q50xdWSUzR2c9gCp7zR/XHDBcxklEcTQ= diff --git a/docs/layouts/docs/baseof.html b/docs/layouts/docs/baseof.html index d388ee1c5..56c1d0fb4 100644 --- a/docs/layouts/docs/baseof.html +++ b/docs/layouts/docs/baseof.html @@ -15,6 +15,9 @@
+
+ {{ partial "navbar-breadcrumb.html" . }} +
{{ partial "sidebar.html" . }} @@ -22,7 +25,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 deleted file mode 100644 index b812d1185..000000000 --- a/docs/layouts/partials/header-menu.html +++ /dev/null @@ -1,24 +0,0 @@ - \ No newline at end of file diff --git a/docs/layouts/partials/hooks/body-end.html b/docs/layouts/partials/hooks/body-end.html index 8bac99336..8f159e7c1 100644 --- a/docs/layouts/partials/hooks/body-end.html +++ b/docs/layouts/partials/hooks/body-end.html @@ -5,4 +5,5 @@ + diff --git a/docs/layouts/partials/navbar.html b/docs/layouts/partials/navbar.html index 13070bcd3..804dd3f2e 100644 --- a/docs/layouts/partials/navbar.html +++ b/docs/layouts/partials/navbar.html @@ -12,7 +12,9 @@ {{ partial "header-right.html" . }}
- {{ partial "navbar-breadcrumb.html" . }} +
+ {{ partial "navbar-breadcrumb.html" . }} +
diff --git a/docs/layouts/partials/sidebar-tree.html b/docs/layouts/partials/sidebar-tree.html index ef0ee6d2d..5778b641e 100644 --- a/docs/layouts/partials/sidebar-tree.html +++ b/docs/layouts/partials/sidebar-tree.html @@ -1,93 +1,21 @@ - - - -
- - -{{ define "root-link" }} - {{ $isCurrent := eq .currentPage .root.FirstSection }} - {{ with .root }} - - {{ end }} +{{/* (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 }} {{ 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 }} +

Python SDK

-{{ define "site-title" }} - {{ if .Site.Params.menuTitle }} -

{{ .Site.Params.menuTitle }}

- {{ 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) }} {{ 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 deleted file mode 100644 index ff8f87787..000000000 --- a/docs/layouts/partials/sidebar.html +++ /dev/null @@ -1 +0,0 @@ -{{ partial "sidebar-tree.html" . }} diff --git a/docs/layouts/swagger/baseof.html b/docs/layouts/swagger/baseof.html index c27e74760..83563423a 100644 --- a/docs/layouts/swagger/baseof.html +++ b/docs/layouts/swagger/baseof.html @@ -13,6 +13,9 @@
+
+ {{ partial "navbar-breadcrumb.html" . }} +
{{ partial "sidebar.html" . }} @@ -20,7 +23,7 @@
{{ partial "toc.html" . }}
-
+
{{ if not .Site.Params.ui.breadcrumb_disable }}{{ partial "breadcrumb.html" . }}{{ end }} diff --git a/docs/static/css/prism.css b/docs/static/css/prism.css deleted file mode 100644 index 6d8a0e6c3..000000000 --- a/docs/static/css/prism.css +++ /dev/null @@ -1,5 +0,0 @@ -/* PrismJS 1.29.0 -https://prismjs.com/download.html#themes=prism-okaidia&languages=markup+css+clike+javascript+bash+c+csharp+cpp+go+java+markdown+python+scss+sql+toml+yaml&plugins=toolbar+copy-to-clipboard */ -code[class*=language-],pre[class*=language-]{color:#f8f8f2;background:0 0;text-shadow:0 1px rgba(0,0,0,.3);font-family:Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace;font-size:1em;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none}pre[class*=language-]{padding:1em;margin:.5em 0;overflow:auto;border-radius:.3em}:not(pre)>code[class*=language-],pre[class*=language-]{background:#272822}:not(pre)>code[class*=language-]{padding:.1em;border-radius:.3em;white-space:normal}.token.cdata,.token.comment,.token.doctype,.token.prolog{color:#8292a2}.token.punctuation{color:#f8f8f2}.token.namespace{opacity:.7}.token.constant,.token.deleted,.token.property,.token.symbol,.token.tag{color:#f92672}.token.boolean,.token.number{color:#ae81ff}.token.attr-name,.token.builtin,.token.char,.token.inserted,.token.selector,.token.string{color:#a6e22e}.language-css .token.string,.style .token.string,.token.entity,.token.operator,.token.url,.token.variable{color:#f8f8f2}.token.atrule,.token.attr-value,.token.class-name,.token.function{color:#e6db74}.token.keyword{color:#66d9ef}.token.important,.token.regex{color:#fd971f}.token.bold,.token.important{font-weight:700}.token.italic{font-style:italic}.token.entity{cursor:help} -div.code-toolbar{position:relative}div.code-toolbar>.toolbar{position:absolute;z-index:10;top:.3em;right:.2em;transition:opacity .3s ease-in-out;opacity:0}div.code-toolbar:hover>.toolbar{opacity:1}div.code-toolbar:focus-within>.toolbar{opacity:1}div.code-toolbar>.toolbar>.toolbar-item{display:inline-block}div.code-toolbar>.toolbar>.toolbar-item>a{cursor:pointer}div.code-toolbar>.toolbar>.toolbar-item>button{background:0 0;border:0;color:inherit;font:inherit;line-height:normal;overflow:visible;padding:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}div.code-toolbar>.toolbar>.toolbar-item>a,div.code-toolbar>.toolbar>.toolbar-item>button,div.code-toolbar>.toolbar>.toolbar-item>span{color:#bbb;font-size:.8em;padding:0 .5em;background:#f5f2f0;background:rgba(224,224,224,.2);box-shadow:0 2px 0 0 rgba(0,0,0,.2);border-radius:.5em}div.code-toolbar>.toolbar>.toolbar-item>a:focus,div.code-toolbar>.toolbar>.toolbar-item>a:hover,div.code-toolbar>.toolbar>.toolbar-item>button:focus,div.code-toolbar>.toolbar>.toolbar-item>button:hover,div.code-toolbar>.toolbar>.toolbar-item>span:focus,div.code-toolbar>.toolbar>.toolbar-item>span:hover{color:inherit;text-decoration:none} - diff --git a/docs/static/js/code-select.js b/docs/static/js/code-select.js deleted file mode 100644 index d45e9d1d5..000000000 --- a/docs/static/js/code-select.js +++ /dev/null @@ -1,27 +0,0 @@ -(function ($) { - $(document).ready(function () { - $(".gd-docs-code-select__tab").on("click", setActive); - $(".gd-docs-code-select__osdetection .gd-docs-code-select__tab").each(osDetection); - }); - - var setActive = function() { - if(!$(this).hasClass("active")) { - $(this).siblings().removeClass("active"); - $(this) - .addClass("active") - .parent() - .parent() - .find(".gd-docs-code-select__code") - .removeClass("active") - .filter(".lang-" + $(this).data("lang")) - .addClass("active"); - } - } - - var osDetection = function() { - if(window.navigator.userAgent.indexOf($(this).data("user-agent")) >= 0) { - $(this).trigger("click"); - } - } - -}(jQuery)); diff --git a/docs/static/js/content-select.js b/docs/static/js/content-select.js deleted file mode 100644 index e4236e60e..000000000 --- a/docs/static/js/content-select.js +++ /dev/null @@ -1,19 +0,0 @@ -(function ($) { - $(document).ready(function () { - $(".gd-docs-content-select__tab").on("click", setActive); - }); - - var setActive = function() { - if(!$(this).hasClass("active")) { - $(this).siblings().removeClass("active"); - - $(this).addClass("active") - .parent() - .parent() - .find(".gd-docs-content__block") - .removeClass("active") - .filter(".content-" + $(this).data("content")) - .addClass("active"); - } - } -}(jQuery));