Skip to content

Commit 5772251

Browse files
Revert to original typography and layout, add author headshot
Typography: restore 16px body, 1.8 line-height, original heading scale (2rem/1.5rem/1.25rem), looser spacing rhythm. The tighter 15px/interface-design scale was harder to read. Layout: restore h-14 header, w-64 sidebar with bg-secondary and border-left active state, w-52 ToC, original ChapterLayout with larger headings and generous padding. Keep: reading progress bar, Pagefind search, focus-visible outlines, edit-on-github link, line-clamp utility. Author section: replace SK initials with actual headshot from siddhantkhare.com. Co-authored-by: Ona <no-reply@ona.com>
1 parent f77ca27 commit 5772251

8 files changed

Lines changed: 167 additions & 171 deletions

File tree

public/images/author.webp

404 KB
Loading

src/components/ChapterNav.astro

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,23 @@ const { prev, next } = getAdjacentChapters(chapters, currentSlug);
1111
const base = import.meta.env.BASE_URL.replace(/\/$/, "");
1212
---
1313

14-
<nav class="mt-14 pt-6 border-t border-[var(--border-subtle)] flex justify-between gap-4">
14+
<nav class="mt-16 pt-8 border-t border-[var(--border)] flex justify-between gap-4">
1515
{prev ? (
16-
<a href={`${base}/${prev.slug}/`} class="group flex flex-col gap-0.5 max-w-[45%]">
17-
<span class="font-[var(--font-mono)] text-[11px] text-[var(--text-tertiary)] group-hover:text-[var(--text-secondary)] transition-colors">
18-
Previous
16+
<a href={`${base}/${prev.slug}/`} class="group flex flex-col items-start gap-1 max-w-[45%]">
17+
<span class="text-xs text-[var(--text-tertiary)] group-hover:text-[var(--text-secondary)] transition-colors">
18+
Previous
1919
</span>
20-
<span class="text-[13px] font-medium text-[var(--text-secondary)] group-hover:text-[var(--text-primary)] transition-colors leading-snug">
20+
<span class="text-sm font-medium text-[var(--text-secondary)] group-hover:text-[var(--text-primary)] transition-colors leading-snug">
2121
{prev.title}
2222
</span>
2323
</a>
2424
) : <div />}
2525
{next ? (
26-
<a href={`${base}/${next.slug}/`} class="group flex flex-col items-end gap-0.5 max-w-[45%] ml-auto">
27-
<span class="font-[var(--font-mono)] text-[11px] text-[var(--text-tertiary)] group-hover:text-[var(--text-secondary)] transition-colors">
28-
Next
26+
<a href={`${base}/${next.slug}/`} class="group flex flex-col items-end gap-1 max-w-[45%] ml-auto">
27+
<span class="text-xs text-[var(--text-tertiary)] group-hover:text-[var(--text-secondary)] transition-colors">
28+
Next
2929
</span>
30-
<span class="text-[13px] font-medium text-[var(--text-secondary)] group-hover:text-[var(--text-primary)] transition-colors leading-snug text-right">
30+
<span class="text-sm font-medium text-[var(--text-secondary)] group-hover:text-[var(--text-primary)] transition-colors leading-snug text-right">
3131
{next.title}
3232
</span>
3333
</a>

src/components/Header.astro

Lines changed: 55 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -2,62 +2,78 @@
22
const base = import.meta.env.BASE_URL.replace(/\/$/, "");
33
---
44

5-
<header class="fixed top-0 left-0 right-0 z-50 h-12 bg-[var(--bg-primary)]/90 backdrop-blur-lg">
5+
<header class="fixed top-0 left-0 right-0 z-50 h-14 border-b border-[var(--border-subtle)] bg-[var(--bg-primary)]/80 backdrop-blur-md">
66
<!-- Reading progress bar -->
77
<div id="reading-progress" class="absolute bottom-0 left-0 h-[1px] bg-[var(--text-tertiary)] w-full scale-x-0 origin-left"></div>
8-
<div class="absolute bottom-0 left-0 right-0 h-px bg-[var(--border-subtle)]"></div>
98

10-
<div class="h-full flex items-center justify-between px-4 lg:px-5">
11-
<!-- Left -->
12-
<div class="flex items-center gap-2.5">
9+
<div class="h-full flex items-center justify-between px-4 lg:px-6">
10+
<!-- Left: logo + mobile menu -->
11+
<div class="flex items-center gap-3">
1312
<button
1413
id="sidebar-toggle"
15-
class="lg:hidden p-1 rounded hover:bg-[var(--bg-hover)] transition-colors"
14+
class="lg:hidden p-1.5 rounded-md hover:bg-[var(--bg-hover)] transition-colors"
1615
aria-label="Toggle navigation"
1716
>
18-
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round">
19-
<line x1="4" y1="7" x2="20" y2="7" /><line x1="4" y1="12" x2="20" y2="12" /><line x1="4" y1="17" x2="20" y2="17" />
17+
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round">
18+
<line x1="3" y1="6" x2="21" y2="6" />
19+
<line x1="3" y1="12" x2="21" y2="12" />
20+
<line x1="3" y1="18" x2="21" y2="18" />
2021
</svg>
2122
</button>
22-
<a href={`${base}/`} class="text-[13px] font-medium text-[var(--text-primary)] hover:text-[var(--text-secondary)] transition-colors truncate">
23-
The Agentic Engineering Guide
23+
<a href={`${base}/`} class="flex items-center gap-2 text-sm font-medium hover:text-[var(--text-secondary)] transition-colors">
24+
<span class="font-[var(--font-mono)] text-xs tracking-wider text-[var(--text-tertiary)]">/</span>
25+
<span>The Agentic Engineering Guide</span>
2426
</a>
2527
</div>
2628

27-
<!-- Right -->
28-
<div class="flex items-center gap-0.5">
29+
<!-- Right: actions -->
30+
<div class="flex items-center gap-1">
31+
<!-- Search -->
2932
<button
3033
id="search-trigger"
31-
class="flex items-center gap-1.5 h-7 px-2.5 text-[12px] text-[var(--text-tertiary)] border border-[var(--border)] rounded-md hover:border-[var(--text-tertiary)] transition-colors cursor-pointer"
34+
class="flex items-center gap-2 px-3 py-1.5 text-xs text-[var(--text-tertiary)] border border-[var(--border)] rounded-md hover:border-[var(--text-tertiary)] transition-colors cursor-pointer"
3235
>
33-
<svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round">
34-
<circle cx="11" cy="11" r="8" /><line x1="21" y1="21" x2="16.65" y2="16.65" />
36+
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round">
37+
<circle cx="11" cy="11" r="8" />
38+
<line x1="21" y1="21" x2="16.65" y2="16.65" />
3539
</svg>
3640
<span class="hidden sm:inline">Search</span>
37-
<kbd class="hidden sm:inline font-[var(--font-mono)] text-[10px] ml-1 opacity-50">⌘K</kbd>
41+
<kbd class="hidden sm:inline font-[var(--font-mono)] text-[10px] px-1 py-0.5 rounded bg-[var(--bg-tertiary)] border border-[var(--border)]">⌘K</kbd>
3842
</button>
3943

44+
<!-- GitHub -->
4045
<a
4146
href="https://github.com/Siddhant-K-code/agentic-engineering-guide"
4247
target="_blank"
4348
rel="noopener noreferrer"
44-
class="p-1.5 rounded hover:bg-[var(--bg-hover)] transition-colors text-[var(--text-tertiary)] hover:text-[var(--text-primary)]"
49+
class="p-2 rounded-md hover:bg-[var(--bg-hover)] transition-colors text-[var(--text-secondary)]"
4550
aria-label="GitHub"
4651
>
47-
<svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor">
52+
<svg width="18" height="18" viewBox="0 0 24 24" fill="currentColor">
4853
<path d="M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"/>
4954
</svg>
5055
</a>
5156

57+
<!-- Theme toggle -->
5258
<button
5359
id="theme-toggle"
54-
class="p-1.5 rounded hover:bg-[var(--bg-hover)] transition-colors text-[var(--text-tertiary)] hover:text-[var(--text-primary)] cursor-pointer"
60+
class="p-2 rounded-md hover:bg-[var(--bg-hover)] transition-colors text-[var(--text-secondary)] cursor-pointer"
5561
aria-label="Toggle theme"
5662
>
57-
<svg class="dark:block hidden" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round">
58-
<circle cx="12" cy="12" r="5" /><line x1="12" y1="1" x2="12" y2="3" /><line x1="12" y1="21" x2="12" y2="23" /><line x1="4.22" y1="4.22" x2="5.64" y2="5.64" /><line x1="18.36" y1="18.36" x2="19.78" y2="19.78" /><line x1="1" y1="12" x2="3" y2="12" /><line x1="21" y1="12" x2="23" y2="12" /><line x1="4.22" y1="19.78" x2="5.64" y2="18.36" /><line x1="18.36" y1="5.64" x2="19.78" y2="4.22" />
63+
<!-- Sun (shown in dark mode) -->
64+
<svg class="dark:block hidden" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round">
65+
<circle cx="12" cy="12" r="5" />
66+
<line x1="12" y1="1" x2="12" y2="3" />
67+
<line x1="12" y1="21" x2="12" y2="23" />
68+
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64" />
69+
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78" />
70+
<line x1="1" y1="12" x2="3" y2="12" />
71+
<line x1="21" y1="12" x2="23" y2="12" />
72+
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36" />
73+
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22" />
5974
</svg>
60-
<svg class="dark:hidden block" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round">
75+
<!-- Moon (shown in light mode) -->
76+
<svg class="dark:hidden block" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round">
6177
<path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z" />
6278
</svg>
6379
</button>
@@ -67,23 +83,24 @@ const base = import.meta.env.BASE_URL.replace(/\/$/, "");
6783

6884
<!-- Search dialog -->
6985
<div id="search-dialog" class="fixed inset-0 z-[100] hidden">
70-
<div class="absolute inset-0 bg-black/40 backdrop-blur-sm" id="search-backdrop"></div>
71-
<div class="relative max-w-lg mx-auto mt-[12vh] bg-[var(--bg-primary)] border border-[var(--border)] rounded-xl shadow-2xl overflow-hidden">
72-
<div class="flex items-center gap-2 border-b border-[var(--border-subtle)] px-4">
73-
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="var(--text-tertiary)" stroke-width="2" stroke-linecap="round" class="shrink-0">
74-
<circle cx="11" cy="11" r="8" /><line x1="21" y1="21" x2="16.65" y2="16.65" />
86+
<div class="absolute inset-0 bg-black/50 backdrop-blur-sm" id="search-backdrop"></div>
87+
<div class="relative max-w-xl mx-auto mt-[15vh] bg-[var(--bg-secondary)] border border-[var(--border)] rounded-lg shadow-2xl overflow-hidden">
88+
<div class="flex items-center border-b border-[var(--border)] px-4">
89+
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="var(--text-tertiary)" stroke-width="2" stroke-linecap="round" class="shrink-0">
90+
<circle cx="11" cy="11" r="8" />
91+
<line x1="21" y1="21" x2="16.65" y2="16.65" />
7592
</svg>
7693
<input
7794
id="search-input"
7895
type="text"
7996
placeholder="Search chapters..."
8097
autocomplete="off"
81-
class="w-full bg-transparent py-3 text-[14px] text-[var(--text-primary)] placeholder:text-[var(--text-tertiary)] outline-none"
98+
class="w-full bg-transparent px-3 py-3 text-sm text-[var(--text-primary)] placeholder:text-[var(--text-tertiary)] outline-none"
8299
/>
83-
<kbd class="font-[var(--font-mono)] text-[10px] px-1.5 py-0.5 rounded bg-[var(--bg-tertiary)] text-[var(--text-tertiary)] shrink-0">esc</kbd>
100+
<kbd class="font-[var(--font-mono)] text-[10px] px-1.5 py-0.5 rounded bg-[var(--bg-tertiary)] border border-[var(--border)] text-[var(--text-tertiary)] shrink-0">ESC</kbd>
84101
</div>
85-
<div id="search-results" class="max-h-[50vh] overflow-y-auto p-1.5">
86-
<p id="search-placeholder" class="text-[13px] text-[var(--text-tertiary)] px-3 py-6 text-center">Type to search across all chapters</p>
102+
<div id="search-results" class="max-h-[60vh] overflow-y-auto p-2">
103+
<p id="search-placeholder" class="text-sm text-[var(--text-tertiary)] px-2 py-4 text-center">Type to search across all chapters</p>
87104
</div>
88105
</div>
89106
</div>
@@ -180,24 +197,24 @@ const base = import.meta.env.BASE_URL.replace(/\/$/, "");
180197
}
181198

182199
if (!pagefind) {
183-
searchResults.innerHTML = '<p class="text-[13px] text-[var(--text-tertiary)] px-3 py-6 text-center">Search index not available.</p>';
200+
searchResults.innerHTML = '<p class="text-sm text-[var(--text-tertiary)] px-2 py-4 text-center">Search index not available.</p>';
184201
return;
185202
}
186203

187204
var search = await pagefind.search(query);
188-
var results = await Promise.all(search.results.slice(0, 8).map(function(r) { return r.data(); }));
205+
var results = await Promise.all(search.results.slice(0, 10).map(function(r) { return r.data(); }));
189206

190207
if (results.length === 0) {
191-
searchResults.innerHTML = '<p class="text-[13px] text-[var(--text-tertiary)] px-3 py-6 text-center">No results found</p>';
208+
searchResults.innerHTML = '<p class="text-sm text-[var(--text-tertiary)] px-2 py-4 text-center">No results found</p>';
192209
return;
193210
}
194211

195212
searchResults.innerHTML = results.map(function(r) {
196-
return '<a href="' + r.url + '" class="block px-3 py-2 rounded-lg hover:bg-[var(--bg-hover)] transition-colors">' +
197-
'<span class="block text-[13px] font-medium text-[var(--text-primary)] leading-snug">' + (r.meta?.title || 'Untitled') + '</span>' +
198-
'<span class="block text-[12px] text-[var(--text-tertiary)] mt-0.5 leading-relaxed line-clamp-2">' + (r.excerpt || '') + '</span>' +
213+
return '<a href="' + r.url + '" class="block px-3 py-2.5 rounded-md hover:bg-[var(--bg-hover)] transition-colors">' +
214+
'<span class="block text-sm font-medium text-[var(--text-primary)] leading-snug">' + (r.meta?.title || 'Untitled') + '</span>' +
215+
'<span class="block text-xs text-[var(--text-tertiary)] mt-1 leading-relaxed line-clamp-2">' + (r.excerpt || '') + '</span>' +
199216
'</a>';
200217
}).join('');
201-
}, 150);
218+
}, 200);
202219
});
203220
</script>

src/components/Sidebar.astro

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -12,25 +12,28 @@ const base = import.meta.env.BASE_URL.replace(/\/$/, "");
1212
---
1313

1414
<!-- Mobile overlay -->
15-
<div id="sidebar-overlay" class="fixed inset-0 z-30 bg-black/30 backdrop-blur-sm lg:hidden hidden"></div>
15+
<div id="sidebar-overlay" class="fixed inset-0 z-30 bg-black/40 backdrop-blur-sm lg:hidden hidden"></div>
1616

1717
<aside
1818
id="sidebar"
19-
class="fixed top-12 left-0 z-40 w-60 h-[calc(100vh-3rem)] bg-[var(--bg-primary)] border-r border-[var(--border-subtle)] overflow-y-auto -translate-x-full lg:translate-x-0 transition-transform duration-200"
19+
class="fixed top-14 left-0 z-40 w-64 h-[calc(100vh-3.5rem)] bg-[var(--bg-secondary)] border-r border-[var(--border-subtle)] overflow-y-auto -translate-x-full lg:translate-x-0 transition-transform duration-200"
2020
>
21-
<nav class="py-3 px-2">
21+
<nav class="py-4 px-3">
2222
{groups.map((group) => (
23-
<div class="mb-1">
23+
<div class="mb-4">
2424
{group.part > 0 && group.part < 99 && (
25-
<div class="px-2 pt-4 pb-1">
26-
<span class="font-[var(--font-mono)] text-[10px] tracking-[0.15em] uppercase text-[var(--text-tertiary)]">
27-
{String(group.part).padStart(2, "0")} / {group.title}
25+
<div class="px-2 pt-3 pb-1.5">
26+
<span class="font-[var(--font-mono)] text-[10px] tracking-widest uppercase text-[var(--text-tertiary)]">
27+
Part {group.part}
28+
</span>
29+
<span class="block text-xs font-medium text-[var(--text-secondary)] mt-0.5">
30+
{group.title}
2831
</span>
2932
</div>
3033
)}
3134
{group.part === 99 && (
32-
<div class="px-2 pt-5 pb-1">
33-
<span class="font-[var(--font-mono)] text-[10px] tracking-[0.15em] uppercase text-[var(--text-tertiary)]">
35+
<div class="px-2 pt-3 pb-1.5 border-t border-[var(--border-subtle)] mt-2">
36+
<span class="font-[var(--font-mono)] text-[10px] tracking-widest uppercase text-[var(--text-tertiary)]">
3437
{group.title}
3538
</span>
3639
</div>
@@ -43,20 +46,17 @@ const base = import.meta.env.BASE_URL.replace(/\/$/, "");
4346
<a
4447
href={`${base}/${ch.slug}/`}
4548
class:list={[
46-
"flex items-start gap-2 px-2 py-[5px] text-[13px] rounded transition-colors duration-100",
49+
"flex items-start gap-2 px-2 py-1.5 text-sm rounded-md transition-colors",
4750
isActive
48-
? "text-[var(--text-primary)] font-medium bg-[var(--bg-tertiary)]"
51+
? "text-[var(--text-primary)] bg-[var(--bg-hover)] border-l-2 border-[var(--text-primary)] -ml-px pl-[calc(0.5rem-1px)]"
4952
: "text-[var(--text-secondary)] hover:text-[var(--text-primary)] hover:bg-[var(--bg-hover)]",
5053
]}
5154
>
52-
{ch.chapter ? (
53-
<span class:list={[
54-
"font-[var(--font-mono)] text-[11px] mt-px shrink-0 w-4 tabular-nums",
55-
isActive ? "text-[var(--text-secondary)]" : "text-[var(--text-tertiary)]",
56-
]}>
55+
{ch.chapter && (
56+
<span class="font-[var(--font-mono)] text-[11px] text-[var(--text-tertiary)] mt-0.5 shrink-0 w-5">
5757
{String(ch.chapter).padStart(2, "0")}
5858
</span>
59-
) : null}
59+
)}
6060
<span class="leading-snug">{ch.title}</span>
6161
</a>
6262
</li>

src/components/TableOfContents.astro

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,19 @@ const filtered = headings.filter((h) => h.depth >= 2 && h.depth <= 3);
88
---
99

1010
{filtered.length > 0 && (
11-
<aside class="hidden xl:block w-48 shrink-0 sticky top-12 h-[calc(100vh-3rem)] py-10 pr-4">
11+
<aside class="hidden xl:block w-52 shrink-0 sticky top-14 h-[calc(100vh-3.5rem)] py-10 pr-6">
1212
<nav class="overflow-y-auto max-h-full">
13-
<p class="font-[var(--font-mono)] text-[10px] tracking-[0.15em] uppercase text-[var(--text-tertiary)] mb-3">
13+
<span class="font-[var(--font-mono)] text-[10px] tracking-widest uppercase text-[var(--text-tertiary)] mb-3 block">
1414
On this page
15-
</p>
16-
<ul class="space-y-1">
15+
</span>
16+
<ul class="space-y-1.5">
1717
{filtered.map((h) => (
1818
<li>
1919
<a
2020
href={`#${h.slug}`}
2121
class:list={[
22-
"block text-[12px] leading-relaxed transition-colors duration-100 hover:text-[var(--text-primary)]",
23-
h.depth === 2 ? "text-[var(--text-secondary)]" : "text-[var(--text-tertiary)] pl-2.5",
22+
"block text-xs leading-relaxed transition-colors hover:text-[var(--text-primary)]",
23+
h.depth === 2 ? "text-[var(--text-secondary)]" : "text-[var(--text-tertiary)] pl-3",
2424
]}
2525
data-toc-link
2626
data-toc-slug={h.slug}
@@ -53,7 +53,7 @@ const filtered = headings.filter((h) => h.depth >= 2 && h.depth <= 3);
5353
}
5454
}
5555
},
56-
{ rootMargin: '-60px 0px -75% 0px', threshold: 0 }
56+
{ rootMargin: '-80px 0px -70% 0px', threshold: 0 }
5757
);
5858
document.querySelectorAll('.prose h2[id], .prose h3[id]').forEach(h => observer.observe(h));
5959
}

0 commit comments

Comments
 (0)