pub / yt2html

Fetches Youtube content via RSS and provides a chronological timeline
git clone https://src.jayvii.de/pub/yt2html.git
Home | Log | Files | Exports | Refs | README | RSS

commit f22fb3fc5c7b0d6a12ffc3b2c3c5a766b78fd6ef
parent 2e4177bb36b3754704dfabbb0d9849d4d0ddde55
Author: JayVii <jayvii[AT]posteo[DOT]de>
Date:   Tue,  9 Dec 2025 12:11:55 +0100

fix: ensure the play button can be clicked

Diffstat:
Massets/css/custom.css | 7+++++--
Mindex.php | 17+++++++++++++----
2 files changed, 18 insertions(+), 6 deletions(-)

diff --git a/assets/css/custom.css b/assets/css/custom.css @@ -15,7 +15,10 @@ .preview { position: relative; } -.preview:before { +.preview > image { + display: block; +} +.playbutton { position: absolute; content: "\25B6"; top: 25%; @@ -28,7 +31,7 @@ border-radius: 5px; opacity: 0.5; } -.preview:hover:before { +.playbutton:hover { filter: invert(100%); opacity: 1; } diff --git a/index.php b/index.php @@ -366,13 +366,22 @@ <div class="player_container hidden"></div> <!-- Preview Image --> - <img + <div id="preview_<?php echo $index; ?>" class="preview" - src="https://i4.ytimg.com/vi/<?php echo $video["vid"]; ?>/hqdefault.jpg" - loading="lazy" - onclick="yt2html_toggle_player(<?php echo $js_args; ?>)" > + <img + src="https://i4.ytimg.com/vi/<?php echo $video["vid"]; ?>/hqdefault.jpg" + loading="lazy" + height="100%" + width="100%" + > + <?php $js_args = $index . ",'" . $video["vid"] . "'"; ?> + <div + class="play_button" + onclick="yt2html_toggle_player(<?php echo $js_args; ?>)" + > + </div> <!-- Chat Collapsable --> <details>