Spaces:
Running

Leviathan-Guide / index.html
Omega-Dev's picture
Update
d7437c6
Raw History Blame Contribute Delete
11.7 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
<title>Leviathan — The Guide</title>
<meta name="description" content="The full Leviathan manual: how the local AI stack works — persistent memory, knowledge routing, the security membrane, and running it from your own programs.">
<meta property="og:type" content="article">
<meta property="og:title" content="Leviathan — The Guide">
<meta property="og:description" content="The details behind the cover: memory that survives, knowledge you can teach, and a sovereign, on-device stack.">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Cinzel:wght@500;600;700&family=Manrope:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;600&display=swap">
<style>
:root{
color-scheme: dark;
--abyss:#060a12; --deep:#0b111d; --panel:#0f1725; --panel-2:#0c1420;
--line:#1d2a3f; --ink:#e9f0f9; --mist:#9fb2c9; --faint:#67788f;
--cyan:#46e0d0; --cyan-soft:#7ff5e8; --cyan-deep:#2a9d94;
--gold:#f0b45a; --violet:#8b7ff0;
--serif:"Cinzel",Georgia,serif;
--sans:"Manrope",system-ui,-apple-system,"Segoe UI",sans-serif;
--mono:"JetBrains Mono",ui-monospace,"Cascadia Code",monospace;
}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;scroll-behavior:smooth}
body{
margin:0;
background:
radial-gradient(1200px 620px at 50% -8%, rgba(70,224,208,.12), transparent 60%),
radial-gradient(900px 500px at 88% 12%, rgba(139,127,240,.10), transparent 55%),
var(--abyss);
color:var(--ink);
font-family:var(--sans);
line-height:1.68;
-webkit-font-smoothing:antialiased;
min-height:100vh;
}
/* faint dragon in the background — "the background is Leviathan, with the dragon too" */
body::before{
content:"";position:fixed;inset:0;z-index:-1;pointer-events:none;
background:url("https://archive.org/download/leviathan_202609/Leviathan.png") no-repeat;
background-position:50% 78px;
background-size:min(560px,72vw) auto;
opacity:.05;
filter:drop-shadow(0 0 60px rgba(70,224,208,.4));
}
img{max-width:100%}
a{color:var(--cyan);text-decoration:none}
a:hover{color:var(--cyan-soft);text-decoration:underline}
/* Sticky header bar */
.bar{
position:sticky;top:0;z-index:10;
display:flex;align-items:center;gap:12px;
padding:10px clamp(16px,4vw,28px);
background:rgba(8,12,20,.82);backdrop-filter:blur(10px);
border-bottom:1px solid var(--line);
}
.bar img{width:34px;height:34px;filter:drop-shadow(0 0 10px rgba(70,224,208,.5))}
.bar .name{font-family:var(--serif);font-weight:700;letter-spacing:.14em;font-size:16px;
background:linear-gradient(180deg,#f2f8ff,var(--cyan-deep));-webkit-background-clip:text;background-clip:text;color:transparent}
.bar .sub{color:var(--faint);font-size:12.5px;letter-spacing:.04em;display:none}
@media(min-width:560px){.bar .sub{display:inline}}
.bar .spacer{flex:1}
.bar .back{font-weight:700;font-size:13.5px;color:var(--ink);
border:1px solid var(--line);border-radius:999px;padding:7px 15px;white-space:nowrap}
.bar .back:hover{border-color:var(--cyan);color:var(--cyan-soft);text-decoration:none}
/* Masthead */
.masthead{text-align:center;padding:clamp(34px,7vw,70px) 20px clamp(8px,2vw,20px)}
.masthead img{width:clamp(96px,17vw,150px);height:auto;margin:0 auto 18px;display:block;
filter:drop-shadow(0 0 26px rgba(70,224,208,.42));animation:breathe 5.5s ease-in-out infinite}
@keyframes breathe{0%,100%{opacity:.9}50%{opacity:1}}
.masthead h1{font-family:var(--serif);font-weight:700;letter-spacing:.06em;
font-size:clamp(34px,8vw,68px);line-height:1;margin:0;
background:linear-gradient(180deg,#f2f8ff,#b9d4e6 62%,var(--cyan-deep));
-webkit-background-clip:text;background-clip:text;color:transparent}
.masthead .kicker{font-family:var(--serif);letter-spacing:.24em;text-transform:uppercase;
font-size:12.5px;color:var(--cyan);margin:14px 0 0}
/* Rendered markdown */
.md-body{max-width:820px;margin:0 auto;padding:clamp(22px,5vw,44px) 20px 90px}
.md-body h1,.md-body h2,.md-body h3,.md-body h4{scroll-margin-top:74px;text-wrap:balance}
.md-body > h1:first-child{display:none} /* title lives in the masthead */
.md-body h1{font-family:var(--serif);font-weight:700;font-size:clamp(26px,4.4vw,38px);
margin:2.2em 0 .5em;color:var(--ink)}
.md-body h2{font-family:var(--serif);font-weight:700;font-size:clamp(23px,3.6vw,31px);
margin:2em 0 .7em;padding-top:.7em;border-top:1px solid var(--line);color:var(--ink)}
.md-body h2::after{content:"";display:block;width:52px;height:2px;margin-top:.5rem;
background:linear-gradient(90deg,var(--cyan),transparent)}
.md-body h3{font-size:clamp(18px,2.4vw,22px);font-weight:800;margin:1.8em 0 .5em;color:var(--cyan-soft)}
.md-body h4{font-size:16px;font-weight:800;margin:1.4em 0 .4em;color:var(--ink)}
.md-body p{color:var(--mist);margin:.85em 0}
.md-body strong{color:var(--ink);font-weight:700}
.md-body em{color:var(--ink)}
.md-body ul,.md-body ol{color:var(--mist);padding-left:1.4em;margin:.8em 0}
.md-body li{margin:.34em 0}
.md-body li::marker{color:var(--cyan-deep)}
.md-body a{color:var(--cyan);font-weight:600}
.md-body hr{border:0;border-top:1px solid var(--line);margin:2.4em 0}
.md-body blockquote{margin:1.4em 0;padding:.4em 1.1em;border-left:3px solid var(--cyan);
background:linear-gradient(90deg,rgba(70,224,208,.06),transparent);
color:var(--ink);font-family:var(--serif);font-size:1.12em}
.md-body blockquote p{color:var(--ink)}
.md-body code{font-family:var(--mono);font-size:.88em;color:var(--cyan-soft);
background:rgba(70,224,208,.08);border:1px solid var(--line);border-radius:6px;padding:.08em .4em}
.md-body pre{background:var(--panel-2);border:1px solid var(--line);border-radius:12px;
padding:16px 18px;overflow-x:auto;margin:1.2em 0}
.md-body pre code{background:none;border:0;padding:0;color:var(--ink);font-size:.86em;line-height:1.6}
.md-body table{width:100%;border-collapse:collapse;margin:1.2em 0;font-size:14.5px}
.md-body th,.md-body td{border:1px solid var(--line);padding:9px 12px;text-align:left}
.md-body th{background:var(--panel);color:var(--ink);font-weight:700}
.md-body td{color:var(--mist)}
.md-body img{border-radius:10px;border:1px solid var(--line)}
.md-body img[height="28"]{border:0;border-radius:0} /* the badge row (Windows, NVIDIA, the Vulkan logo): no screenshot frame */
.status{max-width:820px;margin:40px auto;padding:0 20px;color:var(--mist)}
.status a{font-weight:700}
footer{border-top:1px solid var(--line);text-align:center;padding:34px 20px;color:var(--faint);font-size:13.5px}
footer a{margin:0 8px;font-weight:600}
@media (prefers-reduced-motion: reduce){.masthead img{animation:none}}
</style>
</head>
<body>
<div class="bar">
<img src="https://archive.org/download/leviathan_202609/Leviathan.png" alt="" decoding="async" onerror="this.style.display='none'">
<span class="name">LEVIATHAN</span>
<span class="sub">· The guide</span>
<span class="spacer"></span>
<a class="back" href="https://huggingface.co/spaces/Omega-Dev/Leviathan" target="_blank" rel="noopener">&larr; Overview</a>
</div>
<header class="masthead">
<img src="https://archive.org/download/leviathan_202609/Leviathan.png" alt="Leviathan" decoding="async" onerror="this.style.display='none'">
<h1>The Guide</h1>
<p class="kicker">How it works — the full manual</p>
</header>
<article class="md-body" id="content">
<p class="status">Loading the manual…</p>
</article>
<footer>
<a href="https://huggingface.co/spaces/Omega-Dev/Leviathan" target="_blank" rel="noopener">Overview</a> ·
<a href="https://github.com/CuppaTea1983/Leviathan" target="_blank" rel="noopener">Source</a> ·
<a href="https://zenodo.org/records/23004932" target="_blank" rel="noopener">Whitepapers</a>
<div style="margin-top:10px">Leviathan — local AI on your own GPU. MIT License.</div>
</footer>
<script src="https://cdnjs.cloudflare.com/ajax/libs/marked/12.0.2/marked.min.js"></script>
<script>
// slug that survives emoji + punctuation in headings (README uses emoji section titles)
function slug(s){
return (s||"")
.toLowerCase()
.replace(/[\u{1F000}-\u{1FFFF}]/gu,"") // pictographs
.replace(/[←-➿⬀-⯿️]/gu,"") // arrows/symbols/dingbats/variation selectors
.replace(/[^\w\s-]/g,"") // strip remaining punctuation (—, ·, etc.)
.trim()
.replace(/[\s_]+/g,"-")
.replace(/-+/g,"-");
}
function headingSlugs(md){
var out=[], re=/^#{1,4}\s+(.*)$/gm, m;
while((m=re.exec(md))){ var s=slug(m[1]); if(s) out.push(s); }
return out;
}
function resolveSlug(label, slugs){
// exact heading match first, then a "Heading — suffix" prefix match
// (e.g. Contents "Knowledge routing" -> heading "Knowledge routing — ANI")
var s = slug(label);
if(slugs.indexOf(s) > -1) return s;
for(var i=0;i<slugs.length;i++){ if(slugs[i].indexOf(s + "-") === 0) return slugs[i]; }
return s;
}
function linkifyContents(md){
// Make the Contents bracket-labels clickable (the GitHub README omits anchors on purpose;
// here we add them so the guide is navigable). Only inside the Contents block, so code
// blocks and inline [refs] elsewhere are never touched.
var slugs = headingSlugs(md);
return md.replace(/(##\s*Contents\s*\n)([\s\S]*?)(\n---|\n##\s)/, function(_, head, body, tail){
var linked = body.replace(/\[([^\]\n]+)\](?!\()/g, function(_m, label){
return "[" + label + "](#" + resolveSlug(label, slugs) + ")";
});
return head + linked + tail;
});
}
// The screenshots live in the GitHub repo: a Space won't take binary files. The manual is a byte
// copy of the repo's README, so its relative "screenshots/..." paths are pointed there as it loads.
var SHOTS = "https://raw.githubusercontent.com/CuppaTea1983/Leviathan/main/screenshots/";
function githubShots(md){
return md.replace(/(\b(?:src|href)\s*=\s*["'])screenshots\//g, "$1" + SHOTS)
.replace(/(\]\()screenshots\//g, "$1" + SHOTS);
}
fetch("leviathan-readme.md", {cache:"no-cache"})
.then(function(r){ if(!r.ok) throw new Error(r.status); return r.text(); })
.then(function(md){
md = githubShots(linkifyContents(md));
if (window.marked && marked.setOptions) marked.setOptions({gfm:true, breaks:false, headerIds:false, mangle:false});
var html = window.marked ? (marked.parse ? marked.parse(md) : marked(md)) : md;
var el = document.getElementById("content");
el.innerHTML = html;
// assign stable heading ids that match the Contents links
el.querySelectorAll("h1,h2,h3,h4").forEach(function(h){
if(!h.id){ var id = slug(h.textContent); if(id) h.id = id; }
});
document.title = "Leviathan — The Guide";
})
.catch(function(e){
document.getElementById("content").innerHTML =
'<p class="status">The manual didn\'t load' +
(String(e).indexOf("Failed to fetch")>-1 || location.protocol==="file:"
? ' (opening this file directly can\'t read the manual — it loads on the live Space).'
: ' (' + e + ').') +
' Read it on <a href="https://github.com/CuppaTea1983/Leviathan" target="_blank" rel="noopener">GitHub</a> in the meantime.</p>';
});
</script>
</body>
</html>