Skip to content

armgit / kwant

Public Imported from GitHub
0

Your own team of AI bots in one self-hosted binary: spaces, every account you have, handoffs, approvals and routines. Open-source, self-hosted alternative to Grok Bot, Claude Duet and OpenAI dots. Rust + React.

site: grouped docs nav, features page styles, linked benefit tiles

Lin (kwant bot)ce5818732c82
diff --git a/scripts/build_site.py b/scripts/build_site.py
index 120df751..0ff318d0 100644
--- a/scripts/build_site.py
+++ b/scripts/build_site.py
@@ -5,7 +5,8 @@ The output is committed, so serving or deploying site/ needs no build step.
Run `python3 scripts/build_site.py` after editing anything in site-src/.
Each page source starts with a header block of `key: value` lines, then `---`, then HTML.
-Keys: title, description, path (output path under site/), nav (docs nav id, docs pages only).
+Keys: title, description, path (output path under site/), nav (docs nav id, docs pages only),
+active (header link to mark current on non-docs pages).
Shortcodes in the HTML:
{{root}} relative path back to site/
{{shot:NAME|ALT|SIZES}} a zoomable responsive screenshot (desktop-* or phone-*)
@@ -22,15 +23,24 @@ OUT = ROOT / "site"
SITE_URL = "https://kwant.si"
GITHUB = "https://github.com/alexsergivan/kwant"
-DOCS = [
- ("quickstart", "Quickstart"),
- ("install", "Install & run"),
- ("bots-and-teams", "Bots & teams"),
- ("approvals", "Approvals & passwords"),
- ("models", "Models & accounts"),
- ("mcp", "MCP tools"),
- ("browser", "Browser"),
+DOC_GROUPS = [
+ ("Get started", [("quickstart", "Quickstart"), ("install", "Install & run")]),
+ ("Using kwant", [
+ ("spaces", "Spaces"),
+ ("bots-and-teams", "Bots & teams"),
+ ("accounts", "Accounts & profiles"),
+ ("models", "Models & routing"),
+ ("approvals", "Approvals & passwords"),
+ ]),
+ ("Works on its own", [
+ ("routines", "Routines & bot actions"),
+ ("memory-skills", "Memory, skills & search"),
+ ("loose-ends", "Loose ends & letters"),
+ ("parallel-universe", "Parallel Universe"),
+ ]),
+ ("Connect", [("mcp", "MCP tools"), ("browser", "Browser")]),
]
+DOCS = [d for _, items in DOC_GROUPS for d in items]
LOGO = (
'<svg viewBox="0 0 32 32" aria-hidden="true">'
@@ -103,7 +113,7 @@ def header(root, active):
<div class="wrap">
<a class="brand" href="{home}" aria-label="kwant home">{LOGO.replace("ID", "h")}<span>kwant</span></a>
<nav class="nav" aria-label="Main">
- <a class="hide-sm" href="{home}#features">Features</a>
+ <a class="hide-sm" href="{root}features.html"{cur("features")}>Features</a>
<a class="hide-sm" href="{home}#how">How it works</a>
<a class="hide-sm" href="{home}#faq">FAQ</a>
<a href="{root}docs/quickstart.html"{cur("docs")}>Docs</a>
@@ -124,8 +134,10 @@ def footer(root):
<nav aria-label="Footer">
<a href="{root}docs/quickstart.html">Quickstart</a>
<a href="{root}docs/install.html">Install &amp; run</a>
+ <a href="{root}features.html">All features</a>
+ <a href="{root}docs/spaces.html">Spaces</a>
+ <a href="{root}docs/accounts.html">Accounts</a>
<a href="{root}docs/approvals.html">Approvals</a>
- <a href="{root}docs/models.html">Models</a>
<a href="{GITHUB}" rel="noopener">GitHub</a>
</nav>
</div>
@@ -136,8 +148,13 @@ def footer(root):
def docs_shell(root, current, body):
here = ' aria-current="page"'
items = "\n".join(
- f' <li><a href="{root}docs/{slug}.html"{here if slug == current else ""}>{html.escape(label)}</a></li>'
- for slug, label in DOCS
+ f' <div class="docs-group"><h3>{html.escape(group)}</h3><ul>'
+ + "".join(
+ f'<li><a href="{root}docs/{slug}.html"{here if slug == current else ""}>{html.escape(label)}</a></li>'
+ for slug, label in links
+ )
+ + "</ul></div>"
+ for group, links in DOC_GROUPS
)
idx = [s for s, _ in DOCS].index(current)
prev_link = next_link = ""
@@ -150,9 +167,7 @@ def docs_shell(root, current, body):
return f"""<div class="wrap docs">
<nav class="docs-nav" aria-label="Docs">
<h2>Docs</h2>
- <ul>
{items}
- </ul>
</nav>
<article class="prose">
{body}
@@ -194,7 +209,7 @@ def page(meta, body, root):
<link rel="stylesheet" href="{root}assets/css/site.css">
</head>
<body>
-{header(root, "docs" if meta.get("nav") else "home")}
+{header(root, "docs" if meta.get("nav") else meta.get("active", "home"))}
<main id="main">
{body}
</main>
diff --git a/site/assets/css/site.css b/site/assets/css/site.css
index 56c09ed6..955a60c3 100644
--- a/site/assets/css/site.css
+++ b/site/assets/css/site.css
@@ -299,6 +299,8 @@ dialog.lightbox button { min-height: 32px; padding: 4px 12px; border-radius: 8px
.docs-nav { position: sticky; top: 88px; align-self: start; max-height: calc(100vh - 110px); overflow-y: auto; }
.docs-nav h2 { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--dim); margin: 0 0 10px 12px; }
.docs-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
+.docs-group + .docs-group { margin-top: 18px; }
+.docs-group h3 { margin: 0 0 6px 12px; font-size: 13px; font-weight: 600; letter-spacing: 0; color: var(--muted); }
.docs-nav a { display: block; padding: 8px 12px; border-radius: 8px; color: var(--muted); font-size: 15px; font-weight: 500; }
.docs-nav a:hover { background: var(--surface); color: var(--text); text-decoration: none; }
.docs-nav a[aria-current="page"] { background: rgba(108, 88, 224, 0.16); color: #e4e0ff; box-shadow: inset 2px 0 0 var(--accent-hi); }
@@ -347,9 +349,38 @@ td code { white-space: nowrap; }
.notfound { min-height: 60vh; display: grid; place-items: center; text-align: center; padding: 80px 24px; }
.notfound .code { font: 700 96px/1 var(--mono); color: var(--line); letter-spacing: -0.04em; }
+
+/* "What makes kwant different" tiles: whole tile links to its section */
+.benefit.link { display: flex; flex-direction: column; color: inherit; transition: border-color .2s ease, transform .2s ease; }
+.benefit.link:hover { text-decoration: none; border-color: var(--line); transform: translateY(-2px); }
+.benefit .more { margin-top: auto; padding-top: 14px; color: var(--accent-text); font-size: 14.5px; font-weight: 600; }
+.benefit.link:hover .more { text-decoration: underline; text-underline-offset: 3px; }
+.section-foot { margin: 40px 0 0; text-align: center; }
+.row-copy .more-link { display: inline-block; margin-top: 22px; font-weight: 600; }
+.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
+/* Tags for honest status notes */
+.tag { display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; letter-spacing: 0; vertical-align: 3px; color: #f7d08a; background: rgba(244, 157, 10, 0.12); border: 1px solid rgba(244, 157, 10, 0.35); }
+/* Features page */
+.page-head { padding: 72px 0 8px; text-align: center; }
+.page-head h1 { font-size: clamp(36px, 5vw, 56px); font-weight: 750; letter-spacing: -0.035em; line-height: 1.06; }
+.page-head .lede { margin-top: 18px; }
+.jump { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 32px auto 0; padding: 0; list-style: none; max-width: 900px; }
+.jump a { display: inline-block; padding: 7px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line-soft); color: var(--muted); font-size: 14.5px; font-weight: 500; }
+.jump a:hover { color: var(--text); border-color: var(--line); text-decoration: none; }
+.fgroup { padding: 72px 0 0; }
+.fgroup:last-of-type { padding-bottom: 96px; }
+.fgroup .section-head { margin-bottom: 32px; }
+.fgroup h2 { font-size: clamp(26px, 3.2vw, 34px); }
+.flist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; margin: 32px 0 0; padding: 0; list-style: none; }
+.flist li { padding: 18px 0; border-top: 1px solid var(--line-soft); }
+.flist h3 { font-size: 16.5px; font-weight: 650; letter-spacing: -0.01em; }
+.flist p { margin: 6px 0 0; color: var(--muted); font-size: 15px; }
+.flist p code { padding: 1px 6px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line-soft); color: #d9d4ff; }
+
/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
.benefits, .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
+ .page-head { padding-top: 56px; }
.row, .row.flip { grid-template-columns: minmax(0, 1fr); gap: 32px; }
.row.flip .row-copy { order: 0; }
.phones { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@@ -361,7 +392,10 @@ td code { white-space: nowrap; }
.docs { grid-template-columns: minmax(0, 1fr); gap: 28px; padding-top: 20px; }
.docs-nav { position: static; max-height: none; margin: 0 -24px; padding: 0 24px 12px; border-bottom: 1px solid var(--line-soft); overflow-x: auto; }
.docs-nav h2 { display: none; }
- .docs-nav ul { display: flex; gap: 6px; width: max-content; }
+ .docs-nav { display: flex; gap: 6px; }
+ .docs-group { display: contents; }
+ .docs-group h3 { display: none; }
+ .docs-nav ul { display: contents; }
.docs-nav a { white-space: nowrap; padding: 7px 12px; border: 1px solid var(--line-soft); font-size: 14px; }
.docs-nav a[aria-current="page"] { box-shadow: none; border-color: rgba(125, 107, 234, 0.5); }
.steps { grid-template-columns: minmax(0, 1fr); }
@@ -370,8 +404,9 @@ td code { white-space: nowrap; }
.nav .hide-sm { display: none; }
section { padding: 72px 0; }
.hero { padding-top: 56px; }
- .benefits, .grid { grid-template-columns: minmax(0, 1fr); }
+ .benefits, .grid, .grid.two, .flist { grid-template-columns: minmax(0, 1fr); }
.showcase { gap: 80px; }
+ .fgroup { padding-top: 56px; }
.frame-bar { height: 28px; }
.frame-bar i { width: 9px; height: 9px; }
.frame-bar span { display: none; }