diff options
Diffstat (limited to 'templates/shortcodes/youtube.html')
-rw-r--r-- | templates/shortcodes/youtube.html | 7 |
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> |