Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@ The build fails if any internal link or `#anchor` points nowhere ([starlight-lin
| --- | --- |
| `src/content/docs/` | One `.mdx` file per page. The file path is the URL. |
| `src/components/Screenshot.astro` | Shows an app screenshot that matches the reader's theme. |
| `src/components/` | The landing hero, the page menu, the header title and the footer. |
| `src/styles/` | Fonts, the Supper Club colors, and type. |
| `src/components/` | The landing hero, the first steps card, the jump list, the page menu, the color key, the header title and the footer. |
| `src/styles/` | Fonts, the Supper Club colors, and type. The colors follow `packages/tokens/src/color.ts` in the app repo. |
| `src/content/docs/404.mdx` | The guide's own not-found page. |
| `public/screenshots/` | Real screenshots from the app, phone and desktop, light and dark. |
| `astro.config.mjs` | Site settings and the sidebar. |

Expand Down
67 changes: 67 additions & 0 deletions src/components/ColorKey.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
---
// What each color means in the app, as a small key. The swatches use the same values as the app.
const colors = [
{ tone: 'tomato', name: 'Red', job: 'the thing to press: the main button on a screen, the + button, the tab you are on. It is also money you owe, anything that deletes, and the badge that counts what you have not read.' },
{ tone: 'olive', name: 'Green', job: 'money owed to you or that you lent, and things that went through.' },
{ tone: 'saffron', name: 'Yellow', job: 'plans, date chips, highlights and gentle notices.' },
{ tone: 'mute', name: 'Grey', job: 'settled up, or nothing owed either way.' },
]
---

<ul class="pl-key not-content">
{
colors.map((c) => (
<li>
<span class={`pl-key__dot pl-key__dot--${c.tone}`} aria-hidden="true" />
<span>
<strong>{c.name}</strong> is {c.job}
</span>
</li>
))
}
</ul>

<style>
.pl-key {
list-style: none;
margin: 1.25rem 0;
padding: 0.35rem 1.1rem;
border: 1px solid var(--pl-line);
border-radius: var(--pl-radius-card);
background: var(--pl-card);
color: var(--sl-color-text);
}
li {
display: flex;
align-items: baseline;
gap: 0.85rem;
padding: 0.6rem 0;
line-height: 1.5;
}
li + li {
border-top: 1px solid var(--pl-line);
}
strong {
color: var(--pl-ink);
font-weight: 650;
}
.pl-key__dot {
flex-shrink: 0;
width: 0.9rem;
height: 0.9rem;
border-radius: 999px;
transform: translateY(0.1rem);
}
.pl-key__dot--tomato {
background: var(--pl-tomato);
}
.pl-key__dot--olive {
background: var(--pl-olive);
}
.pl-key__dot--saffron {
background: var(--pl-saffron);
}
.pl-key__dot--mute {
background: var(--pl-mute);
}
</style>
180 changes: 180 additions & 0 deletions src/components/FirstSteps.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,180 @@
---
/**
* The guide's version of the app's first steps card on Home ("Set the table"): the same three
* steps in the same words, each one a link to the page that explains it. The gingham strip is
* the app's tablecloth, and this card is the only place the guide uses it.
*/
interface Props {
/** Adds a line for readers who have not signed up yet. */
signUpHint?: boolean
}

const { signUpHint = false } = Astro.props

const steps = [
{
title: 'Start a group',
hint: 'Roommates, a trip, the dinner crew.',
href: '/groups/#create-a-group',
},
{
title: 'Add your people',
hint: 'Send an invite link, or add someone by name.',
href: '/groups/invites/',
},
{
title: 'Add the first expense',
hint: 'Potluck works out who owes what.',
href: '/expenses/#add-an-expense',
},
]
---

<section class="pl-first not-content" aria-labelledby="pl-first-title">
<div class="pl-first__cloth" aria-hidden="true"></div>
<div class="pl-first__body">
<h2 id="pl-first-title" class="pl-first__title">Set the table</h2>
<p class="pl-first__lede">Three small steps and Potluck starts keeping the tab.</p>
<ol>
{
steps.map((step, i) => (
<li>
<a href={step.href}>
<span class="pl-first__num" aria-hidden="true">
{i + 1}
</span>
<span class="pl-first__text">
<span class="pl-first__step">{step.title}</span>
<span class="pl-first__hint">{step.hint}</span>
</span>
<svg class="pl-first__go" viewBox="0 0 24 24" aria-hidden="true">
<path d="m9 6 6 6-6 6" />
</svg>
</a>
</li>
))
}
</ol>
</div>
{
signUpHint && (
<p class="pl-first__foot">
No account yet? <a href="/getting-started/#create-an-account">Create one first</a>, it takes a minute.
</p>
)
}
</section>

<style>
.pl-first {
overflow: hidden;
border: 1px solid var(--pl-line);
border-radius: var(--pl-radius-card);
background: var(--pl-card);
color: var(--pl-ink);
}
.pl-first__cloth {
height: 0.75rem;
border-bottom: 1px solid var(--pl-line);
background-color: var(--pl-paper);
background-image:
linear-gradient(90deg, color-mix(in oklab, var(--pl-tomato) 42%, transparent) 50%, transparent 50%),
linear-gradient(color-mix(in oklab, var(--pl-tomato) 42%, transparent) 50%, transparent 50%);
background-size: 12px 12px;
}
.pl-first__body {
padding: 1.25rem 1.25rem 0.5rem;
}
.pl-first__title {
margin: 0;
font-family: var(--pl-font-display);
font-style: italic;
font-weight: 400;
font-size: 2rem;
line-height: 1;
letter-spacing: -0.01em;
color: var(--pl-ink);
}
.pl-first__lede {
margin: 0.5rem 0 0;
font-size: var(--sl-text-sm);
color: var(--pl-mute);
}
ol {
list-style: none;
margin: 0.75rem 0 0;
padding: 0;
}
li + li {
border-top: 1px solid var(--pl-line);
}
li a {
display: flex;
align-items: center;
gap: 0.85rem;
margin-inline: -0.6rem;
padding: 0.8rem 0.6rem;
border-radius: var(--pl-radius-input);
color: inherit;
text-decoration: none;
}
li a:hover {
background: var(--pl-sunken);
}
.pl-first__num {
display: grid;
place-items: center;
flex-shrink: 0;
width: 1.75rem;
height: 1.75rem;
border-radius: 999px;
background: var(--pl-tomato-strong);
color: var(--pl-on-tomato);
font-size: var(--sl-text-sm);
font-weight: 750;
font-variant-numeric: tabular-nums;
}
.pl-first__text {
display: grid;
flex: 1;
min-width: 0;
line-height: 1.35;
}
.pl-first__step {
font-weight: 650;
}
li a:hover .pl-first__step {
text-decoration: underline;
text-decoration-color: var(--pl-tomato);
text-decoration-thickness: 2px;
text-underline-offset: 0.25em;
}
.pl-first__hint {
font-size: var(--sl-text-sm);
color: var(--pl-mute);
}
.pl-first__go {
flex-shrink: 0;
width: 1.25rem;
height: 1.25rem;
fill: none;
stroke: var(--pl-mute);
stroke-width: 2;
stroke-linecap: round;
stroke-linejoin: round;
}
.pl-first__foot {
margin: 0;
padding: 0.8rem 1.25rem;
border-top: 1px solid var(--pl-line);
font-size: var(--sl-text-sm);
color: var(--pl-mute);
}
.pl-first__foot a {
color: var(--pl-ink);
font-weight: 650;
text-decoration-color: var(--pl-tomato);
text-decoration-thickness: 2px;
text-underline-offset: 0.25em;
}
</style>
6 changes: 3 additions & 3 deletions src/components/Footer.astro
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import Default from '@astrojs/starlight/components/Footer.astro'
<li><a href="https://fermulate.com">A Fermulate project</a></li>
</ul>
<p>
Guide text and screenshots under
Guide text and screenshots under{' '}
<a href="https://github.com/Fermulate/potluck-docs/blob/main/LICENSE">CC BY-SA 4.0</a>.
</p>
</div>
Expand Down Expand Up @@ -47,8 +47,8 @@ import Default from '@astrojs/starlight/components/Footer.astro'
text-decoration: none;
}
.pl-footer__open:hover {
background: var(--pl-tomato-ink);
color: #fff;
background: var(--pl-tomato-strong);
color: var(--pl-on-tomato);
}
ul {
display: flex;
Expand Down
Loading
Loading