feat(web): embed video on detail page via nocookie iframe
Responsive 16:9 youtube-nocookie iframe rendered when the id is valid; omitted (graceful) otherwise so summary/highlights/takeaways still show. Regenerated views_templ.go.
This commit is contained in:
@@ -106,6 +106,18 @@ templ DetailPage(r store.SummaryRow) {
|
||||
<span class="badge" title="summarized with the fallback model" aria-label="summarized with the fallback model">fallback</span>
|
||||
}
|
||||
</p>
|
||||
if url, ok := embedURL(r.ProviderVideoID); ok {
|
||||
<div class="embed">
|
||||
<iframe
|
||||
src={ url }
|
||||
title={ displayTitle(r) }
|
||||
loading="lazy"
|
||||
referrerpolicy="strict-origin-when-cross-origin"
|
||||
allow="accelerometer; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
|
||||
allowfullscreen
|
||||
></iframe>
|
||||
</div>
|
||||
}
|
||||
if r.URL != "" {
|
||||
<p class="source"><a href={ externalURL(r.URL) } rel="noopener noreferrer">watch on source ↗</a></p>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user