Skip to content

Commit

Permalink
Merge branch 'youtube-page-fixes' of https://github.com/dmlb/knowledg…
Browse files Browse the repository at this point in the history
…e-hub into youtube-page-fixes
  • Loading branch information
dmlb committed Aug 13, 2024
2 parents db316d8 + 2b9b76e commit 7340f6f
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 15 deletions.
2 changes: 1 addition & 1 deletion scripts/youtube.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ async def get_videos_from_channels(channel_ids: List[str], youtube: build):
title=item["snippet"]["title"],
videoPic=item["snippet"]["thumbnails"]["medium"]["url"],
videoPicW=item["snippet"]["thumbnails"]["medium"]["width"],
videoPicH=item["snippet"]["thumbnails"]["medium"]["height"]
videoPicH=item["snippet"]["thumbnails"]["medium"]["height"],
)
channel_videos.append(video)

Expand Down
33 changes: 19 additions & 14 deletions src/routes/youtube/YoutubeThumbnail.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@
>
<a href="https://youtu.be/{videoId}" target="_blank" rel="noreferrer">
{#if videoPic}
<img
loading="lazy"
class="rounded-l-lg md:rounded-bl-none md:rounded-t-lg md:w-full"
height={videoPicH}
width={videoPicW}
src={videoPic}
alt=""
/>
<img
loading="lazy"
class="rounded-l-lg md:rounded-bl-none md:rounded-t-lg md:w-full"
height={videoPicH}
width={videoPicW}
src={videoPic}
alt=""
/>
{/if}
<div
class="md:block text-sm font-semibold text-zinc-900 dark:text-zinc-100"
Expand All @@ -35,10 +35,15 @@
rel="noreferrer"
aria-label="{channelName} youtube channel (in a new tab)"
>
{#if channelPic}
<img class="rounded-full" src="{channelPic}" height="18" width="18" alt="">
{/if}
{channelName}
</a
>
{#if channelPic}
<img
class="rounded-full"
src={channelPic}
height="18"
width="18"
alt=""
/>
{/if}
{channelName}
</a>
</div>

0 comments on commit 7340f6f

Please sign in to comment.