Skip to content

Commit 4e1ead9

Browse files
authored
Merge pull request #70 from AnthonyFinney/feat/link_feat_to_doc
nice!!
2 parents 951a1ef + 3cb402a commit 4e1ead9

File tree

2 files changed

+44
-16
lines changed

2 files changed

+44
-16
lines changed

components/FeatureCard.tsx

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,26 @@
11
import React from 'react';
2-
import { LucideIcon } from 'lucide-react';
2+
import { LucideIcon, ExternalLink } from 'lucide-react';
3+
import Link from 'next/link';
34

45
interface FeatureCardProps {
56
icon: LucideIcon;
67
title: string;
78
description: string;
89
className?: string;
10+
link?: string;
911
}
1012

11-
const FeatureCard: React.FC<FeatureCardProps> = ({
12-
icon: Icon,
13-
title,
14-
description,
15-
className = ''
13+
const DEFAULT_DOCS_URL = 'https://opsimate.vercel.app/docs/';
14+
15+
const FeatureCard: React.FC<FeatureCardProps> = ({
16+
icon: Icon,
17+
title,
18+
description,
19+
className = '',
20+
link,
1621
}) => {
22+
const resolvedLink = link ?? DEFAULT_DOCS_URL;
23+
1724
return (
1825
<div className={`feature-card group hover:scale-105 transition-all duration-300 ${className}`}>
1926
<div className="flex items-center mb-3">
@@ -23,6 +30,20 @@ const FeatureCard: React.FC<FeatureCardProps> = ({
2330
</div>
2431
<h3 className="text-lg font-semibold text-surface-900 dark:text-surface-100 mb-2">{title}</h3>
2532
<p className="text-sm text-surface-600 dark:text-surface-400 leading-relaxed">{description}</p>
33+
34+
{resolvedLink && (
35+
<Link
36+
href={resolvedLink}
37+
className="mt-3 inline-flex items-center gap-1 text-blue-600 hover:text-blue-700 text-sm font-medium transition-colors duration-200"
38+
{...(resolvedLink.startsWith('https') && {
39+
target: "_blank",
40+
rel: "noopener noreferrer"
41+
})}
42+
>
43+
Learn more
44+
{resolvedLink.startsWith('https') && <ExternalLink className="h-3 w-3" />}
45+
</Link>
46+
)}
2647
</div>
2748
);
2849
};

components/FeaturesSection.tsx

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,42 +15,50 @@ const FeaturesSection: React.FC = () => {
1515
{
1616
icon: Monitor,
1717
title: 'Unified Monitoring',
18-
description: 'Monitor your entire infrastructure from a single dashboard with real-time metrics and health status.'
18+
description: 'Monitor your entire infrastructure from a single dashboard with real-time metrics and health status.',
19+
link: 'https://opsimate.vercel.app/docs/core-features',
1920
},
2021
{
2122
icon: Server,
2223
title: 'Infrastructure Management',
23-
description: 'Manage VMs and Kubernetes clusters seamlessly via SSH without agent installation.'
24+
description: 'Manage VMs and Kubernetes clusters seamlessly via SSH without agent installation.',
25+
link: 'https://opsimate.vercel.app/docs/providers-services/overview',
2426
},
2527
{
2628
icon: Activity,
2729
title: 'Real-time Metrics',
28-
description: 'Track system performance with instant visibility into CPU, memory, disk, and network usage.'
30+
description: 'Track system performance with instant visibility into CPU, memory, disk, and network usage.',
31+
link: 'https://opsimate.vercel.app/docs/dashboards/overview',
2932
},
3033
{
3134
icon: Bell,
3235
title: 'Smart Alerts',
33-
description: 'Get intelligent notifications before issues impact users with custom thresholds.'
36+
description: 'Get intelligent notifications before issues impact users with custom thresholds.',
37+
link: 'https://opsimate.vercel.app/docs/alerts/adding-alerts',
3438
},
3539
{
3640
icon: Database,
3741
title: 'Log Aggregation',
38-
description: 'Centralize logs from all services with powerful search and pattern analysis.'
42+
description: 'Centralize logs from all services with powerful search and pattern analysis.',
43+
link: 'https://opsimate.vercel.app/docs/integrations/overview',
3944
},
4045
{
4146
icon: GitBranch,
4247
title: 'Service Discovery',
43-
description: 'Auto-discover systemd services and containers without manual configuration.'
48+
description: 'Auto-discover systemd services and containers without manual configuration.',
49+
link: 'https://opsimate.vercel.app/docs/providers-services/services/add-services',
4450
},
4551
{
4652
icon: Settings,
4753
title: 'Automated Actions',
48-
description: 'Create automated responses with workflows that restart services and scale resources.'
54+
description: 'Create automated responses with workflows that restart services and scale resources.',
55+
link: 'https://opsimate.vercel.app/docs/dashboards/service-menu',
4956
},
5057
{
5158
icon: GitBranch,
5259
title: 'Open Source',
53-
description: 'Fully open source with transparent development. Contribute and customize freely.'
60+
description: 'Fully open source with transparent development. Contribute and customize freely.',
61+
link: 'https://opsimate.vercel.app/docs/development',
5462
}
5563
];
5664

@@ -77,11 +85,10 @@ const FeaturesSection: React.FC = () => {
7785
icon={feature.icon}
7886
title={feature.title}
7987
description={feature.description}
88+
link={feature.link}
8089
/>
8190
))}
8291
</div>
83-
84-
8592
</div>
8693
</section>
8794
);

0 commit comments

Comments
 (0)