An article page: a header and wide photo, then the body beside a newsletter card (from lg).

Last updated

Open block
Show code
---
/**
 * Large image 03: An article page: a header and wide photo, then the body beside a newsletter card (from lg).
 *
 * @block content
 * @order 3
 */
import Section from '@/components/apogee/Section/Section.astro'
import PostHeader from '@/components/apogee/sections/PostHeader/PostHeader.astro'
import Prose from '@/components/apogee/Prose/Prose.astro'
import Image from '@/components/apogee/Image/Image.astro'
import Avatar from '@/components/apogee/Avatar/Avatar.astro'
import ShareLinks from '@/components/apogee/ShareLinks/ShareLinks.astro'
import Card from '@/components/apogee/Card/Card.astro'
import Input from '@/components/apogee/Input/Input.astro'
import Button from '@/components/apogee/Button/Button.astro'
import { plain } from '@/components/apogee/sections/_shared/spine.ts'
import type { ContentContent } from '@/components/apogee/sections/_shared/content.ts'

/** @composable */
interface Props extends ContentContent {
  /** The newsletter card in the sidebar. @category content */
  formHeading?: string
  /** @category content */
  formDescription?: string | null
  /** The sign-up form's submit button. @category content */
  submitLabel?: string
}

const {
  eyebrow = 'Leadership',
  heading = 'Leadership lessons from a year of remote teams',
  description = 'Rituals, writing and trust: what held a distributed team together.',
  author = { name: 'Alan Turing', role: 'Engineering Manager' },
  date = '2026-01-20',
  readingTime = '9 min read',
  media = { src: 'https://picsum.photos/seed/apogee-content-7/1600/900', alt: '', width: 1600, height: 900 },
  formHeading = 'Weekly newsletter',
  formDescription = 'No spam. Just the latest releases and tips, articles and interviews, every week.',
  submitLabel = 'Subscribe',
} = Astro.props
// ponytail: the demo footer byline differs from the header's; a page that passes `author` sets both.
const footerAuthor = Astro.props.author === undefined ? { name: 'Ada Lovelace', role: 'Design Lead' } : author
---

<article>
  <PostHeader layout="centered" eyebrow={eyebrow ?? undefined} heading={plain(heading)} description={description ?? undefined} author={author ?? undefined} date={date} readingTime={readingTime ?? undefined} headingLevel={1} media={media ?? undefined} />
  <Section spacing="none" class="pb-section">
    <div class="grid gap-12 lg:grid-cols-[minmax(0,1fr)_20rem] lg:gap-16">
      <div class="min-w-0">
        <Prose>
      <p class="lead">A design system is the shared language a team speaks when it builds a product: the parts, the rules for using them and the reasons behind the rules.</p>
      <h2 >Introduction</h2>
      <p>Most teams start one after the third button that looks almost, but not quite, like the other two. The cost is rarely the button; it is the conversation every time someone has to choose between them.</p>
      <p>A system turns those conversations into decisions made once. It does not slow a team down; it removes the questions nobody needed to ask.</p>
      <figure>
        <Image src="https://picsum.photos/seed/apogee-content-8/1600/900" alt="" width={1600} height={900} fit="cover" class="aspect-video w-full" />
        <figcaption>A team review of the component inventory.</figcaption>
      </figure>
      <h2 >Software and tools</h2>
      <p>The tools matter less than the habits around them. Keep the source of truth in code, describe every part where people already work, and let the build check what people forget.</p>
      <ol>
        <li>Name the parts the way the team already talks about them.</li>
        <li>Write down when to use each one, and when not to.</li>
        <li>Fail the build when a colour pair misses contrast.</li>
      </ol>
      <blockquote>
        <p>“We stopped arguing about buttons and started arguing about the product. That was the point.”</p>
        <cite>Ada Lovelace, Design Lead</cite>
      </blockquote>
      <h2 >Other resources</h2>
      <p>Read the parts' own documentation first: every variant, every state, and the keyboard behaviour you get for free.</p>
      <Image src="https://picsum.photos/seed/apogee-content-9/1600/900" alt="" width={1600} height={900} fit="cover" class="aspect-video w-full" />
      <div class="not-prose mt-10 rounded-2xl bg-neutral-faded p-6 md:p-8">
        <h2 class="text-xl font-semibold">Conclusion</h2>
        <p class="mt-4 text-neutral-faded">Start small: one page built entirely from shared parts teaches more than any audit. Grow the system where the product needs it, not ahead of it.</p>
      </div>
    </Prose>
        <footer class="mt-12 flex flex-col gap-6 border-t border-neutral pt-8 sm:flex-row sm:items-center sm:justify-between">
    {footerAuthor && (
    <div class="flex items-center gap-3">
      <Avatar name={footerAuthor.name} size="large" />
      <div>
        <p class="font-semibold">{footerAuthor.name}</p>
        {footerAuthor.role && <p class="text-neutral-faded">{footerAuthor.role}</p>}
      </div>
    </div>
    )}
    <ShareLinks title={plain(heading)} />
  </footer>
      </div>
      <aside class="max-lg:hidden" aria-label="Newsletter">
        <div class="sticky top-[calc(var(--navbar-height)+2rem)]">
      <Card padding="large" class="bg-neutral-faded">
        <h2 class="text-lg font-semibold">{formHeading}</h2>
        {formDescription && <p class="mt-2 text-sm text-neutral-faded">{formDescription}</p>}
        <form method="post" class="mt-6 flex flex-col gap-3">
          <Input type="email" name="email" placeholder="Enter your email" aria-label="Email" autocomplete="email" required />
          <Button type="submit">{submitLabel}</Button>
        </form>
      </Card>
        </div>
      </aside>
    </div>
  </Section>
</article>

Add

npx @ava-ui/apogee add content/large-image-03

This copies the block to src/components/apogee/blocks/content/ with everything it uses: Avatar, Button, Card, Image, Input, PostHeader, Prose, Section, ShareLinks. Every piece of copy is a prop, with the sample copy as its default. Pass yours, or null to hide a part; see copy is props.

Accessibility

  • The heading is the page’s h1; the items below are one level down.
  • The email field is named “Email” (the placeholder is not a label); the form submits without JS.
  • Photos that only decorate have an empty alt; give yours one when it carries meaning.