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
38 changes: 21 additions & 17 deletions src/pages/docent.module.css
Original file line number Diff line number Diff line change
@@ -1,23 +1,31 @@
/* /docent only: tweaks on top of home.module.css. */

/* Three steps, three columns (the homepage grid is four wide). */
.steps {
grid-template-columns: repeat(3, minmax(0, 1fr));
/* Get started: rows like "How it works", the command in a roomy box of
its own beside each step. Long commands wrap rather than clip. */
.stepRow {
align-items: center !important;
}

.stepRow .loopNum {
align-self: start;
padding-top: 5px;
}

.stepRow h3 {
margin: 0 0 6px !important;
}

/* The thing you type at each step: one line, scrolls rather than wraps. */
.stepCode {
display: block;
margin: 10px 0 12px;
padding: 10px 12px;
overflow-x: auto;
white-space: nowrap;
scrollbar-width: none;
padding: 16px 18px;
white-space: pre-wrap;
overflow-wrap: anywhere;
line-height: 1.6;
border: 1px solid var(--sl-line);
border-radius: 10px;
border-radius: 12px;
background: var(--sl-panel);
font-family: var(--sl-mono);
font-size: 0.76rem;
font-size: 0.86rem;
color: var(--sl-white);
}

Expand All @@ -27,11 +35,6 @@
}

@media (max-width: 640px) {
.steps {
grid-template-columns: 1fr;
row-gap: 32px;
}

.lastSection {
padding-bottom: 72px;
}
Expand Down Expand Up @@ -138,7 +141,8 @@
row-gap: 8px;
}

.loop li p {
.loop li p,
.stepCode {
grid-column: 2;
}

Expand Down
12 changes: 7 additions & 5 deletions src/pages/docent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -331,13 +331,15 @@ export default function Docent(): ReactNode {
<p className={styles.kicker}>Get started</p>
<h2 className={styles.h2}>From install to a passing build.</h2>
<p className={styles.sub}>Three things to type. docent does the rest.</p>
<ol className={`${styles.steps} ${local.steps}`}>
<ol className={local.loop}>
{steps.map(({ title, code, desc }, i) => (
<li key={title}>
<span className={styles.stepNum}>{String(i + 1).padStart(2, '0')}</span>
<p className={styles.stepTitle}>{title}</p>
<li key={title} className={local.stepRow}>
<span className={local.loopNum}>{String(i + 1).padStart(2, '0')}</span>
<div>
<h3 className={styles.stepTitle}>{title}</h3>
<p className={styles.stepDesc}>{desc}</p>
</div>
<code className={local.stepCode}>{i === 0 ? installCommands[shell] : code}</code>
<p className={styles.stepDesc}>{desc}</p>
</li>
))}
</ol>
Expand Down
Loading