Skip to content

Commit bfaab1e

Browse files
authored
Hover effect on blog image update (#19)
* Changed zoom style * Underline post title
1 parent d90667e commit bfaab1e

File tree

3 files changed

+12
-13
lines changed

3 files changed

+12
-13
lines changed

src/lib/components/blogs/BlogItem.svelte

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,14 @@
1515
class="flex flex-col gap-3 rounded-xl bg-arkGray5 p-5 hover:bg-arkOrangeLight"
1616
>
1717
<div class="flex flex-col gap-2">
18-
<Image
19-
src="{base}{post.image ?? 'https://placehold.co/100x100/EEA050/white/?text=' + post.title}"
20-
class="max-h-48 w-full rounded-md object-cover xl:max-h-52 {hover && 'scale-105'}"
21-
/>
18+
<div class="overflow-hidden rounded-md">
19+
<Image
20+
src="{base}{post.image ??
21+
'https://placehold.co/100x100/EEA050/white/?text=' + post.title}"
22+
class="max-h-48 w-full rounded-md object-cover xl:max-h-52 {hover && 'scale-105'}"
23+
/>
24+
</div>
25+
2226
<div class="flex h-52 flex-col gap-1">
2327
<time dateTime={post.date ?? post.date} class="text-arkGray4">
2428
{new Date(post.date).toLocaleDateString(config.locale, {
@@ -27,7 +31,7 @@
2731
day: 'numeric',
2832
})}
2933
</time>
30-
<p class="text-2xl font-extrabold">
34+
<p class="text-2xl font-extrabold {hover && 'underline'}">
3135
{post.title}
3236
</p>
3337
<div class="">

src/lib/components/elements/Image.svelte

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,7 @@
2323
</script>
2424

2525
{#if loaded}
26-
<img
27-
{src}
28-
alt="app screenshot"
29-
class="max-h-[500px] transition-all duration-300 ease-in-out xl:max-h-[600px]"
30-
{...$$restProps}
31-
/>
26+
<img {src} alt="app screenshot" class="max-h-[500px] xl:max-h-[600px]" {...$$restProps} />
3227
{:else if loading}
3328
<div class="flex h-full max-h-[500px] w-[150px] flex-col items-center xl:max-h-[600px]">
3429
<Icon icon="ei:spinner-3" class="animate-spin" width="50px" />

src/lib/components/sections/OurApps.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
memo6: MemoImage6,
3535
retouch1: RetouchImage1,
3636
retouch2: RetouchImage2,
37-
retouch3: RetouchImage3
37+
retouch3: RetouchImage3,
3838
}
3939
4040
// const getImagesWithName = (name: string) =>
@@ -94,7 +94,7 @@
9494
<div class="flex-flow flex max-w-full gap-3 overflow-x-auto">
9595
{#each activeAppImages as image, i}
9696
{#key image}
97-
<Image src={image} />
97+
<Image src={image} class="min-w-[300px]" />
9898
{/key}
9999
{/each}
100100
</div>

0 commit comments

Comments
 (0)