From 0055720d9f9b84395f78d96c28e81d7aae1ac975 Mon Sep 17 00:00:00 2001 From: Jeffrey Phillips Freeman <the@jeffreyfreeman.me> Date: Sat, 21 Oct 2023 17:41:31 -0400 Subject: [PATCH] Added parameter to hide copy button on tab shortcode --- CHANGELOG.md | 2 ++ layouts/shortcodes/tab.html | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 99aca5513..19d440b6f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,8 @@ * Fixed the CSS so the `navbar` wont overflow under very low resolutions. * Fixed certain text inside `<p>` tags overflowing and distorting the layout. * Updated CSS for `blockquote` and fonts to be more readable. +* Added additional parameter to `tab` shortcode allowing the `copy` button to be + hidden. ## 2.0.0 diff --git a/layouts/shortcodes/tab.html b/layouts/shortcodes/tab.html index 10871ebd9..da0b3843f 100644 --- a/layouts/shortcodes/tab.html +++ b/layouts/shortcodes/tab.html @@ -1,4 +1,4 @@ <div class="codeBlockWrapper tab-pane" title="{{ .Get 0 }}"> - <button type="button" aria-label="Copy code to clipboard" class="copyButton">Copy</button> + {{ if .Get 1 }}<button type="button" aria-label="Copy code to clipboard" class="copyButton">Copy</button>{{ end }} {{ .Inner }} </div> -- GitLab