Skip to content

Commit a532cb4

Browse files
committed
Add header images for blog posts
1 parent 1d5c758 commit a532cb4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+593
-518
lines changed

package-lock.json

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
5.54 MB
Loading

src/assets/blog/kubevirt.png

1.44 MB
Loading
1.18 MB
Loading
91.8 KB
Loading
Lines changed: 1 addition & 0 deletions
Loading

src/assets/technologies/talos.svg

Lines changed: 1 addition & 0 deletions
Loading

src/components/BlogCard.astro

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,26 @@
11
---
2+
import type { ImageMetadata } from "astro";
23
import { formatDate } from "../lib/formatters";
34
import { useI18n } from "../i18n/utils";
45
56
interface Props {
7+
id: string;
68
title: string;
79
excerpt: string;
810
author: string;
911
date: Date;
1012
tags: string[];
11-
slug: string;
13+
image?: ImageMetadata | undefined;
1214
}
13-
const { title, excerpt, author, date, tags, slug } = Astro.props;
15+
const { id, title, excerpt, author, date, tags, image } = Astro.props;
1416
15-
const formattedDate = formatDate(date);
1617
const { translatePath } = useI18n(Astro.url);
18+
19+
const formattedDate = formatDate(date);
1720
---
1821

19-
<a href={translatePath(`/blog/${slug}`)}>
20-
<article class="blog-card card-hover-effect">
22+
<a href={translatePath(`/blog/${id}`)}>
23+
<article class={`blog-card card-hover-effect ${image ? "has-image" : ""}`}>
2124
<div class="blog-card-content">
2225
<h3>{title}</h3>
2326
<p class="excerpt">{excerpt}</p>

src/components/CTA.astro

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,13 @@ import cloudLarge from "../assets/cloud-large.svg";
55
import cloudDarkMedium from "../assets/cloud-dark-medium.svg";
66
import { useI18n } from "../i18n/utils";
77
8-
const { t, translatePath } = useI18n(Astro.url);
9-
108
interface Props {
119
service: string;
1210
}
11+
1312
const { service } = Astro.props;
13+
14+
const { t, translatePath } = useI18n(Astro.url);
1415
---
1516

1617
<section id="container">

src/components/CustomerCard.astro

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,19 @@ import { Image } from "astro:assets";
33
import { useI18n } from "../i18n/utils";
44
55
interface Props {
6+
id: string;
67
title: string;
7-
slug: string;
88
company: string;
99
logo: ImageMetadata;
1010
quote: string;
1111
authorName: string;
1212
authorTitle: string;
13-
authorImage?: ImageMetadata;
13+
authorImage?: ImageMetadata | undefined;
1414
}
1515
1616
const {
17+
id,
1718
title,
18-
slug,
1919
company,
2020
logo,
2121
quote,
@@ -27,7 +27,7 @@ const {
2727
const { translatePath } = useI18n(Astro.url);
2828
---
2929

30-
<a href={translatePath(`/customers/${slug}`)}>
30+
<a href={translatePath(`/customers/${id}`)}>
3131
<article class="card-hover-effect">
3232
<div class="image-container">
3333
<Image src={logo} alt={company} class="company-logo" />

0 commit comments

Comments
 (0)