From 41922fbc5bb88f53f123af7beffea35b3afcdc02 Mon Sep 17 00:00:00 2001 From: Tomas Mihalicka Date: Sun, 11 Jan 2026 23:29:42 +0100 Subject: [PATCH] feature(website): website rework --- website/src/components/Button.astro | 42 + website/src/components/Diagram.astro | 22 + website/src/components/FeatureCard.astro | 25 + website/src/components/Footer.astro | 17 + website/src/components/Header.astro | 32 + website/src/components/InfoBox.astro | 22 + website/src/components/PhoneMockup.astro | 35 + website/src/components/Section.astro | 23 + website/src/components/TableOfContents.astro | 43 + website/src/layouts/Layout.astro | 32 +- website/src/pages/docs.astro | 1204 ------------------ website/src/pages/ethics.astro | 503 +++++--- website/src/pages/index.astro | 1093 +++++++++------- website/src/pages/security.astro | 615 +++++---- website/src/pages/whitepaper.astro | 626 +++++++++ website/src/styles/global.css | 457 ++----- 16 files changed, 2245 insertions(+), 2546 deletions(-) create mode 100644 website/src/components/Button.astro create mode 100644 website/src/components/Diagram.astro create mode 100644 website/src/components/FeatureCard.astro create mode 100644 website/src/components/Footer.astro create mode 100644 website/src/components/Header.astro create mode 100644 website/src/components/InfoBox.astro create mode 100644 website/src/components/PhoneMockup.astro create mode 100644 website/src/components/Section.astro create mode 100644 website/src/components/TableOfContents.astro delete mode 100644 website/src/pages/docs.astro create mode 100644 website/src/pages/whitepaper.astro diff --git a/website/src/components/Button.astro b/website/src/components/Button.astro new file mode 100644 index 0000000..30883f7 --- /dev/null +++ b/website/src/components/Button.astro @@ -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}` +--- + + + + diff --git a/website/src/components/Diagram.astro b/website/src/components/Diagram.astro new file mode 100644 index 0000000..f4f2640 --- /dev/null +++ b/website/src/components/Diagram.astro @@ -0,0 +1,22 @@ +--- +interface Props { + title?: string + class?: string +} + +const { + title, + class: className = '' +} = Astro.props +--- + +
+ {title && ( +
+ {title} +
+ )} +
+
+
+
diff --git a/website/src/components/FeatureCard.astro b/website/src/components/FeatureCard.astro new file mode 100644 index 0000000..70ffaf9 --- /dev/null +++ b/website/src/components/FeatureCard.astro @@ -0,0 +1,25 @@ +--- +interface Props { + title: string + icon?: string + class?: string +} + +const { + title, + icon, + class: className = '' +} = Astro.props +--- + +
+ {icon && ( +
+ {icon} +
+ )} +

{title}

+

+ +

+
diff --git a/website/src/components/Footer.astro b/website/src/components/Footer.astro new file mode 100644 index 0000000..42e83e9 --- /dev/null +++ b/website/src/components/Footer.astro @@ -0,0 +1,17 @@ +--- +// Footer component +--- + + diff --git a/website/src/components/Header.astro b/website/src/components/Header.astro new file mode 100644 index 0000000..4ef328b --- /dev/null +++ b/website/src/components/Header.astro @@ -0,0 +1,32 @@ +--- +// Header component with navigation +--- + +
+ +
diff --git a/website/src/components/InfoBox.astro b/website/src/components/InfoBox.astro new file mode 100644 index 0000000..11b7905 --- /dev/null +++ b/website/src/components/InfoBox.astro @@ -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' +} +--- + +
+ +
diff --git a/website/src/components/PhoneMockup.astro b/website/src/components/PhoneMockup.astro new file mode 100644 index 0000000..36dd16a --- /dev/null +++ b/website/src/components/PhoneMockup.astro @@ -0,0 +1,35 @@ +--- +interface Props { + label?: string + class?: string +} + +const { + label, + class: className = '' +} = Astro.props +--- + +
+ +
+ +
+ + +
+
+
+ + + +
+

Screenshot placeholder

+ {label &&

{label}

} +
+
+ + +
+
+
diff --git a/website/src/components/Section.astro b/website/src/components/Section.astro new file mode 100644 index 0000000..6b7ac08 --- /dev/null +++ b/website/src/components/Section.astro @@ -0,0 +1,23 @@ +--- +interface Props { + id?: string + class?: string + container?: boolean +} + +const { + id, + class: className = '', + container = true +} = Astro.props +--- + +
+ {container ? ( +
+ +
+ ) : ( + + )} +
diff --git a/website/src/components/TableOfContents.astro b/website/src/components/TableOfContents.astro new file mode 100644 index 0000000..1c76cb8 --- /dev/null +++ b/website/src/components/TableOfContents.astro @@ -0,0 +1,43 @@ +--- +interface TocItem { + id: string + title: string + children?: TocItem[] +} + +interface Props { + items: TocItem[] +} + +const { items } = Astro.props +--- + + diff --git a/website/src/layouts/Layout.astro b/website/src/layouts/Layout.astro index 29692d8..eb83bd2 100644 --- a/website/src/layouts/Layout.astro +++ b/website/src/layouts/Layout.astro @@ -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 --- @@ -24,29 +26,15 @@ const { - {title} | ASH Protocol + {title} | ASH - - {showNav && ( -
- -
- )} + +
-
+
-
-

ASH Protocol

-

No analytics. No tracking. Open source.

-
+