From e7eb9aa366f9d2fd35395603a6b29242aa365c37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20Weber?= Date: Thu, 21 Sep 2023 21:34:02 +0200 Subject: [PATCH] theme: remove HTML validation errors #644 --- exampleSite/content/shortcodes/siteparam.en.md | 1 - layouts/partials/shortcodes/openapi.html | 2 +- layouts/partials/shortcodes/siteparam.html | 4 ++-- layouts/partials/shortcodes/tabs.html | 4 ++-- static/css/theme.css | 1 + static/js/theme.js | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/exampleSite/content/shortcodes/siteparam.en.md b/exampleSite/content/shortcodes/siteparam.en.md index 2ddd694ffc..8a9989f174 100644 --- a/exampleSite/content/shortcodes/siteparam.en.md +++ b/exampleSite/content/shortcodes/siteparam.en.md @@ -12,7 +12,6 @@ While the examples are using shortcodes with named parameter you are free to use {{< tabs groupid="shortcode-parameter">}} {{% tab title="shortcode" %}} - ````go {{%/* siteparam name="editURL" */%}} ```` diff --git a/layouts/partials/shortcodes/openapi.html b/layouts/partials/shortcodes/openapi.html index 7e1c2826e6..6c8e444519 100644 --- a/layouts/partials/shortcodes/openapi.html +++ b/layouts/partials/shortcodes/openapi.html @@ -15,7 +15,7 @@
{{- .Store.Set "hasOpenapi" true }} diff --git a/layouts/partials/shortcodes/siteparam.html b/layouts/partials/shortcodes/siteparam.html index e477be730f..3bb3b74c64 100644 --- a/layouts/partials/shortcodes/siteparam.html +++ b/layouts/partials/shortcodes/siteparam.html @@ -11,7 +11,7 @@ {{- $params = index . (lower $paramName) }} {{- end }} {{- end }} -{{- if $params }} - {{- $params | .RenderString }} +{{- with $params }} + {{- . }} {{- end }} {{- end }} \ No newline at end of file diff --git a/layouts/partials/shortcodes/tabs.html b/layouts/partials/shortcodes/tabs.html index 5eaa662e1d..1fca1b2a92 100644 --- a/layouts/partials/shortcodes/tabs.html +++ b/layouts/partials/shortcodes/tabs.html @@ -65,10 +65,10 @@ class="tab-nav-button tab-panel-style cstyle {{ .style }}{{ cond (eq $idx 0) " active" ""}}"{{ if .color }} style="--VARIABLE-BOX-color: {{ .color }};"{{ end }} onclick="switchTab('{{ $groupid }}','{{ .itemid }}')" > -
+
{{ if .icon }}{{ end }}{{ if and .icon .title }} {{ end }}{{ .title | $page.RenderString }}{{ if (not .title) }}​{{ end }}
{{ if .icon }}{{ end }}{{ if and .icon .title }} {{ end }}{{ .title | $page.RenderString }}{{ if (not .title) }}​{{ end }}
-
+ {{- end }} diff --git a/static/css/theme.css b/static/css/theme.css index b9b0951a1b..1b0cb064cc 100644 --- a/static/css/theme.css +++ b/static/css/theme.css @@ -2042,6 +2042,7 @@ html[dir="rtl"] #sidebar ul.collapsible-menu > li > label > i.fa-chevron-right { } #body .tab-nav-button > *{ + display: block; position: relative; } diff --git a/static/js/theme.js b/static/js/theme.js index c232c18379..665839526a 100644 --- a/static/js/theme.js +++ b/static/js/theme.js @@ -432,7 +432,7 @@ function initOpenapi( update, attrs ){ activated: true, theme: swagger_code_theme, }, - url: oc.getAttribute('openapi-url'), + url: oc.dataset.openapiUrl, validatorUrl: 'none', }); })