diff --git a/assets/scss/shortcodes/tabbed-pane.scss b/assets/scss/shortcodes/tabbed-pane.scss index f63b50d064..65096aee6e 100644 --- a/assets/scss/shortcodes/tabbed-pane.scss +++ b/assets/scss/shortcodes/tabbed-pane.scss @@ -1,14 +1,17 @@ .tab-content { - .highlight { - margin: 0rem 0 2rem 0; + .tab-pane { + pre { + margin: 0rem 0 0rem 0; + } } } + .tab-content { .tab-pane { .highlight { - margin: 0rem 0 0rem 0; - border: none; - max-width: 100%; + margin: 0rem 0 0rem 0; + border: none; + max-width: 100%; } margin-top: 0rem; margin-bottom: 1.5rem; @@ -16,7 +19,7 @@ border-left: 1px solid rgba(0, 0, 0, 0.125); border-right: 1px solid rgba(0, 0, 0, 0.125); border-bottom: 1px solid rgba(0, 0, 0, 0.125); - } + } } .tab-body { @@ -27,10 +30,9 @@ padding: 1.5rem; @each $color, $value in $theme-colors { - &-#{$color} { - - border-style: solid; - border-color: $value; - } + &-#{$color} { + border-style: solid; + border-color: $value; + } } } diff --git a/layouts/shortcodes/tabpane.html b/layouts/shortcodes/tabpane.html index a25aab1e32..de644ea076 100644 --- a/layouts/shortcodes/tabpane.html +++ b/layouts/shortcodes/tabpane.html @@ -1,26 +1,26 @@ {{/* Check parameter types */ -}} {{ with .Get "langEqualsHeader" -}} -{{ if ne ( printf "%T" . ) "bool" -}} -{{ errorf "shortcode tabpane: parameter 'langEqualsHeader' must be either true or false" -}} -{{ end -}} + {{ if ne ( printf "%T" . ) "bool" -}} + {{ errorf "shortcode tabpane: parameter 'langEqualsHeader' must be either true or false" -}} + {{ end -}} {{ end -}} {{ with .Get "text" -}} -{{ if ne ( printf "%T" . ) "bool" -}} -{{ errorf "shortcode tabpane: parameter 'text' must be either true or false" -}} -{{ end -}} + {{ if ne ( printf "%T" . ) "bool" -}} + {{ errorf "shortcode tabpane: parameter 'text' must be either true or false" -}} + {{ end -}} {{ end -}} {{ with .Get "persistLang" -}} -{{ if ne ( printf "%T" . ) "bool" -}} -{{ errorf "shortcode tabpane: parameter 'persistLang' must be either true or false" -}} -{{ end -}} + {{ if ne ( printf "%T" . ) "bool" -}} + {{ errorf "shortcode tabpane: parameter 'persistLang' must be either true or false" -}} + {{ end -}} {{ end -}} {{ with .Get "right" -}} -{{ if ne ( printf "%T" . ) "bool" -}} -{{ errorf "shortcode tabpane: parameter 'right' must be either true or false" -}} -{{ end -}} + {{ if ne ( printf "%T" . ) "bool" -}} + {{ errorf "shortcode tabpane: parameter 'right' must be either true or false" -}} + {{ end -}} {{ end -}} {{/* Set values given defined within tabpane */ -}} @@ -30,15 +30,22 @@ {{ $langEqualsHeader := default false ($.Get "langEqualsHeader") -}} {{ $persistLang := default true ($.Get "persistLang") -}} {{ $rightPane := default false ($.Get "right") -}} -{{ $disabled := false -}} -{{ $rightpush := false -}} {{ $activeSet := false -}} {{- /* Scratchpad gets populated through call to .Inner */ -}} {{- .Inner -}} +{{ $langs := slice -}} +{{ $duplicate := false -}} +{{ $duplicateLang := "" -}} +
+{{ if $duplicate -}} + {{ warnf "Tabpane on page '%s': duplicate language '%s' detected, disabling persistance of language to avoid multiple tab display." .Page.Title $duplicateLang -}} +{{ end -}} +{{ $duplicate = false -}} +{{ $langs = slice -}} {{ $activeSet = false -}} {{/* Inner content */ -}}