~ knotless Search/
↑↓ move↵ open⇧↵ all results
0
0
259 lines · 6.6 KB Raw History
---
// The site's landing page, as plain as ghostty.org's: the photograph,
// filling the first screen, then a headline, one sentence saying what
// Monolith is, and two buttons. Everything else is in the docs. The
// sentence claims nothing a reader would have to take on trust; a claim
// against the reference goes here once it is settled
// (.claude/skills/landing).
import { Picture } from 'astro:assets'
import '../monolith.css'
import { BASE, FONTS, REPO, url } from '../../content.mjs'
import hero from '../assets/hero.jpg'

const title = 'Monolith: an atproto PDS in Rust'
const sentence = 'Monolith is an atproto PDS written in Rust.'
const description = sentence
const alt = 'A black monolith on a hilltop, backlit by a hazy glow'

// The card a link to the site unfurls into, drawn by pages/og.jpg.ts.
// Crawlers want absolute URLs, so both are made against the configured site.
const ogImage = new URL(`${BASE}/og.jpg`, Astro.site).href
const ogAlt = `${alt}, above the words MONOLITH, an atproto PDS`
const pageUrl = new URL(url(''), Astro.site).href
---

<!doctype html>
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <meta name="color-scheme" content="dark" />
    {FONTS.map((href) => <link rel="preload" href={href} as="font" type="font/woff2" crossorigin />)}
    <title>{title}</title>
    <meta name="description" content={description} />
    <link rel="canonical" href={pageUrl} />
    <meta property="og:type" content="website" />
    <meta property="og:site_name" content="Monolith PDS" />
    <meta property="og:url" content={pageUrl} />
    <meta property="og:title" content={title} />
    <meta property="og:description" content={description} />
    <meta property="og:image" content={ogImage} />
    <meta property="og:image:width" content="1200" />
    <meta property="og:image:height" content="630" />
    <meta property="og:image:alt" content={ogAlt} />
    <meta name="twitter:card" content="summary_large_image" />
  </head>
  <body>
    <header class="hero">
      <Picture
        src={hero}
        formats={['avif', 'webp']}
        widths={[960, 1600, 2400]}
        sizes="100vw"
        alt={alt}
        class="hero-image"
        loading="eager"
        fetchpriority="high"
      />
      <nav class="nav">
        <span class="wordmark">MONOLITH PDS</span>
        <div class="nav-links">
          <a href={url('overview')}>Docs</a>
          <a href={url('guide/getting-started')}>Get started</a>
          <a href={REPO}>Source</a>
        </div>
      </nav>
      <div class="logo">
        <p class="logo-name">MONOLITH</p>
        <p class="logo-tag">an atproto PDS</p>
      </div>
    </header>

    <main>
      <h1>A new dawn for your Atmosphere account.</h1>
      <p class="sentence">{sentence}</p>
      <div class="actions">
        <a class="button" href={url('guide/getting-started')}>START A SERVER</a>
        <a class="button secondary" href={url('overview')}>READ THE DOCS</a>
      </div>
    </main>

    <footer>
      <div class="footer">
        <span>MONOLITH · an atproto PDS</span>
        <span>chadtmiller.com</span>
      </div>
    </footer>
  </body>
</html>

<style>
  :global(*) {
    box-sizing: border-box;
  }
  :global(body) {
    margin: 0;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    background: var(--m-bg);
    color: var(--m-fg);
    font-family: var(--m-sans);
  }
  a {
    color: var(--m-fg);
  }
  a:hover {
    color: var(--m-bright);
  }
  .nav,
  .logo,
  .button,
  .footer {
    font-family: var(--m-mono);
  }

  /* The photograph fills the first screen; the words are a scroll below.
     A screen wider than the photograph's 16:10 crops mostly the dark sky
     above the monolith and a sliver of its ground, so even at 21:9 both
     the monolith's top and the ground stay; a narrower one crops the
     sides. */
  .hero {
    position: relative;
    height: 100svh;
    min-height: 480px;
    overflow: hidden;
  }
  .hero :global(.hero-image) {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 85%;
  }
  .nav {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
    padding: 28px 24px;
    font-size: 14px;
    letter-spacing: 0.08em;
  }
  .wordmark {
    color: var(--m-mute);
  }
  .nav-links {
    display: flex;
    gap: 24px;
  }
  .nav-links a {
    text-decoration: none;
    padding: 12px 0;
  }
  /* On the ground, below the monolith's base at any width: pinned to the
     hero's foot, not to a height of the photograph, which moves as it is
     cropped. */
  .logo {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5em;
    padding: 0 24px;
    font-size: clamp(14px, 1.6vw, 20px);
    line-height: 1;
    color: #a8a8a2;
    text-align: center;
  }
  .logo p {
    margin: 0;
  }
  /* Spaced out, and as far in on the left as the last letter's spacing
     reaches past it on the right, so the word sits centred. */
  .logo-name {
    letter-spacing: 0.5em;
    padding-left: 0.5em;
  }

  main {
    flex: 1;
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
    padding: 56px 24px 72px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    text-align: center;
  }
  h1 {
    margin: 0;
    font-size: clamp(30px, 4vw, 48px);
    font-weight: 500;
    line-height: 1.1;
    letter-spacing: -0.02em;
  }
  .sentence {
    margin: 0;
    font-size: clamp(17px, 1.6vw, 20px);
    line-height: 1.6;
    color: var(--m-mute);
  }
  .actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    margin-top: 12px;
  }
  .button {
    display: inline-flex;
    align-items: center;
    min-height: 48px;
    padding: 0 28px;
    background: var(--m-fg);
    color: var(--m-bg);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.08em;
  }
  .button:hover {
    background: var(--m-bright);
    color: var(--m-bg);
  }
  .button.secondary {
    background: none;
    color: var(--m-fg);
    border: 1px solid var(--m-line);
  }
  .button.secondary:hover {
    border-color: var(--m-faint);
    color: var(--m-bright);
  }

  footer {
    border-top: 1px solid var(--m-line);
  }
  .footer {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 13px;
    color: var(--m-faint);
  }
</style>