Added privacy-friendly embed shortcode with consent and placeholderFeature/privacy modal#93
Added privacy-friendly embed shortcode with consent and placeholderFeature/privacy modal#93nikitakar9862 wants to merge 16 commits intodjango:mainfrom
Conversation
benjaoming
left a comment
There was a problem hiding this comment.
This is all looking super-nice! I think you should find somewhere that people exchange Hugo snippets and share it afterwards.
|
Thanks for the guidance! @benjaoming 🙌 |
|
@nikitakar9862 was the input understandable? Ask if questions! |
|
I can also finish the PR from here, if you find the input too confusing. |
yes @benjaoming i am working on that |
Co-authored-by: Benjamin Balder Bach <benjaoming@gmail.com>
|
@nikitakar9862 there are now 2 versions of privacy-embed.js in the PR. I guess one should be removed? |
yes @benjaoming the previous one i had removed from the assets/js folder |
|
@nikitakar9862 there is no clear right and wrong about where to put this JS file, but can you make sure that there is just 1? 🙏 |
Summary
This PR introduces a new privacy-friendly embed system for YouTube. It includes:
privacy-embed.html(located in themes/django20/layouts/shortcodes/)privacy-embed.js) for consent management and iframe loadingprivacy-embed.css) for placeholder and consent buttonbaseof.htmlto ensure the embed works across all pagesFeatures
Consent-based loading:
Users must click "Accept & Play" to load the actual video or track, protecting privacy by avoiding automatic third-party requests.
Thumbnail/Placeholder:
Provider Support:
Usage Example
Markdown example for embedding a video: