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
23 changes: 19 additions & 4 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,21 @@
</head>
<body>

<header class="gut">
<nav class="topbar">
<a class="brand" href="https://lakshgoyal.com">Laksh Goyal<span>.</span></a>
<div class="navlinks">
<a href="https://github.com/lgoyal6/strata">GitHub</a>
<a href="https://www.linkedin.com/in/lakshgoyal">LinkedIn</a>
</div>
</nav>
<nav class="tabs" aria-label="Sections">
<a href="#sec-home">Home</a>
<a href="#sec-break">Break it</a>
<a href="#sec-poke">Poke it</a>
<a href="#sec-source">Source</a>
</nav>

<header id="sec-home" class="gut">
<div>
<div class="eyebrow">lsm-tree storage engine &middot; c++20 &middot; zero-dependency core &middot;
<span class="led-label" id="led-label">booting engine&hellip;</span></div>
Expand All @@ -42,7 +56,7 @@ <h1>strata<span>.</span></h1>
</div>
</header>

<section id="break" class="gut">
<section class="gut" id="sec-break">
<div class="sec-bar">
<span class="no">01</span><h2>Break it</h2>
<span class="lede">write real records, arm a power cut a few hundred KB ahead, and reboot into recovery</span>
Expand Down Expand Up @@ -76,7 +90,7 @@ <h1>strata<span>.</span></h1>
number; the measured numbers above come from real hardware, see docs/BENCHMARKS.md.</i></p>
</section>

<section id="poke" class="gut">
<section class="gut" id="sec-poke">
<div class="sec-bar">
<span class="no">02</span><h2>Poke it</h2>
<span class="lede">your own keys land in the same memtable; the counters are the engine's own</span>
Expand Down Expand Up @@ -113,7 +127,7 @@ <h1>strata<span>.</span></h1>
</div>
</section>

<section id="saw" class="gut">
<section class="gut" id="sec-source">
<div class="sec-bar">
<span class="no">03</span><h2>What you just saw</h2>
<span class="lede">every behavior above is a specific piece of the engine</span>
Expand Down Expand Up @@ -164,5 +178,6 @@ <h1>strata<span>.</span></h1>
</footer>

<script src="app.js"></script>
<script src="nav.js"></script>
</body>
</html>
21 changes: 21 additions & 0 deletions docs/nav.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// Marks the tab for whichever section you are looking at.
//
// Its own scope on purpose: these pages load app.js as a classic script in the
// global scope, and a second one declaring the same helper names would take the
// instrument down with it.
(() => {
const tabs = [...document.querySelectorAll('.tabs a')];
const seen = tabs
.map((a) => document.querySelector(a.getAttribute('href')))
.filter(Boolean);
if (!seen.length) return;
const spy = new IntersectionObserver((entries) => {
const best = entries
.filter((e) => e.isIntersecting)
.sort((a, b) => b.intersectionRatio - a.intersectionRatio)[0];
if (!best) return;
tabs.forEach((a) =>
a.setAttribute('aria-current', String(a.getAttribute('href') === `#${best.target.id}`)));
}, { rootMargin: '-90px 0px -55% 0px', threshold: [0.05, 0.3] });
seen.forEach((el) => spy.observe(el));
})();
36 changes: 36 additions & 0 deletions docs/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -172,3 +172,39 @@ footer .links a { color: var(--ink); }
html { scroll-behavior: auto; }
.rail-fill { transition: none; }
}

/* ---- shared nav shell ------------------------------------------------
Written entirely in this page's own variables, so it takes the palette
it is dropped into instead of importing a second one. */
html { scroll-padding-top: 96px; }
.topbar {
position: sticky; top: 0; z-index: 20;
background: color-mix(in srgb, var(--paper) 92%, transparent);
backdrop-filter: blur(8px); border-bottom: 1px solid var(--rule);
display: flex; align-items: center; justify-content: space-between; gap: 16px;
padding: 10px clamp(20px, 3vw, 44px);
}
.brand { font: 15px/1 var(--serif); text-decoration: none; color: var(--ink); }
.brand span { color: var(--ox); }
.navlinks { display: flex; gap: 18px; font: 12px/1 var(--mono); letter-spacing: .06em; }
.navlinks a { color: var(--sub); text-decoration: none; transition: color .18s ease; }
.navlinks a:hover { color: var(--ox); }
.tabs {
position: sticky; top: 40px; z-index: 19;
background: color-mix(in srgb, var(--paper) 92%, transparent);
backdrop-filter: blur(8px); border-bottom: 1px solid var(--rule);
display: flex; gap: 2px; overflow-x: auto; padding: 0 clamp(20px, 3vw, 44px);
}
.tabs a {
flex: 0 0 auto; display: flex; align-items: center; min-height: 44px;
padding: 0 13px; font: 11px/1 var(--mono); letter-spacing: .1em;
text-transform: uppercase; color: var(--faint); text-decoration: none;
border-bottom: 2px solid transparent;
transition: color .18s ease, border-color .18s ease;
}
.tabs a:hover { color: var(--sub); }
.tabs a[aria-current="true"] { color: var(--ox); border-bottom-color: var(--ox); }
@media (prefers-reduced-motion: reduce) {
html { scroll-behavior: auto; }
.tabs a, .navlinks a { transition: none; }
}
Loading