Skip to content

Commit ebe2930

Browse files
FEAT: Add image to case study thumbnail (#638)
1 parent b905d77 commit ebe2930

10 files changed

+44
-15
lines changed

apps/website/astro.config.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ export default defineConfig({
2020
imageService: true,
2121
imagesConfig: {
2222
sizes: [
23-
320, 480, 578, 640, 720, 800, 940, 960, 1200, 1280, 1412, 1440, 1536,
24-
1600, 1800, 1920,
23+
160, 320, 480, 578, 640, 720, 800, 940, 960, 1200, 1280, 1412, 1440,
24+
1536, 1600, 1800, 1920,
2525
],
2626
formats: ["image/avif", "image/webp"],
2727
},
558 KB
Loading
466 KB
Loading
496 KB
Loading
Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,40 @@
11
---
2+
import { Image } from "astro:assets";
23
import ExternalLink from "./ExternalLink.astro";
34
45
interface Props {
56
href: string;
67
linkText: string;
78
title: string;
9+
image: string;
810
}
911
10-
const { href, linkText, title } = Astro.props;
12+
const { href, linkText, title, image } = Astro.props;
13+
14+
const images = import.meta.glob<{ default: ImageMetadata }>("/src/assets/*.*");
15+
16+
const linkImageSrc = await images[`/src/assets/${image || ""}`]();
1117
---
1218

13-
<div class="bg-white p-4 rounded-md gap-2 grid md:w-[65%]">
14-
<span class="text-contrast text-sm sm:text-base font-semibold">{title}</span>
15-
<ExternalLink href={href} text={linkText} />
19+
<div
20+
class="bg-white p-4 rounded-md gap-x-4 gap-y-2.5 grid w-full max-w-[390px]"
21+
>
22+
<Image
23+
src={linkImageSrc.default}
24+
alt={title}
25+
width={80}
26+
height={80}
27+
class="col-span-1 row-span-2 aspect-square w-[80px] rounded-lg object-cover"
28+
widths={[160, 320]}
29+
sizes={"160px"}
30+
/>
31+
<span
32+
class="text-contrast text-sm sm:text-base font-semibold col-span-1 row-span-1 col-start-2"
33+
>{title}</span
34+
>
35+
<ExternalLink
36+
href={href}
37+
text={linkText}
38+
classNames="col-span-1 row-span-1 col-start-2"
39+
/>
1640
</div>

apps/website/src/components/ExternalLink.astro

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
---
2+
import classnames from "classnames";
23
interface Props {
34
href: string;
45
text: string;
6+
classNames?: string;
57
}
68
7-
const { href, text } = Astro.props;
9+
const { href, text, classNames } = Astro.props;
810
---
911

10-
<div class="flex gap-2 items-center">
12+
<div class={classnames("flex gap-2 items-center", classNames)}>
1113
<a
1214
class="text-contrast underline underline-offset-2 text-sm sm:text-base"
1315
href={href}

apps/website/src/components/ServiceCard.astro

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,15 @@ interface Props {
2323
href: string;
2424
text: string;
2525
title?: string;
26+
image?: string;
2627
};
2728
}
2829
2930
const { title, subtitles, content, styles, img, classNames, link } =
3031
Astro.props;
3132
32-
const images = import.meta.glob("../assets/*.*");
33-
const src = images[`../assets${img.path}`] as any as () => Promise<{
34-
default: ImageMetadata;
35-
}>;
33+
const images = import.meta.glob<{ default: ImageMetadata }>("../assets/*.*");
34+
const src = images[`../assets${img.path}`];
3635
3736
const image = await src();
3837
---
@@ -50,7 +49,7 @@ const image = await src();
5049
h-[710px]
5150
overflow-hidden
5251
`,
53-
styles,
52+
styles
5453
)}
5554
>
5655
<section
@@ -70,7 +69,7 @@ const image = await src();
7069
lg:grid-cols-2
7170
backdrop-blur-[15px]
7271
`,
73-
classNames,
72+
classNames
7473
)}
7574
>
7675
<div
@@ -96,11 +95,12 @@ const image = await src();
9695
/>
9796
<div>
9897
{
99-
link?.title ? (
98+
link?.title && link.image ? (
10099
<BlogLink
101100
href={link.href}
102101
title={link.title}
103102
linkText={link.text}
103+
image={link.image}
104104
/>
105105
) : (
106106
<CTA id="contact-cta" href={link.href}>

apps/website/src/content/services/create-an-evolving-architecture.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ link:
1313
href: "/blog/using-lago-to-create-a-flexible-billing-system"
1414
text: "See case study"
1515
title: "Using Lago to Create a Flexible Billing System"
16+
image: "using-lago-to-create-a-flexible-billing-system-2.png"
1617
---
1718

1819
From start to finish, we are there to design, implement, and guide you through the adoption of a future-proof, flexible software architecture. Backed by strong product engineering practices and tailored to your unique needs, we aim to reduce costs and mitigate the risks of downtime, technical debt, and evolving industry demands.

apps/website/src/content/services/lead-migrations-without-imacting-customers.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ link:
1313
href: "/blog/how-we-rebuilt-a-legacy-ui-with-zero-downtime"
1414
text: "See case study"
1515
title: "How We Rebuilt a Legacy UI With Zero Downtime: A Case Study in Component Libraries and Frontend Guidance"
16+
image: "how-we-rebuilt-a-legacy-ui-with-zero-downtime.png"
1617
---
1718

1819
Move away from legacy systems and navigate major tech initiatives such as new framework adoptions, without disrupting your users. Whether you need end-to-end delivery or staff augmentation, our bottom-up approach empowers your existing teams to drive change sustainably and confidently.

apps/website/src/content/services/upskill-existing-team.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ link:
1414
href: "/blog/migrating-an-enterprise-app-from-angularjs-to-react"
1515
text: "See case study"
1616
title: "Migrating an Enterprise App from AngularJS to React"
17+
image: "from-angular-to-react.png"
1718
---
1819

1920
Help your team keep up with industry demands through dedicated mentorship and hands-on support. We offer technical coaching, on-the-job pairing, and structured growth plans to identify and close skill gaps so your developers become more effective and confident with modern technologies and practices.

0 commit comments

Comments
 (0)