From 04a1970fff1913d1fc8dca35b537bbdbd1e1b47c Mon Sep 17 00:00:00 2001 From: Gianmarco Gargiulo Date: Mon, 8 May 2023 23:37:21 +0200 Subject: [PATCH] Added video embeds shortcode (experimental) --- themes/hugo-casper3/assets/scss/custom.scss | 43 +++++++++++++++++++ .../layouts/shortcodes/video.html | 35 +++++++++++++++ 2 files changed, 78 insertions(+) create mode 100644 themes/hugo-casper3/layouts/shortcodes/video.html diff --git a/themes/hugo-casper3/assets/scss/custom.scss b/themes/hugo-casper3/assets/scss/custom.scss index c524f1e..482d4a5 100644 --- a/themes/hugo-casper3/assets/scss/custom.scss +++ b/themes/hugo-casper3/assets/scss/custom.scss @@ -8,6 +8,49 @@ margin-left: auto; } +/* VIDEO TABS */ + +.tabs { + list-style: none; + position: relative; + margin: 0; + padding: 0; + width: 100%; + font-family: sans-serif +} +.tabs li { + display: inline-block; +} +.tabs input[type="radio"] { + display: none; +} +.tabs label { + display: block; + cursor: pointer; + padding: 10px 15px; + border: 2px solid black; + border-bottom: 0; + border-radius: 3px 3px 0 0; + background-color: black; +} +.tabs .tab-panel { + display: none; + overflow: hidden; + width: 100%; + position: absolute; + left: 0; + border-top: 2px solid gray; +} + +.tabs [id^="tab"]:checked + label { + background-color: gray; + border: 2px solid gray; + color: #fff; +} +.tabs [id^="tab"]:checked ~ [id^="tab-panel"] { + display: block; +} + /* FONTS */ @font-face { diff --git a/themes/hugo-casper3/layouts/shortcodes/video.html b/themes/hugo-casper3/layouts/shortcodes/video.html new file mode 100644 index 0000000..0436615 --- /dev/null +++ b/themes/hugo-casper3/layouts/shortcodes/video.html @@ -0,0 +1,35 @@ +
+ +
+ + +