Skip to content

Commit 97caa7d

Browse files
committed
fix: example cards
1 parent bff1bb4 commit 97caa7d

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

bitext/src/routes/+page.svelte

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,10 @@
7373
const authorSite = 'https://danipolani.github.io/en/';
7474
const toolsPage = 'https://danipolani.github.io/en/blog/tools/';
7575
const year = new Date().getFullYear();
76+
77+
/** How much to trim from the top and bottom of each example image (CSS length, e.g. %, px). */
78+
const EXAMPLES_IMAGE_VERTICAL_CROP = '10%';
79+
const examplesImageClipPath = `inset(${EXAMPLES_IMAGE_VERTICAL_CROP} 0 ${EXAMPLES_IMAGE_VERTICAL_CROP} 0)`;
7680
</script>
7781

7882
<svelte:head>
@@ -191,6 +195,7 @@
191195
loading="lazy"
192196
decoding="async"
193197
class="h-full w-full object-contain"
198+
style:clip-path={examplesImageClipPath}
194199
/>
195200
</div>
196201
<figcaption class="mt-2 text-center text-sm text-gray-600 dark:text-gray-400">
@@ -207,6 +212,7 @@
207212
loading="lazy"
208213
decoding="async"
209214
class="h-full w-full object-contain"
215+
style:clip-path={examplesImageClipPath}
210216
/>
211217
</div>
212218
<figcaption class="mt-2 text-center text-sm text-gray-600 dark:text-gray-400">

0 commit comments

Comments
 (0)