22const 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 >
0 commit comments