-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: link to YouTube in the consent placeholder
Changes the consent placeholder used when the user is trying to view an article without accepting cookies first, so that it also includes a link to YouTube to always propose the video. This is not supported by Klaro, so I had to make my own.
- Loading branch information
Showing
9 changed files
with
168 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,28 @@ | ||
<div class="ytiframe"> | ||
<div class="ytiframe" style="--thumbnail-url: url('https://i1.ytimg.com/vi/<%= youtube_id %>/maxresdefault.jpg');"> | ||
<figure class="ytiframe__iframe"> | ||
<div class="ytiframe__consent" data-name="youtube-embed"> | ||
<div id="ytplayer" data-id="<%= youtube_id %>"></div> | ||
<noscript> | ||
<iframe id="ytplayer" src="https://www.youtube-nocookie.com/embed/<%= youtube_id %>?showinfo=0" allowfullscreen> | ||
</iframe> | ||
</noscript> | ||
<div class="consent"> | ||
<div class="consent__box"> | ||
<p class="consent__lead">Necesito tu permiso</p> | ||
<p> | ||
¿Quieres cargar el reproductor de YouTube? Podrían guardarse cookies de terceros en tu | ||
navegador. Si no, siempre puedes ir a ver el vídeo a YouTube. | ||
</p> | ||
<div class="consent__buttons"> | ||
<%= render Six::Base::ButtonComponent.new(id: "iframe-allow-now", text: 'Permitir esta vez') %> | ||
<%= render Six::Base::ButtonComponent.new(id: "iframe-allow-always", text: 'Permitir siempre') %> | ||
<%= render Six::Base::ButtonComponent.new(href: "https://youtu.be/#{youtube_id}", text: 'Ver en YouTube →', target: '_blank') %> | ||
</div> | ||
<p><small> | ||
Ves este aviso porque no has establecido aún tus preferencias de cookies | ||
o porque las has rechazado previamente. Este sitio web está orgulloso de | ||
no usar cookies propias ni servir anuncios. | ||
</small></p> | ||
</div> | ||
</div> | ||
<div id="ytplayer" data-id="<%= youtube_id %>"></div> | ||
<noscript> | ||
<iframe id="ytplayer" src="https://www.youtube-nocookie.com/embed/<%= youtube_id %>?showinfo=0" allowfullscreen> | ||
</iframe> | ||
</noscript> | ||
</figure> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters