Skip to content

Commit acb1048

Browse files
Mazizovaclaude
andauthored
Interview: David Stokes, plus a contents block for long posts (#247)
Adds the {{< toc >}} shortcode (marker) and partials/post-toc.html, which build a numbered list of a post's own second-level headings; single.html swaps the marker for it. Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
1 parent 3987b1d commit acb1048

6 files changed

Lines changed: 286 additions & 1 deletion

File tree

‎assets/scss/_interviews.scss‎

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,3 +211,66 @@
211211

212212
&:hover { background: lighten($accent, 8%); }
213213
}
214+
215+
// ── Contents block for long posts ({{< toc >}} shortcode) ──
216+
.post-toc {
217+
margin: 2rem 0 2.5rem;
218+
padding: 1.25rem 1.5rem 1.4rem;
219+
background: $dark-card;
220+
border: 1px solid $dark-border;
221+
border-left: 3px solid $accent;
222+
border-radius: 12px;
223+
}
224+
225+
.post-toc-label {
226+
display: block;
227+
margin-bottom: 0.75rem;
228+
font-size: 0.7rem;
229+
font-weight: 700;
230+
letter-spacing: 0.12em;
231+
text-transform: uppercase;
232+
color: $muted;
233+
}
234+
235+
.post-toc-list {
236+
display: grid;
237+
grid-template-columns: 1fr;
238+
gap: 0.15rem 2rem;
239+
margin: 0;
240+
padding: 0;
241+
list-style: none;
242+
counter-reset: toc;
243+
244+
@media (min-width: 760px) { grid-template-columns: 1fr 1fr; }
245+
246+
li {
247+
counter-increment: toc;
248+
margin: 0;
249+
padding: 0;
250+
}
251+
252+
a {
253+
display: flex;
254+
align-items: baseline;
255+
gap: 0.65rem;
256+
padding: 0.4rem 0;
257+
font-size: 0.9375rem;
258+
line-height: 1.4;
259+
color: $off-white;
260+
text-decoration: none;
261+
262+
&::before {
263+
content: counter(toc, decimal-leading-zero);
264+
flex: none;
265+
min-width: 1.35rem;
266+
font-size: 0.7rem;
267+
font-weight: 800;
268+
color: $accent;
269+
}
270+
271+
&:hover { color: $accent; }
272+
}
273+
}
274+
275+
// Beats the underline that links get inside post content
276+
.post-toc .post-toc-list a { text-decoration: none; }

‎assets/scss/_light-theme.scss‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1279,6 +1279,9 @@
12791279
.interview-card-date, .interview-card-cta, .interview-strip-line a { color: #0272a5; }
12801280
.interview-format { color: #0272a5; background: rgba(0, 200, 255, 0.08); border-color: rgba(0, 200, 255, 0.3); }
12811281
.interview-strip-btn { background: #0272a5; color: #ffffff; }
1282+
.post-toc { background: #ffffff; border-color: #dde3ed; border-left-color: #0272a5; }
1283+
.post-toc-label { color: #64748b; }
1284+
.post-toc-list a { color: #0f172a; &::before { color: #0272a5; } &:hover { color: #0272a5; } }
12821285

12831286
// Member Directory: featured link + adopters table
12841287
.resources-featured-link {

0 commit comments

Comments
 (0)