|
1 | 1 | --- |
2 | 2 | import Base from "@/layouts/Base.astro"; |
| 3 | +import { getMirrorConfig } from "@/lib/mirror-config"; |
| 4 | +
|
| 5 | +const mirrorConfig = getMirrorConfig(); |
3 | 6 | --- |
4 | 7 |
|
| 8 | +{mirrorConfig.enabled ? ( |
| 9 | +<Base title={`Underlay · ${mirrorConfig.nodeName}`}> |
| 10 | + <div class="max-w-5xl mx-auto px-4"> |
| 11 | + <!-- Hero --> |
| 12 | + <section class="py-12 border-b border-rule"> |
| 13 | + <div class="max-w-2xl"> |
| 14 | + <h1 class="text-2xl font-semibold tracking-tight mb-3 font-sans"> |
| 15 | + {mirrorConfig.nodeName} |
| 16 | + </h1> |
| 17 | + <p class="text-ink-muted text-sm leading-relaxed mb-2"> |
| 18 | + This is a mirror of <a href={mirrorConfig.upstream} class="underline hover:text-ink">{mirrorConfig.upstream.replace(/^https?:\/\//, '')}</a>. |
| 19 | + It maintains a verified copy of all public collections for long-term preservation and local access. |
| 20 | + </p> |
| 21 | + <p class="text-ink-muted text-sm leading-relaxed mb-6"> |
| 22 | + Every version, record, and file is content-addressed and hash-verified against the upstream source. |
| 23 | + If the primary server becomes unavailable, this mirror serves as an independent, complete archive. |
| 24 | + </p> |
| 25 | + <div class="flex gap-3"> |
| 26 | + <a |
| 27 | + href="/explore" |
| 28 | + class="inline-block bg-ink text-parchment visited:text-parchment px-4 py-2 text-sm font-medium hover:bg-ink-light transition-colors" |
| 29 | + > |
| 30 | + Explore collections |
| 31 | + </a> |
| 32 | + <a |
| 33 | + href="/schemas" |
| 34 | + class="inline-block border border-ink px-4 py-2 text-sm font-medium hover:bg-parchment-dark transition-colors visited:text-ink" |
| 35 | + > |
| 36 | + Browse schemas |
| 37 | + </a> |
| 38 | + </div> |
| 39 | + </div> |
| 40 | + </section> |
| 41 | + |
| 42 | + <!-- What this is --> |
| 43 | + <section class="py-8 border-b border-rule"> |
| 44 | + <h2 class="text-xs uppercase tracking-widest text-ink-muted mb-5 font-semibold">What is this?</h2> |
| 45 | + <div class="grid grid-cols-1 md:grid-cols-3 gap-6 text-sm"> |
| 46 | + <div> |
| 47 | + <h3 class="font-semibold mb-1 font-sans">A preservation mirror</h3> |
| 48 | + <p class="text-ink-muted"> |
| 49 | + This server replicates public collections from the canonical Underlay instance. |
| 50 | + Each copy is cryptographically verified — tamper-evident by design. |
| 51 | + </p> |
| 52 | + </div> |
| 53 | + <div> |
| 54 | + <h3 class="font-semibold mb-1 font-sans">Independent infrastructure</h3> |
| 55 | + <p class="text-ink-muted"> |
| 56 | + Running on separate hardware with its own database and storage. |
| 57 | + No single point of failure — if the upstream goes down, the data persists here. |
| 58 | + </p> |
| 59 | + </div> |
| 60 | + <div> |
| 61 | + <h3 class="font-semibold mb-1 font-sans">Open and browsable</h3> |
| 62 | + <p class="text-ink-muted"> |
| 63 | + Browse any collection, inspect any schema, view any record. |
| 64 | + The same API works here as on the primary server. |
| 65 | + </p> |
| 66 | + </div> |
| 67 | + </div> |
| 68 | + </section> |
| 69 | + |
| 70 | + <!-- Bottom --> |
| 71 | + <section class="py-8"> |
| 72 | + <div class="flex gap-8 text-sm"> |
| 73 | + <div> |
| 74 | + <h3 class="font-semibold mb-1 font-sans">Powered by Underlay</h3> |
| 75 | + <p class="text-ink-muted"> |
| 76 | + Underlay is open-source infrastructure for structured knowledge preservation. |
| 77 | + Anyone can run a mirror — same software, different server. |
| 78 | + </p> |
| 79 | + </div> |
| 80 | + <div> |
| 81 | + <h3 class="font-semibold mb-1 font-sans">Built by Knowledge Futures</h3> |
| 82 | + <p class="text-ink-muted">A 501(c)(3) nonprofit building open infrastructure for knowledge sharing.</p> |
| 83 | + </div> |
| 84 | + </div> |
| 85 | + </section> |
| 86 | + </div> |
| 87 | +</Base> |
| 88 | +) : ( |
5 | 89 | <Base title="Underlay — A public registry for structured knowledge"> |
6 | 90 | <div class="max-w-5xl mx-auto px-4"> |
7 | 91 | <!-- Hero --> |
@@ -111,3 +195,4 @@ GET /collections/:owner/:slug/export # full archive</code></pre> |
111 | 195 | </section> |
112 | 196 | </div> |
113 | 197 | </Base> |
| 198 | +)} |
0 commit comments