Skip to content

Commit 3726d23

Browse files
committed
feat: relayfile-landing-page
1 parent 56ae35e commit 3726d23

File tree

9 files changed

+258
-147
lines changed

9 files changed

+258
-147
lines changed

site/public/diagram-agents.svg

Lines changed: 37 additions & 34 deletions
Loading
Lines changed: 31 additions & 29 deletions
Loading

site/public/diagram-sync.svg

Lines changed: 48 additions & 42 deletions
Loading

site/src/components/ApiPreview.astro

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,18 @@ interface Props {
1111
1212
const { snippets } = Astro.props;
1313
14+
const escapeHtml = (code: string) =>
15+
code.replaceAll("&", "&amp;").replaceAll("<", "&lt;").replaceAll(">", "&gt;");
16+
1417
const highlightBash = (code: string) =>
15-
code
18+
escapeHtml(code)
1619
.replaceAll(/(curl|jq|TOKEN|relayfile)/g, '<span class="text-cyan-300">$1</span>')
1720
.replaceAll(/(-X|-H|-d|-s)/g, '<span class="text-blue-300">$1</span>')
1821
.replaceAll(/("https:[^"]+")/g, '<span class="text-emerald-300">$1</span>')
1922
.replaceAll(/("[^"]*")/g, '<span class="text-emerald-300">$1</span>');
2023
2124
const highlightJson = (code: string) =>
22-
code
25+
escapeHtml(code)
2326
.replaceAll(/"([^"]+)"(?=\s*:)/g, '<span class="text-cyan-300">"$1"</span>')
2427
.replaceAll(/:\s*"([^"]*)"/g, ': <span class="text-emerald-300">"$1"</span>')
2528
.replaceAll(/:\s*(\d+)/g, ': <span class="text-blue-300">$1</span>');

site/src/components/Architecture.astro

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,25 @@
11
---
22
interface Props {
3+
overview: string[];
34
steps: string[];
45
properties: string[];
56
stack: string[];
67
}
78
8-
const { steps, properties, stack } = Astro.props;
9+
const { overview, steps, properties, stack } = Astro.props;
910
---
1011

1112
<section class="grid gap-8 lg:grid-cols-[1fr_1.05fr]">
1213
<div class="section-shell p-8 sm:p-10">
1314
<p class="section-heading">How It Works</p>
1415
<h2 class="section-title">One workspace, one canonical state</h2>
16+
<div class="content-prose mt-6">
17+
{
18+
overview.map((paragraph) => (
19+
<p>{paragraph}</p>
20+
))
21+
}
22+
</div>
1523
<div class="mt-8 rounded-3xl border border-cyan-400/20 bg-zinc-950/80 p-6">
1624
<div class="grid gap-4 text-center text-sm text-zinc-300 sm:grid-cols-3">
1725
<div class="rounded-2xl border border-zinc-800 bg-zinc-900/80 p-4">Developer laptop<br /><span class="text-cyan-400">relayfile mount</span></div>

0 commit comments

Comments
 (0)