summaryrefslogtreecommitdiff
path: root/templates/shortcodes/youtube.html
diff options
context:
space:
mode:
authorxAlpharax <42233094+xAlpharax@users.noreply.github.com>2024-03-03 20:56:15 +0200
committerxAlpharax <42233094+xAlpharax@users.noreply.github.com>2024-03-03 20:56:15 +0200
commit6f51927e180fe6c6ea88806d245bd886df23f53a (patch)
tree04a67f5e9126557369c94d9a046db5cbf157be98 /templates/shortcodes/youtube.html
parent17dae0eaa459fdabafff1a05c524cb263b7018f6 (diff)
Made changes regarding the styling, config and added content and a shortcode for youtube embeds.
Changes to be committed: modified: config.toml modified: content/about.md modified: content/posts/How I made this Blog with Zola.md new file: content/posts/some_cool_stuff.md modified: content/posts/typography.md modified: sass/_normalize.scss modified: sass/_predefined.scss modified: sass/style.scss modified: templates/index.html new file: templates/shortcodes/youtube.html
Diffstat (limited to 'templates/shortcodes/youtube.html')
-rw-r--r--templates/shortcodes/youtube.html7
1 files changed, 7 insertions, 0 deletions
diff --git a/templates/shortcodes/youtube.html b/templates/shortcodes/youtube.html
new file mode 100644
index 0000000..87ccffe
--- /dev/null
+++ b/templates/shortcodes/youtube.html
@@ -0,0 +1,7 @@
+<div {% if class %}class="{{class}}"{% endif %} style="position: relative; width: 100%; padding-bottom: 56.25%; /* 16:9 aspect ratio for responsive sizing */ overflow: hidden;">
+ <iframe style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;
+ border-radius: 4px; /* Optional: Add some rounded corners */
+ border-style: none; /* Remove iframe border */"
+ src="https://www.youtube-nocookie.com/embed/{{id}}{% if autoplay %}?autoplay=1{% endif %}" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen>
+ </iframe>
+</div>