Skip to content

Commit 014d0b4

Browse files
authored
Update Index.tsx
1 parent 494e0f1 commit 014d0b4

1 file changed

Lines changed: 30 additions & 2 deletions

File tree

src/pages/Index.tsx

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,34 @@ const Index = () => {
4141
"Camping and hiking in Honduras countryside"
4242
];
4343

44+
// Function to render text with hyperlinks
45+
const renderDescriptionWithLinks = (description: string) => {
46+
// Split by <br /> tags first
47+
const parts = description.split('<br />');
48+
49+
return parts.map((part, index) => (
50+
<span key={index}>
51+
{part.split(/(https?:\/\/[^\s]+)/g).map((segment, segIndex) => {
52+
if (segment.match(/https?:\/\/[^\s]+/)) {
53+
return (
54+
<a
55+
key={segIndex}
56+
href={segment}
57+
target="_blank"
58+
rel="noopener noreferrer"
59+
className="text-yellow-400 hover:text-yellow-300 underline transition-colors"
60+
>
61+
{segment}
62+
</a>
63+
);
64+
}
65+
return segment;
66+
})}
67+
{index < parts.length - 1 && <br />}
68+
</span>
69+
));
70+
};
71+
4472
return (
4573
<div className="min-h-screen bg-gradient-to-br from-slate-900 via-blue-900 to-slate-800">
4674
{/* Hero Section */}
@@ -110,8 +138,8 @@ const Index = () => {
110138
building robust, scalable systems using cutting-edge cloud native technologies.
111139
</p>
112140
<p className="text-lg text-blue-100 leading-relaxed">
113-
As a contributor to the CNCF project <span className="text-yellow-400 font-semibold">Meshery</span> and
114-
an advocate for <span className="text-orange-400 font-semibold">Layer5</span> projects like Kanvas,
141+
As a contributor to the CNCF project <span className="text-yellow-400 font-semibold"><a href="https://meshery.io">Meshery</a>,</span> and
142+
an advocate for <span className="text-orange-400 font-semibold"><a href="https://layer5.io">Layer5</a></span> projects like <a href="https://docs.kanvas.new">Kanvas</a>,
115143
I'm deeply involved in the cloud native ecosystem.
116144
</p>
117145
<p className="text-lg text-blue-200 max-w-2xl mx-auto leading-relaxed">But life’s not all code and containers.</p>

0 commit comments

Comments
 (0)