Skip to content

Commit 6732d66

Browse files
committed
Add live GitHub and npm web CTAs
1 parent 4f46080 commit 6732d66

6 files changed

Lines changed: 89 additions & 2 deletions

File tree

apps/frontend/.env

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
NEXT_PUBLIC_REPO_URL=
2-
NEXT_PUBLIC_PROJECT_CHANNEL=public-preview
1+
NEXT_PUBLIC_REPO_URL=https://github.com/devwebxyn/securemcp-lite
2+
NEXT_PUBLIC_NPM_URL=https://www.npmjs.com/package/securemcp-lite
3+
NEXT_PUBLIC_PROJECT_CHANNEL=public-release

apps/frontend/app/globals.css

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ pre {
149149
.header-actions {
150150
display: flex;
151151
align-items: center;
152+
gap: 0.8rem;
152153
}
153154

154155
.repo-button {
@@ -192,6 +193,19 @@ pre {
192193
cursor: not-allowed;
193194
}
194195

196+
.npm-button {
197+
background: linear-gradient(135deg, #cb3837, #7d1717);
198+
border-color: rgba(255, 205, 205, 0.22);
199+
}
200+
201+
.npm-button:hover {
202+
border-color: rgba(255, 228, 228, 0.34);
203+
}
204+
205+
.npm-button-icon {
206+
color: #ffe9e9;
207+
}
208+
195209
.hero {
196210
padding: 5.5rem 0 3rem;
197211
}
@@ -297,6 +311,18 @@ pre {
297311
color: var(--text);
298312
}
299313

314+
.button-tertiary {
315+
background: rgba(12, 20, 34, 0.08);
316+
border: 1px solid rgba(12, 20, 34, 0.1);
317+
color: var(--text);
318+
}
319+
320+
.button-npm {
321+
background: linear-gradient(135deg, #cb3837, #8f1f1f);
322+
color: white;
323+
box-shadow: 0 16px 32px rgba(203, 56, 55, 0.22);
324+
}
325+
300326
.hero-proof {
301327
display: flex;
302328
flex-wrap: wrap;
@@ -1137,6 +1163,12 @@ pre {
11371163
box-shadow: 0 16px 32px rgba(15, 141, 103, 0.2);
11381164
}
11391165

1166+
.footer-button-npm {
1167+
background: linear-gradient(135deg, #cb3837, #8f1f1f);
1168+
color: white;
1169+
box-shadow: 0 16px 32px rgba(203, 56, 55, 0.18);
1170+
}
1171+
11401172
.footer-button-secondary {
11411173
background: rgba(255, 255, 255, 0.08);
11421174
border: 1px solid rgba(255, 255, 255, 0.1);

apps/frontend/app/page.tsx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { getProjectMeta } from "../lib/project-meta";
22
import Link from "next/link";
33

4+
import { siteConfig } from "../lib/site-config";
45
import { docs } from "../lib/site";
56

67
const integrationCards = docs.filter((doc) => doc.category === "Integrations").slice(0, 6);
@@ -36,6 +37,16 @@ export default async function HomePage() {
3637
<Link className="button button-secondary" href="/docs/compatibility-matrix">
3738
Check compatibility
3839
</Link>
40+
{siteConfig.repoConfigured ? (
41+
<a className="button button-tertiary" href={siteConfig.repoUrl ?? undefined} target="_blank" rel="noreferrer">
42+
Go to Repo
43+
</a>
44+
) : null}
45+
{siteConfig.npmConfigured ? (
46+
<a className="button button-npm" href={siteConfig.npmUrl ?? undefined} target="_blank" rel="noreferrer">
47+
npm Package
48+
</a>
49+
) : null}
3950
</div>
4051

4152
<div className="hero-proof">

apps/frontend/components/footer.tsx

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { siteConfig } from "../lib/site-config";
44

55
export function Footer() {
66
const repoConfigured = siteConfig.repoConfigured;
7+
const npmConfigured = siteConfig.npmConfigured;
78

89
return (
910
<footer className="site-footer">
@@ -51,6 +52,24 @@ export function Footer() {
5152
{siteConfig.repoFallbackLabel}
5253
</span>
5354
)}
55+
{npmConfigured ? (
56+
<a
57+
href={siteConfig.npmUrl ?? undefined}
58+
className="footer-button footer-button-npm"
59+
target="_blank"
60+
rel="noreferrer"
61+
>
62+
{siteConfig.npmLabel}
63+
</a>
64+
) : (
65+
<span
66+
className="footer-button footer-button-disabled"
67+
aria-disabled="true"
68+
title="Set NEXT_PUBLIC_NPM_URL to enable this button."
69+
>
70+
{siteConfig.npmFallbackLabel}
71+
</span>
72+
)}
5473
</div>
5574
</div>
5675
</div>
@@ -78,6 +97,7 @@ export function Footer() {
7897
<div>
7998
<div className="footer-heading">External References</div>
8099
<ul className="footer-links">
100+
<li><a href={siteConfig.npmUrl ?? "https://www.npmjs.com/package/securemcp-lite"} target="_blank" rel="noreferrer">npm package page</a></li>
81101
<li><a href="https://modelcontextprotocol.io/specification/" target="_blank" rel="noreferrer">MCP specification</a></li>
82102
<li><a href="https://docs.anthropic.com/en/docs/claude-code/mcp" target="_blank" rel="noreferrer">Claude Code MCP docs</a></li>
83103
<li><a href="https://developers.openai.com/learn/docs-mcp" target="_blank" rel="noreferrer">OpenAI MCP docs</a></li>

apps/frontend/components/header.tsx

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { Logo } from "./logo";
55

66
export function Header() {
77
const repoConfigured = siteConfig.repoConfigured;
8+
const npmConfigured = siteConfig.npmConfigured;
89

910
return (
1011
<header className="site-header">
@@ -42,6 +43,23 @@ export function Header() {
4243
<span className="repo-button-icon" aria-hidden="true"></span>
4344
</span>
4445
)}
46+
47+
{npmConfigured ? (
48+
<a
49+
className="repo-button npm-button"
50+
href={siteConfig.npmUrl ?? undefined}
51+
target="_blank"
52+
rel="noreferrer"
53+
>
54+
<span>{siteConfig.npmLabel}</span>
55+
<span className="repo-button-icon npm-button-icon" aria-hidden="true">N</span>
56+
</a>
57+
) : (
58+
<span className="repo-button repo-button-disabled npm-button" aria-disabled="true" title="Set NEXT_PUBLIC_NPM_URL to enable this button.">
59+
<span>{siteConfig.npmLabel}</span>
60+
<span className="repo-button-icon npm-button-icon" aria-hidden="true">N</span>
61+
</span>
62+
)}
4563
</div>
4664
</div>
4765
</header>

apps/frontend/lib/site-config.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
const configuredRepoUrl = process.env.NEXT_PUBLIC_REPO_URL?.trim() || null;
2+
const configuredNpmUrl = process.env.NEXT_PUBLIC_NPM_URL?.trim() || null;
23

34
export const siteConfig = {
45
repoUrl: configuredRepoUrl,
56
repoConfigured: Boolean(configuredRepoUrl),
67
repoLabel: "Go to Repo",
78
repoFallbackLabel: "Repo URL pending",
9+
npmUrl: configuredNpmUrl,
10+
npmConfigured: Boolean(configuredNpmUrl),
11+
npmLabel: "View on npm",
12+
npmFallbackLabel: "npm URL pending",
813
};

0 commit comments

Comments
 (0)