diff --git a/layouts/shortcodes/accordion-options.html b/layouts/shortcodes/accordion-options.html index 19cec95..d3e6850 100644 --- a/layouts/shortcodes/accordion-options.html +++ b/layouts/shortcodes/accordion-options.html @@ -5,20 +5,24 @@ Usage: ------- -{{< accordion-options threshold="600" notCollapsible="false" >}} +{{< accordion-options collapsible="false" >}} +Code block content goes here with **markdown** support. +{{< /accordion-options >}} + +{{< accordion-options threshold="600" >}} Code block content goes here with **markdown** support. {{< /accordion-options >}} Parameters: ------------ -- threshold (number): The pixel threshold at which the accordion collapses (only for non-collapsible accordions) --- notCollapsible (boolean): If true, the accordion cannot be collapsed +-- collapsible (boolean): Default is true, if false then the accordion cannot be collapsed */}} {{ $threshold := .Get "threshold" }} -{{ $notCollapsible := eq (lower (printf "%v" (.Get "notCollapsible"))) "true" }} +{{ $collapsible := ne (lower (printf "%v" (.Get "collapsible"))) "false" }} -
+
{{ .Inner | markdownify }}
\ No newline at end of file diff --git a/static/js/content-select.js b/static/js/content-select.js index caef85a..8072a23 100644 --- a/static/js/content-select.js +++ b/static/js/content-select.js @@ -2,6 +2,29 @@ (function ($) { $(document).ready(function () { + // Code needed to load the hidden content blocks for the prism-accessibility.js to apply to the code blocks in them + $(".gd-docs-content__block").each(function(index) { + if (index > 0) { + $(this).css({ + "display": "block", + "position": "absolute", + "opacity": 0, + }); + } + }); + + setTimeout(function() { + $(".gd-docs-content__block").each(function(index) { + if (index > 0) { + $(this).css({ + "display": "", + "position": "", + "opacity": "", + }); + } + }); + }, 100); + // Set up tab click behavior $(".gd-docs-content-select__tab").on("click", setActive); @@ -67,4 +90,4 @@ break; } }; -}(jQuery)); +}(jQuery)); \ No newline at end of file