Fix unstyled playlist cards on /videos?filter=playlists
The base card CSS (.yt-video-card/.yt-video-thumb/.yt-video-info) lived inside video-card's @once <style> block, so it only emitted when a video card rendered. Playlist cards reuse those classes, so on playlist-only pages (no video cards) they rendered completely unstyled — a mess. Extract the shared card CSS into resources/views/components/partials/card-styles (kept @once) and @include it from BOTH video-card and playlist-card. Now the CSS loads whenever either card renders, and @once still dedupes it to one copy on pages that show both (home feed verified: emitted exactly once). Co-Authored-By: Claude Opus 4.8 <[email protected]>
This commit is contained in:
1 parent
eb5cea8630
commit
0a0851e120
3 files changed
+675
-666
No files matched your search
@@ -10,6 +10,11 @@
|
||||
$plShuffleUrl = $firstVid ? route('playlists.shuffle', $pl->id) : null;
|
||||
@endphp
|
||||
|
||||
{{-- Playlist cards reuse .yt-video-card / .yt-video-thumb / .yt-video-info. That
|
||||
CSS lives in this shared partial (also used by video-card) so it loads on
|
||||
pages that show playlists but no videos, e.g. /videos?filter=playlists. --}}
|
||||
@include('components.partials.card-styles')
|
||||
|
||||
@once
|
||||
<style>
|
||||
.pl-count-badge {
|
||||
|
||||
Reference in new issue
Block a user