kitbash Sign in Connect agent
Components

Published page

A centred reading column as a writer's page: round portrait, name, bio, hairline, small post title, serif paragraphs and a picture in a tinted panel.

Part of the style

Cream Serif Window

6 parts that belong together, with their tokens, type and rules.

Preview

Code
<style>
/* Goes after the pack's base.css */
:root {
  --paper: #101213;
  --sheet: #0f1112;
  --chrome: #181a1c;
  --ink: #e8e6ed;
  --ink-soft: #747277;
  --wash: rgba(255, 255, 255, 0.06);
  --wash-strong: rgba(255, 255, 255, 0.1);
  --rule: #222426;
  --panel-warm: #191c1d;
  --panel-stone: #252729;
  --dot: #313435;
}
</style>

<article class="journal">
  <header class="journal__head journal__item">
    <img class="journal__avatar" src="assets/portrait.jpg" alt="Painted portrait of a seated man in a brown coat" width="488" height="600" />
    <p class="journal__name">Edmund Hale</p>
    <p class="journal__bio">Keeps a notebook on bread, weather and slow walks.</p>
  </header>
  <hr class="journal__rule journal__item" />
  <h2 class="journal__title journal__item">A village among the trees</h2>
  <p class="journal__meta journal__item">12 March &middot; 4 min read</p>
  <div class="journal__body">
    <p class="journal__item">I found the drawing folded inside a secondhand atlas: a row of roofs, a lane, and more trees than anyone would bother to count. It was done in grey chalk on blue paper, quickly, by someone who knew exactly when to stop.</p>
    <p class="journal__item">That is the whole lesson, I think. Write the lane and the roofs. Leave the trees as a soft grey weather around them, and trust the reader to walk in.</p>
  </div>
  <figure class="journal__panel journal__item">
    <img class="journal__picture" src="assets/village.jpg" alt="Chalk drawing of a village lane among tall trees" width="800" height="567" />
    <figcaption class="journal__caption">Found in an atlas, 1890s, chalk on blue paper</figcaption>
  </figure>
</article>

<style>
  .journal {
    width: min(100% - 2 * var(--edge), 36rem);
    margin: 0 auto;
    padding: var(--section-space) 0;
    text-align: center;
  }
  .journal__avatar {
    width: 56px;
    height: 56px;
    margin: 0 auto var(--space-s);
    border-radius: var(--round);
    object-fit: cover;
    object-position: 50% 12%;
  }
  .journal__name { margin: 0; font-weight: 500; }
  .journal__bio { margin: 0; color: var(--ink); }
  .journal__rule {
    margin: var(--space-l) 0;
    border: 0;
    border-top: var(--line) solid var(--rule);
  }
  .journal__title {
    margin: 0;
    font-size: var(--text-m);
    font-weight: 500;
    line-height: var(--lead);
  }
  .journal__meta {
    margin: 0.25rem 0 var(--space-m);
    color: var(--ink-soft);
    font: 400 var(--text-xs) / 1.6 var(--font-mono);
  }
  .journal__body { text-align: left; }
  .journal__body p { margin: 0 0 var(--space-s); }
  .journal__panel {
    margin: var(--space-m) 0 0;
    padding: clamp(1.25rem, 5vw, 3rem);
    border-radius: var(--radius-l);
    background: var(--panel-stone);
  }
  .journal__picture {
    width: 100%;
    height: auto;
    aspect-ratio: 800 / 567;
    object-fit: cover;
    border-radius: var(--radius-s);
    box-shadow: var(--shadow-window);
  }
  .journal__caption {
    margin-top: var(--space-s);
    color: var(--ink-soft);
    font: 400 var(--text-xs) / 1.5 var(--font-mono);
  }

  .journal__item {
    opacity: 0;
    translate: 0 16px;
    transition: opacity var(--fade) var(--ease-out), translate var(--fade) var(--ease-out);
    transition-delay: calc(var(--order, 0) * 80ms);
  }
  .journal.is-seen .journal__item { opacity: 1; translate: 0 0; }
  @media (prefers-reduced-motion: reduce) {
    .journal__item { opacity: 1; translate: none; transition: none; }
  }
</style>

<script>
  (() => {
    const seen = new IntersectionObserver((entries) => {
      for (const entry of entries) {
        if (!entry.isIntersecting) continue;
        entry.target.classList.add('is-seen');
        seen.unobserve(entry.target);
      }
    }, { threshold: 0.1 });
    for (const root of document.querySelectorAll('.journal')) {
      root.querySelectorAll('.journal__item').forEach((item, order) => item.style.setProperty('--order', order));
      seen.observe(root);
    }
  })();
</script>

Similar components

Credits statement

Credits statement

About panel

About panel

Privacy panel

Privacy panel

Lit statement card

Lit statement card

Matted diff feature

Matted diff feature

Statement with pictures

Statement with pictures

Extruded word swap

Extruded word swap

Lead entry

Lead entry