Skip to content

Commit 3a562bd

Browse files
committed
Merge commit '5e199d4efb6f39a7e45fa2a54d9497569c8343d4'
2 parents 8d2bf22 + 5e199d4 commit 3a562bd

File tree

6 files changed

+26
-3
lines changed

6 files changed

+26
-3
lines changed

src/assets/images/twits/silvenon.jpg

7.47 KB
Loading
13.3 KB
Binary file not shown.
5.43 KB
Loading
6.9 KB
Loading

src/components/LandingPage/Twits/Comments.ts

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,18 @@ import chribjel from "@/assets/images/twits/chribjel.jpg";
1818
import chribjelTwit from "@/assets/images/twits/chribjelTwit.png";
1919
import hisbvdis from "@/assets/images/twits/hisbvdis.jpg";
2020
import aokijs from "@/assets/images/twits/aokijs.jpg";
21+
import silvenon from "@/assets/images/twits/silvenon.jpg";
22+
import silvenonTwit from "@/assets/images/twits/silvenonTwit.webp";
23+
import spacesexdragon from "@/assets/images/twits/spacesexdragon.jpg";
24+
import spacesexdragonTwit from "@/assets/images/twits/spacesexdragonTwit.jpg";
2125

2226
// Twit images
2327

2428
export interface IComment {
2529
avatar: ImportMeta;
2630
name: string;
2731
login: string;
28-
text: string;
32+
text?: string;
2933
href?: string;
3034
twitImage?: ImportMetaEnv;
3135
}
@@ -154,6 +158,21 @@ const Comments: IComment[] = [
154158
text: `Honestly, fuck the benchmarks. I don‘t care which one‘s faster. All I can say is that Drizzle made my life working with databases dramastically better and that‘s all that matters for me. Thanks for your hard work 🙏🏻`,
155159
href: "https://x.com/aokijs/status/1833840766839325109",
156160
},
161+
{
162+
avatar: silvenon,
163+
name: "Matija Marohnić",
164+
login: "silvenon",
165+
text: `Every time I hear about @DrizzleORM.`,
166+
href: "https://x.com/silvenon/status/1843003214402314695",
167+
twitImage: silvenonTwit,
168+
},
169+
{
170+
avatar: spacesexdragon,
171+
name: "Joseph Mama 🐀",
172+
login: "spacesexdragon",
173+
href: "https://x.com/spacesexdragon/status/1843381135134675236",
174+
twitImage: spacesexdragonTwit,
175+
},
157176
];
158177

159178
export { Comments };

src/components/LandingPage/Twits/Twit.astro

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ interface Props {
99
const { twit } = Astro.props;
1010
1111
const { text } = twit;
12-
const formattedText = text.replaceAll(/@\w+/gi, "<span class='mention'>$&</span>");
12+
const formattedText = text ? text.replaceAll(/@\w+/gi, "<span class='mention'>$&</span>") : null;
1313
---
1414

1515
<div class="wrap">
@@ -23,7 +23,9 @@ const formattedText = text.replaceAll(/@\w+/gi, "<span class='mention'>$&</span>
2323
</div>
2424
</div>
2525
<div class="content">
26-
<div class="twit_content_text"><Fragment set:html={formattedText} /></div>
26+
{formattedText && (
27+
<div class="twit_content_text"><Fragment set:html={formattedText} /></div>
28+
)}
2729
{
2830
twit.twitImage && (
2931
<Image class="content_image" width={560} src={twit.twitImage} alt={twit.name} />
@@ -105,6 +107,8 @@ const formattedText = text.replaceAll(/@\w+/gi, "<span class='mention'>$&</span>
105107
.content_image {
106108
border-radius: 8px;
107109
border: 1px solid rgb(207, 217, 222);
110+
max-height: 180px;
111+
object-fit: cover;
108112
}
109113

110114
@media (max-width: 599px) {

0 commit comments

Comments
 (0)