Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions website/src/components/Button.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
interface Props {
href: string
variant?: 'primary' | 'secondary' | 'ghost'
size?: 'sm' | 'md' | 'lg'
external?: boolean
class?: string
}

const {
href,
variant = 'primary',
size = 'md',
external = false,
class: className = ''
} = Astro.props

const baseClasses = 'inline-flex items-center justify-center font-medium transition-all duration-200 rounded-lg'

const variantClasses = {
primary: 'bg-brand hover:bg-brand-light text-white shadow-lg shadow-brand/25 hover:shadow-brand/40',
secondary: 'bg-bg-card border border-border hover:border-border-light text-white hover:bg-bg-hover',
ghost: 'text-text-secondary hover:text-white hover:bg-bg-hover'
}

const sizeClasses = {
sm: 'px-4 py-2 text-sm gap-2',
md: 'px-6 py-3 text-sm gap-2',
lg: 'px-8 py-4 text-base gap-3'
}

const classes = `${baseClasses} ${variantClasses[variant]} ${sizeClasses[size]} ${className}`
---

<a
href={href}
class={classes}
target={external ? '_blank' : undefined}
rel={external ? 'noopener noreferrer' : undefined}
>
<slot />
</a>
22 changes: 22 additions & 0 deletions website/src/components/Diagram.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
interface Props {
title?: string
class?: string
}

const {
title,
class: className = ''
} = Astro.props
---

<div class={`bg-bg-card border border-border rounded-lg overflow-hidden ${className}`}>
{title && (
<div class="px-4 py-2 border-b border-border bg-bg-elevated">
<span class="text-xs font-medium text-text-secondary">{title}</span>
</div>
)}
<div class="p-4 sm:p-6 overflow-x-auto">
<pre class="diagram text-text-secondary"><slot /></pre>
</div>
</div>
25 changes: 25 additions & 0 deletions website/src/components/FeatureCard.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
interface Props {
title: string
icon?: string
class?: string
}

const {
title,
icon,
class: className = ''
} = Astro.props
---

<div class={`group bg-bg-card border border-border rounded-xl p-6 hover:border-brand-muted transition-colors ${className}`}>
{icon && (
<div class="w-10 h-10 rounded-lg bg-brand-subtle flex items-center justify-center mb-4 group-hover:bg-brand-muted transition-colors">
<span class="text-xl">{icon}</span>
</div>
)}
<h3 class="text-white font-semibold mb-2">{title}</h3>
<p class="text-text-secondary text-sm leading-relaxed">
<slot />
</p>
</div>
17 changes: 17 additions & 0 deletions website/src/components/Footer.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
// Footer component
---

<footer class="border-t border-border mt-32">
<div class="max-w-7xl mx-auto px-6 py-12 flex flex-col sm:flex-row items-center justify-between gap-4">
<div class="text-text-muted text-sm">
ASH Protocol &mdash; No analytics. No tracking. Open source.
</div>
<div class="flex items-center gap-6">
<a href="/whitepaper" class="text-text-muted hover:text-white transition-colors text-sm">Whitepaper</a>
<a href="/security" class="text-text-muted hover:text-white transition-colors text-sm">Security</a>
<a href="/ethics" class="text-text-muted hover:text-white transition-colors text-sm">Ethics</a>
<a href="https://github.com/monadial/ash" class="text-text-muted hover:text-white transition-colors text-sm" target="_blank" rel="noopener">GitHub</a>
</div>
</div>
</footer>
32 changes: 32 additions & 0 deletions website/src/components/Header.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
// Header component with navigation
---

<header class="fixed top-0 left-0 right-0 z-50 bg-black/80 backdrop-blur-xl border-b border-border">
<div class="max-w-7xl mx-auto px-6 h-16 flex items-center justify-between">
<a href="/" class="text-xl font-bold text-white hover:text-white">ASH</a>
<nav class="flex items-center gap-6 sm:gap-8">
<a href="/whitepaper" class="text-text-secondary hover:text-white transition-colors text-sm font-medium">
Whitepaper
</a>
<a href="/security" class="text-text-secondary hover:text-white transition-colors text-sm font-medium">
Security
</a>
<a href="/ethics" class="text-text-secondary hover:text-white transition-colors text-sm font-medium">
Ethics
</a>
<a
href="https://github.com/monadial/ash"
class="flex items-center gap-2 text-text-secondary hover:text-white transition-colors"
target="_blank"
rel="noopener"
aria-label="GitHub"
>
<svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor">
<path d="M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"/>
</svg>
<span class="hidden sm:inline text-sm font-medium">GitHub</span>
</a>
</nav>
</div>
</header>
22 changes: 22 additions & 0 deletions website/src/components/InfoBox.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
interface Props {
variant?: 'default' | 'warning' | 'success' | 'danger'
class?: string
}

const {
variant = 'default',
class: className = ''
} = Astro.props

