Skip to content

Commit cd5ad6b

Browse files
committed
wip
1 parent 87af7de commit cd5ad6b

7 files changed

Lines changed: 65 additions & 8 deletions

File tree

assets/scss/alert.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
.td-content & {
2828
margin-top: 0;
2929
margin-bottom: 5px;
30+
font-family: $funnel-semibold;
3031
font-size: 20px;
3132
line-height: 1.3;
3233
}

assets/scss/layout.scss

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,14 @@
1717
.panel-line:only-child {
1818
display: none;
1919
}
20+
21+
& &__title {
22+
font-family: $switzer-variable;
23+
font-size: 1.15rem;
24+
font-weight: 500;
25+
line-height: 1.2;
26+
margin: 0;
27+
}
2028
}
2129

2230
:focus {

layouts/_default/content.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@ <h1>{{ .Title }}</h1>
66
{{ if (and (not .Params.hide_readingtime) (.Site.Params.ui.readingtime.enable)) }}
77
{{ partial "reading-time.html" . }}
88
{{ end }}
9-
{{ .Content }}
9+
{{/* Drop Goldmark's role="doc-endnotes" from the footnotes wrapper: its
10+
doc-endnote items sit inside an <ol>, so the wrapper owns no
11+
doc-endnote children and fails aria-required-children. The <ol>/<li>
12+
list semantics are kept. */}}
13+
{{ .Content | replaceRE ` role="doc-endnotes"` "" | safeHTML }}
1014
{{ if and .Params.sectionIndex .Parent }}
1115
{{ partial "section-index.html" .Parent }}
1216
{{ end }}

layouts/partials/inline-svg.html

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{{- /* (C) 2026 GoodData Corporation
2+
Inline an SVG file with its internal ids namespaced by a unique prefix so
3+
that multiple icons on one page can't produce duplicate ids, and add
4+
aria-hidden. Params: path (file to read), uid (unique prefix). */ -}}
5+
{{- $path := .path -}}
6+
{{- $uid := .uid -}}
7+
{{- $svg := readFile $path -}}
8+
{{- $svg = replaceRE `id="([^"]+)"` (printf `id="%s-${1}"` $uid) $svg -}}
9+
{{- $svg = replaceRE `url\(#([^)]+)\)` (printf `url(#%s-${1})` $uid) $svg -}}
10+
{{- $svg = replaceRE `(xlink:href|href)="#([^"]+)"` (printf `${1}="#%s-${2}"` $uid) $svg -}}
11+
{{- $svg = replaceRE `(<svg)(.*?>)` `${1} aria-hidden="true"${2}` $svg 1 -}}
12+
{{- $svg | safeHTML -}}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{{/* (C) 2026 GoodData Corporation
2+
Local override of Docsy's section-index partial. Subpage entry titles use
3+
<h2> (not <h5>) so the document heading order never skips a level; the
4+
small visual size is preserved via .section-index__title in layout.scss. */}}
5+
<div class="section-index">
6+
{{ $parent := .Page }}
7+
{{ $pages := (where .Site.Pages "Section" .Section).ByWeight }}
8+
{{ $pages = (where $pages "Type" "!=" "search") }}
9+
{{ $pages = (where $pages ".Params.hide_summary" "!=" true) }}
10+
{{ $pages = (where $pages ".Parent" "!=" nil) }}
11+
{{ $pages = (where $pages "Parent.File.UniqueID" "==" $parent.File.UniqueID) }}
12+
{{ if or $parent.Params.no_list (eq (len $pages) 0) }}
13+
{{/* If no_list is true or we don't have subpages we don't show a list of subpages */}}
14+
{{ else if $parent.Params.simple_list }}
15+
{{/* If simple_list is true we show a bulleted list of subpages */}}
16+
<ul>
17+
{{ range $pages }}
18+
{{ $manualLink := cond (isset .Params "manuallink") .Params.manualLink ( cond (isset .Params "manuallinkrelref") (relref . .Params.manualLinkRelref) .RelPermalink) }}
19+
<li><a href="{{ $manualLink }}"{{ with .Params.manualLinkTitle }} title="{{ . }}"{{ end }}{{ with .Params.manualLinkTarget }} target="{{ . }}"{{ if eq . "_blank" }} rel="noopener"{{ end }}{{ end }}>{{- .Title -}}</a></li>
20+
{{ end }}
21+
</ul>
22+
{{ else }}
23+
{{/* Otherwise we show a nice formatted list of subpages with page descriptions */}}
24+
<hr class="panel-line">
25+
{{ range $pages }}
26+
{{ $manualLink := cond (isset .Params "manuallink") .Params.manualLink ( cond (isset .Params "manuallinkrelref") (relref . .Params.manualLinkRelref) .RelPermalink) }}
27+
<div class="entry">
28+
<h2 class="section-index__title">
29+
<a href="{{ $manualLink }}"{{ with .Params.manualLinkTitle }} title="{{ . }}"{{ end }}{{ with .Params.manualLinkTarget }} target="{{ . }}"{{ if eq . "_blank" }} rel="noopener"{{ end }}{{ end }}>{{- .Title -}}</a>
30+
</h2>
31+
<p>{{ .Description | markdownify }}</p>
32+
</div>
33+
{{ end }}
34+
{{ end }}
35+
</div>

layouts/shortcodes/alert.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
{{ $icon := .Get "color" | default "default" }}
55
<div class="alert alert-{{ $color }}" role="note">
66
{{ with resources.Get (printf "icons/icon-alert-%s.svg" $icon) }}{{ ( . | minify).Content | safeHTML }}{{ end }}
7-
{{ with .Get "title" }}<h4 class="alert-heading">{{ . | safeHTML }}</h4>{{ end }}
7+
{{ with .Get "title" }}<p class="alert-heading">{{ . | safeHTML }}</p>{{ end }}
88
{{ if eq .Page.File.Ext "md" }}
99
{{ replaceRE "^<pre><code>" "" .Inner | safeHTML }}
1010
{{ else }}

layouts/shortcodes/blocks/card.html

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
{{ $iconPosition := default "left" (.Get "iconPosition") }}
77
{{ $maxRow := .Parent.Get "maxRow" }}
88
{{ $span := .Get "span" }}
9+
{{ $ordinal := .Ordinal }}
910

1011
{{ if ne .Page.FirstSection .Site.Home }}
1112
{{ .Scratch.Set "docsRoot" (replaceRE "/$" "" .Page.FirstSection.RelPermalink) }}
@@ -31,9 +32,7 @@
3132
{{ with .Site.GetPage (printf "%s%s" (.Scratch.Get "docsRoot") $sectionLink) }}
3233
<a href="{{ .RelPermalink }}" class="homepage-card homepage-card__sectionLink homepage-card__hasIcon homepage-card__icon{{ title $iconPosition }}">
3334
<div class="homepage-card__icon">
34-
{{ $svgContent := readFile (printf "%s%s" .RelPermalink .Params.icon) }}
35-
{{ $modifiedSvg := replaceRE `(<svg)(.*?>)` "$1 aria-hidden=\"true\"$2" $svgContent 1 }}
36-
{{ $modifiedSvg | safeHTML }}
35+
{{ partial "inline-svg.html" (dict "path" (printf "%s%s" .RelPermalink .Params.icon) "uid" (printf "%s-%d" (path.BaseName .Params.icon) $ordinal)) }}
3736
</div>
3837
<strong class="homepage-card__title">{{ .Title }}</strong>
3938
{{ if $description }}
@@ -48,9 +47,7 @@
4847
{{ if $icon }}
4948
<div class="homepage-card__icon">
5049
{{ if eq (index (last 1 (split $icon ".")) 0) "svg" }}
51-
{{ $svgContent := readFile $icon }}
52-
{{ $modifiedSvg := replaceRE `(<svg)(.*?>)` "$1 aria-hidden=\"true\"$2" $svgContent 1 }}
53-
{{ $modifiedSvg | safeHTML }}
50+
{{ partial "inline-svg.html" (dict "path" $icon "uid" (printf "%s-%d" (path.BaseName $icon) $ordinal)) }}
5451
{{ else }}
5552
<img src="{{ $icon }}" aria-hidden="true"/>
5653
{{ end }}

0 commit comments

Comments
 (0)