aboutsummaryrefslogtreecommitdiff
path: root/src/components
diff options
context:
space:
mode:
authorAndrew Lee <alee14498@protonmail.com>2024-07-07 15:25:42 -0400
committerAndrew Lee <alee14498@protonmail.com>2024-07-07 15:34:38 -0400
commit6f647c2ec564204330f8c7cbd7dc992e181edf2c (patch)
treede035333de23c05e8e7a345757adad794fc58c0f /src/components
parent7205caf6afb58bee230a04a5830842ea6e5b10ff (diff)
downloadpersonal-website-6f647c2ec564204330f8c7cbd7dc992e181edf2c.tar.gz
personal-website-6f647c2ec564204330f8c7cbd7dc992e181edf2c.tar.bz2
personal-website-6f647c2ec564204330f8c7cbd7dc992e181edf2c.zip
Moved the title and pub date below for videos
Diffstat (limited to 'src/components')
-rw-r--r--src/components/YouTubeVideos.svelte13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/components/YouTubeVideos.svelte b/src/components/YouTubeVideos.svelte
index 677e502..e66eaa4 100644
--- a/src/components/YouTubeVideos.svelte
+++ b/src/components/YouTubeVideos.svelte
@@ -52,8 +52,8 @@
<style>
.title {
- margin-top: .2em;
- margin-bottom: .2em;
+ margin-top: .5em;
+ margin-bottom: .3em;
}
img {
@@ -65,7 +65,6 @@
.card small {
display: block;
- margin-bottom: 1em;
}
.zoom {
@@ -76,7 +75,7 @@
}
.zoom:hover {
- transform: scale(1.1); /* Scales the image to 110% of its original size on hover */
+ transform: scale(1.04); /* Scales the image to 110% of its original size on hover */
}
.container {
@@ -116,9 +115,9 @@
{#each videos as video}
<div class="card">
<a href={`https://youtu.be/${video.snippet.resourceId.videoId}`} target="_blank">
- <h3 class="title">{video.snippet.title}</h3>
- <small>{formatDate(video.snippet.publishedAt)}</small>
- <img src={video.snippet.thumbnails.medium.url} alt={video.snippet.title} class="zoom" />
+ <img src={video.snippet.thumbnails.medium.url} class="zoom" loading="lazy" alt={video.snippet.title} width={video.snippet.thumbnails.medium.width} height={video.snippet.thumbnails.medium.height} />
+ <h3 class="title">{video.snippet.title}</h3>
+ <small>{formatDate(video.snippet.publishedAt)}</small>
</a>
</div>
{/each}