const variantClasses = {
default: 'border-brand-muted bg-brand-subtle text-text',
warning: 'border-warning/30 bg-warning/10 text-warning',
success: 'border-success/30 bg-success/10 text-success',
danger: 'border-danger/30 bg-danger/10 text-danger'
}
---

<div class={`border rounded-lg p-4 ${variantClasses[variant]} ${className}`}>
<slot />
</div>
35 changes: 35 additions & 0 deletions website/src/components/PhoneMockup.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
interface Props {
label?: string
class?: string
}

const {
label,
class: className = ''
} = Astro.props
---

<div class={`relative ${className}`}>
<!-- Phone frame -->
<div class="relative mx-auto w-[280px] h-[580px] bg-bg-card rounded-[3rem] border-4 border-border-light shadow-2xl shadow-black/50">
<!-- Dynamic Island -->
<div class="absolute top-4 left-1/2 -translate-x-1/2 w-28 h-8 bg-black rounded-full"></div>

<!-- Screen content -->
<div class="absolute inset-6 top-16 bottom-6 rounded-[2rem] bg-bg-elevated overflow-hidden flex items-center justify-center">
<div class="text-center p-6">
<div class="w-16 h-16 mx-auto mb-4 rounded-2xl bg-brand-subtle flex items-center justify-center">
<svg class="w-8 h-8 text-brand" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.5">
<path stroke-linecap="round" stroke-linejoin="round" d="M2.25 15.75l5.159-5.159a2.25 2.25 0 013.182 0l5.159 5.159m-1.5-1.5l1.409-1.409a2.25 2.25 0 013.182 0l2.909 2.909M3.75 19.5h16.5a1.5 1.5 0 001.5-1.5V6a1.5 1.5 0 00-1.5-1.5H3.75A1.5 1.5 0 002.25 6v12a1.5 1.5 0 001.5 1.5z" />
</svg>
</div>
<p class="text-text-muted text-sm">Screenshot placeholder</p>
{label && <p class="text-text-secondary text-xs mt-2">{label}</p>}
</div>
</div>

<!-- Home indicator -->
<div class="absolute bottom-2 left-1/2 -translate-x-1/2 w-32 h-1 bg-white/20 rounded-full"></div>
</div>
</div>
23 changes: 23 additions & 0 deletions website/src/components/Section.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
interface Props {
id?: string
class?: string
container?: boolean
}

const {
id,
class: className = '',
container = true
} = Astro.props
---

<section id={id} class={`py-16 sm:py-24 ${className}`}>
{container ? (
<div class="max-w-7xl mx-auto px-6">
<slot />
</div>
) : (
<slot />
)}
</section>
43 changes: 43 additions & 0 deletions website/src/components/TableOfContents.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
interface TocItem {
id: string
title: string
children?: TocItem[]
}

interface Props {
items: TocItem[]
}

const { items } = Astro.props
---

<nav class="lg:sticky lg:top-24 lg:max-h-[calc(100vh-8rem)] lg:overflow-y-auto">
<h2 class="text-xs font-semibold uppercase tracking-wider text-text-muted mb-4">Contents</h2>
<ul class="space-y-2 text-sm">
{items.map(item => (
<li>
<a
href={`#${item.id}`}
class="block text-text-secondary hover:text-white transition-colors py-1"
>
{item.title}
</a>
{item.children && (
<ul class="ml-4 mt-1 space-y-1 border-l border-border pl-4">
{item.children.map(child => (
<li>
<a
href={`#${child.id}`}
class="block text-text-muted hover:text-text-secondary transition-colors py-0.5 text-xs"
>
{child.title}
</a>
</li>
))}
</ul>
)}
</li>
))}
</ul>
</nav>
32 changes: 10 additions & 22 deletions website/src/layouts/Layout.astro
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
---
import '../styles/global.css'
import Header from '../components/Header.astro'
import Footer from '../components/Footer.astro'

interface Props {
title: string
description?: string
showNav?: boolean
fullWidth?: boolean
}

const {
title,
description = 'A One-Time Pad messaging protocol for information-theoretic security.',
showNav = true
description = 'Secure ephemeral messaging with information-theoretic security.',
fullWidth = false
} = Astro.props
---

Expand All @@ -24,29 +26,15 @@ const {
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet" />
<title>{title} | ASH Protocol</title>
<title>{title} | ASH</title>
</head>
<body>
{showNav && (
<header class="paper-header">
<nav class="paper-nav">
<a href="/">ASH</a>
<div class="flex gap-6">
<a href="/docs">Docs</a>
<a href="/security">Security</a>
<a href="/ethics">Ethics</a>
</div>
</nav>
</header>
)}
<body class="min-h-screen">
<Header />

<main class="paper">
<main class={`pt-16 ${fullWidth ? '' : 'max-w-4xl mx-auto px-6'}`}>
<slot />
</main>

<footer class="paper-footer">
<p>ASH Protocol</p>
<p class="mt-1">No analytics. No tracking. Open source.</p>
</footer>
<Footer />
</body>
</html>
Loading
Loading