diff --git a/assets/scss/shortcodes/tabbed-pane.scss b/assets/scss/shortcodes/tabbed-pane.scss index 15e54700f6..0f075fa56c 100644 --- a/assets/scss/shortcodes/tabbed-pane.scss +++ b/assets/scss/shortcodes/tabbed-pane.scss @@ -6,20 +6,17 @@ .tab-content { .tab-pane { .highlight { - border: none; - max-width: 100%; + margin: 0rem 0 0rem 0; + border: none; + max-width: 100%; } - pre { - 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); - } - margin: 0rem; + margin-top: 0rem; + margin-bottom: 1.5rem; max-width: 80%; - border-left: none; - border-right: none; - border-bottom: none; - } + 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 { diff --git a/layouts/shortcodes/tab.html b/layouts/shortcodes/tab.html index 5a644bc788..c947ac48c0 100644 --- a/layouts/shortcodes/tab.html +++ b/layouts/shortcodes/tab.html @@ -21,12 +21,25 @@ {{ with $.Get "highlight" }} {{ $tab = merge $tab (dict "highlight" ($.Get "highlight")) }} {{ end }} -{{ with $.Get "code" }} - {{ $tab = merge $tab (dict "code" ($.Get "code")) }} +{{ with $.Get "text" }} + {{ if ne ( printf "%T" . ) "bool" }} + {{- errorf "shortcode tab: parameter 'text' must be either true or false" -}} + {{ end }} + {{ $tab = merge $tab (dict "text" ($.Get "text")) }} +{{ end }} +{{ with $.Get "right" }} + {{ if ne ( printf "%T" . ) "bool" }} + {{- errorf "shortcode tab: parameter 'right' must be either true or false" -}} + {{ end }} + {{ $tab = merge $tab (dict "rightpush" ($.Get "right")) }} {{ end }} {{ with $.Get "disabled" }} + {{ if ne ( printf "%T" . ) "bool" }} + {{- errorf "shortcode tab: parameter 'disabled' must be either true or false" -}} + {{ end }} {{ $tab = merge $tab (dict "disabled" ($.Get "disabled")) }} {{ end }} + {{ with $.Inner }} @@ -35,5 +48,5 @@ {{ with .Parent }} - {{- $.Parent.Scratch.SetInMap "tabs" (printf "%v" $.Ordinal) $tab -}} -{{ end }} \ No newline at end of file + {{- $.Parent.Scratch.SetInMap "tabs" (printf "%02v" $.Ordinal) $tab -}} +{{ end }} diff --git a/layouts/shortcodes/tabpane.html b/layouts/shortcodes/tabpane.html index 0d019bf5da..4836f62675 100644 --- a/layouts/shortcodes/tabpane.html +++ b/layouts/shortcodes/tabpane.html @@ -5,9 +5,9 @@ {{ end }} {{ end }} -{{ with .Get "code" }} +{{ with .Get "text" }} {{ if ne ( printf "%T" . ) "bool" }} -{{- errorf "shortcode tabpane: parameter 'code' must be either true or false" -}} +{{- errorf "shortcode tabpane: parameter 'text' must be either true or false" -}} {{ end }} {{ end }} @@ -17,19 +17,27 @@ {{ end }} {{ end }} +{{ with .Get "right" }} +{{ if ne ( printf "%T" . ) "bool" }} +{{- errorf "shortcode tabpane: parameter 'right' must be either true or false" -}} +{{ end }} +{{ end }} + {{- $langPane := default "" ($.Get "lang") -}} {{- $hloptionsPane := default "" ($.Get "highlight") -}} -{{- $codePane := default true ($.Get "code") -}} +{{- $textPane := default false ($.Get "text") -}} {{- $langEqualsHeader := default false ($.Get "langEqualsHeader") -}} {{- $persistLang := default true ($.Get "persistLang") -}} +{{- $rightPane := default false ($.Get "right") -}} {{- $disabled := false -}} +{{- $rightpush := false -}} {{- $activeSet := false -}} {{- .Inner -}} -