diff --git a/.github/workflows/desktop.yml b/.github/workflows/desktop.yml index 20c365b..8ece14b 100644 --- a/.github/workflows/desktop.yml +++ b/.github/workflows/desktop.yml @@ -659,6 +659,11 @@ jobs: # toolchains (such as Ollama's), which fails the AppImage. Release # libraries are already stripped. NO_STRIP: ${{ matrix.platform == 'ubuntu-22.04' && 'true' || '' }} + # The bundled Ollama libraries find each other through the library + # path Ollama sets at runtime, not an rpath, so linuxdeploy can't + # resolve them (e.g. libggml-base.so.0) without this. Only the + # Linux AppImage step reads it. + LD_LIBRARY_PATH: ${{ matrix.platform == 'ubuntu-22.04' && format('{0}/frontend/src-tauri/binaries/ollama-runtime-x86_64-unknown-linux-gnu/build/lib/ollama', github.workspace) || '' }} with: projectPath: frontend tauriScript: npx tauri diff --git a/README.md b/README.md index 78193a3..f62c5d0 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,9 @@ [![XERJ Corpus Hub contributor](https://hub.xerj.org/contributors/aryanjsx/badge.svg)](https://hub.xerj.org/contributors/aryanjsx) -[Website](https://aryanjsx.github.io/Locus/) · [Why Locus](#why-locus) · [What it can do](#what-locus-can-do) · [Install](#installation) · [Quick start](#quick-start) · [Privacy](#privacy) · [Docs](https://aryanjsx.github.io/Locus/) +**[Download for Windows, macOS or Linux](https://aryanjsx.github.io/Locus/#download)** + +[Website](https://aryanjsx.github.io/Locus/) · [Why Locus](#why-locus) · [What it can do](#what-locus-can-do) · [Install](#installation) · [Quick start](#quick-start) · [Privacy](#privacy) · [Docs](https://aryanjsx.github.io/Locus/getting-started/installation/) @@ -39,14 +41,16 @@ Locus is that stack. It is a framework for local-first personal AI, built around ### Desktop app -Download the installer for your platform from the [**latest release**](https://github.com/aryanjsx/Locus/releases/latest): +The easiest way is the **[download button on the website](https://aryanjsx.github.io/Locus/#download)**. It detects your system and downloads the right installer directly. You can also pick a file from the [latest release](https://github.com/aryanjsx/Locus/releases/latest): | Platform | File | |---|---| -| **Windows (64-bit)** | `Locus__x64-setup.exe` or `Locus__x64_en-US.msi` | -| **Windows (ARM64)** | `Locus__arm64-setup.exe` | -| **macOS (Apple Silicon and Intel)** | `Locus__universal.dmg` | -| **Linux** | `Locus__amd64.AppImage`, `.deb`, or `.rpm` | +| **Windows 10 and 11 (64-bit)** | `Locus__x64-setup.exe` or `Locus__x64_en-US.msi` | +| **Windows 11 on ARM** | `Locus__arm64-setup.exe` | +| **macOS 10.15 or later (Apple silicon and Intel)** | `Locus__universal.dmg` | +| **Linux (x86-64)** | `Locus__amd64.AppImage`, `.deb`, or `.rpm` | + +8 GB of memory is enough for a small model; 16 GB runs noticeably better ones. A graphics card helps but isn't required. On first launch, choose **Ollama** to run models on your PC (or point Locus at your own OpenAI-compatible server). Locus then sets itself up: it installs its private Python runtime, starts the bundled Ollama, and downloads a model sized for your RAM. You don't need to install git, Python, Rust, or Ollama yourself. First launch needs an internet connection and takes a few minutes; later launches start in seconds. diff --git a/docs/assets/favicon.svg b/docs/assets/favicon.svg new file mode 100644 index 0000000..7ba05ea --- /dev/null +++ b/docs/assets/favicon.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/docs/index.md b/docs/index.md index 881bf8c..9cda13a 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,225 +1,14 @@ --- title: Locus -description: Personal AI, On Personal Devices +description: A private AI assistant that runs on your computer. Free and open source for Windows, macOS and Linux. +template: home.html search: boost: 2 hide: - navigation + - toc --- -# Personal AI, On Personal Devices - -

-Locus is a research framework for composable, on-device AI systems. -Build personal AI that runs on your hardware. Cloud APIs are optional. -

- -
- -- :material-image-multiple:{ .lg .middle } **See what people use it for** - - --- - - A gallery of real setups — morning briefs that summarize your overnight Slack and email, a Discord companion that knows your calendar, a code reviewer that works at 30,000 feet. Outcome-first, with links to the docs that explain how to build each one. - - [:octicons-arrow-right-24: Browse the Showcase](showcase/index.md) - -
- ---- - -## Why Locus? - -Personal AI agents are exploding in popularity, but nearly all of them still route intelligence through cloud APIs. Your "personal" AI continues to depend on someone else's server. At the same time, [Intelligence Per Watt](https://www.intelligence-per-watt.ai/) research from Stanford's Hazy Research showed that local language models already handle 88.7% of single-turn chat and reasoning queries, with intelligence efficiency improving 5.3× from 2023 to 2025. The models and hardware are increasingly ready. What has been missing is the software stack to make local-first personal AI practical. - -Locus is that stack. It is a framework for local-first personal AI, built around three core ideas: shared primitives for building on-device agents; evaluations that treat energy, FLOPs, latency, and dollar cost as first-class constraints alongside accuracy; and a learning loop that improves models using local trace data. The goal is simple: make it possible to build personal AI agents that run locally by default, calling the cloud only when truly necessary. Locus aims to be both a research platform and a production foundation for local AI, in the spirit of PyTorch. - ---- - -## Get Started - -=== "Browser App" - - Run the full chat UI locally with one script: - - ```bash - git clone https://github.com/aryanjsx/Locus.git - cd Locus - ./scripts/quickstart.sh - ``` - - This installs dependencies, starts Ollama + a local model, launches the backend - and frontend, and opens `http://localhost:5173` in your browser. - -=== "Desktop App" - - The desktop app is a native window for the Locus UI. It runs everything - on your machine and sets itself up on first launch: its Python runtime, - the bundled Ollama, and a model sized for your RAM. - - Download and open the desktop app: - - [Download the desktop app](https://github.com/aryanjsx/Locus/releases/latest){ .md-button .md-button--primary } - - Available for macOS, Windows and Linux. See the [Downloads](downloads.md) page for which file to pick. - - The app connects to `http://localhost:8000` automatically. - - !!! warning "macOS first launch" - - Run `xattr -cr /Applications/Locus.app` if the app shows as "damaged". - -=== "Python SDK" - - ```python - from locus import Jarvis - - j = Jarvis() # auto-detect engine - response = j.ask("Explain quicksort.") - print(response) - ``` - - For more control, use `ask_full()` to get usage stats, model info, and tool results: - - ```python - result = j.ask_full( - "What is 2 + 2?", - agent="orchestrator", - tools=["calculator"], - ) - print(result["content"]) # "4" - print(result["tool_results"]) # [{tool_name: "calculator", ...}] - ``` - -=== "CLI" - - ```bash - locus ask "What is the capital of France?" - - locus ask --agent orchestrator --tools calculator "What is 137 * 42?" - - locus serve --port 8000 - - locus memory index ./docs/ - locus memory search "configuration options" - ``` - ---- - -## Five Primitives for Personal AI - -Locus is built around five composable layers. Each has a clean interface and can be swapped independently. - -1. **Intelligence** — Pick a model, or let Locus pick one for your hardware. Manages the full catalog of local models across providers. -2. **Engine** — The inference runtime: [Ollama](https://ollama.com), [vLLM](https://github.com/vllm-project/vllm), [SGLang](https://github.com/sgl-project/sglang), [llama.cpp](https://github.com/ggerganov/llama.cpp), cloud APIs, and more. Auto-detects your hardware and recommends the best fit. -3. **Agents** — Multi-step reasoning with tool use. Eight built-in agent types from simple chat to orchestrated workflows. -4. **Tools & Memory** — Web search, calculator, file I/O, code interpreter, retrieval, persistent local state, and any external MCP server. -5. **Learning** — Your AI gets better over time. Every interaction generates traces that drive automatic improvements to model weights, prompts, and agent behavior. - ---- - -## Key Features - -
- -- **10+ Engine Backends** - - --- - - [Ollama](https://ollama.com), [vLLM](https://github.com/vllm-project/vllm), [SGLang](https://github.com/sgl-project/sglang), [llama.cpp](https://github.com/ggerganov/llama.cpp), [MLX](https://github.com/ml-explore/mlx), [Exo](https://github.com/exo-explore/exo), [LiteLLM](https://github.com/BerriAI/litellm), cloud (OpenAI/Anthropic/Google), and more. Same `InferenceEngine` interface, swap freely. - -- **Automated Workflows** - - --- - - Cron-based agents that monitor, summarize, and act. Code review, email triage, research digests — running 24/7 on your hardware. - -- **Hardware-Aware** - - --- - - Auto-detects GPU vendor, model, and VRAM. Recommends the optimal engine for your hardware. - -- **Offline-First** - - --- - - All core functionality works without a network connection. Cloud APIs are optional extras. - -- **OpenAI-Compatible API** - - --- - - `locus serve` starts a FastAPI server with SSE streaming. Drop-in replacement for OpenAI clients. - -- **Energy & Cost Tracking** - - --- - - Built-in telemetry for GPU power draw, token costs, and latency. See exactly what each query costs in watts and dollars. - -
- ---- - -## Documentation - -
- -- **[Getting Started](getting-started/installation.md)** - - --- - - Install Locus, configure your first engine, and run your first query. - -- **[User Guide](user-guide/cli.md)** - - --- - - CLI, Python SDK, and guides for [Morning Digest](user-guide/morning-digest.md), [Deep Research](user-guide/deep-research.md), [Code Assistant](user-guide/code-assistant.md), [Scheduled Monitor](user-guide/scheduled-monitor.md), [Simple Chat](user-guide/chat-simple.md), [Evaluations](user-guide/evaluations.md), agents, memory, tools, and telemetry. - -- **[Architecture](architecture/overview.md)** - - --- - - Five-primitive design, registry pattern, query flow, and cross-cutting learning. - -- **[API Reference](api-reference/locus/index.md)** - - --- - - Auto-generated reference for every module. - -- **[Deployment](deployment/docker.md)** - - --- - - Docker, systemd, launchd. GPU-accelerated container images. - -- **[Development](development/contributing.md)** - - --- - - Contributing guide, extension patterns, roadmap, and changelog. - -
- -## Acknowledgments - -Locus is a modified version of [OpenJarvis](https://github.com/open-jarvis/OpenJarvis), an open-source framework for local-first personal AI developed at [Hazy Research](https://hazyresearch.stanford.edu/) and the [Scaling Intelligence Lab](https://scalingintelligence.stanford.edu/) at [Stanford SAIL](https://ai.stanford.edu/) as part of [Intelligence Per Watt](https://www.intelligence-per-watt.ai/). OpenJarvis is licensed under Apache 2.0; see [NOTICE](https://github.com/aryanjsx/Locus/blob/main/NOTICE) for details. Locus is an independent project and is not affiliated with or endorsed by Stanford or the OpenJarvis authors. - -If you use the underlying research, please cite the OpenJarvis paper: - -```bibtex -@misc{saadfalcon2026openjarvispersonalaipersonal, - title={OpenJarvis: Personal AI, On Personal Devices}, - author={Jon Saad-Falcon and Avanika Narayan and Robby Manihani and Tanvir Bhathal and Herumb Shandilya and Hakki Orhun Akengin and Gabriel Bo and Andrew Park and Matthew Hart and Caia Costello and Chuan Li and Christopher Ré and Azalia Mirhoseini}, - year={2026}, - eprint={2605.17172}, - archivePrefix={arXiv}, - primaryClass={cs.LG}, - url={https://arxiv.org/abs/2605.17172}, -} -``` - -Read the [OpenJarvis project site](https://openjarvis.stanford.edu/) for the original research motivation, architecture details, and experimental results. +Locus is a free, open-source AI assistant that runs language models on your +own computer, for Windows, macOS and Linux. Download the desktop app, choose +Ollama on first launch, and Locus sets up everything else itself. diff --git a/docs/javascripts/home.js b/docs/javascripts/home.js new file mode 100644 index 0000000..fc23cd8 --- /dev/null +++ b/docs/javascripts/home.js @@ -0,0 +1,200 @@ +/* Landing page download links. + * + * Reads the latest desktop release from the GitHub API and points every + * download link straight at its installer, so the browser starts the download + * without opening the release page. The primary button gets the installer for + * the visitor's system. Without JavaScript, or if the API is unavailable, the + * links keep their fallback: the latest release page. + */ +(function () { + "use strict"; + + var REPO = "aryanjsx/Locus"; + var CACHE_KEY = "locus-latest-desktop-release"; + var CACHE_MS = 10 * 60 * 1000; + + // Installer file names follow Tauri's conventions, e.g. + // Locus_1.0.5_x64-setup.exe or Locus-1.0.5-1.x86_64.rpm. + var ASSETS = { + "win-x64": { pattern: /_x64-setup\.exe$/i, label: "Download for Windows", system: "Windows 10 and 11, 64-bit" }, + "win-msi": { pattern: /_x64_[a-z-]+\.msi$/i }, + "win-arm64": { pattern: /_arm64-setup\.exe$/i, label: "Download for Windows on ARM", system: "Windows 11 on ARM" }, + "mac": { pattern: /_universal\.dmg$/i, label: "Download for macOS", system: "macOS 10.15 or later" }, + "linux-appimage": { pattern: /_amd64\.AppImage$/i, label: "Download for Linux", system: "Linux, x86-64 AppImage" }, + "linux-deb": { pattern: /_amd64\.deb$/i }, + "linux-rpm": { pattern: /\.x86_64\.rpm$/i }, + }; + + function formatSize(bytes) { + return bytes >= 1024 * 1024 * 1024 + ? (bytes / (1024 * 1024 * 1024)).toFixed(1) + " GB" + : Math.round(bytes / (1024 * 1024)) + " MB"; + } + + function versionOf(release) { + return release.tag_name.replace(/^desktop-v/, ""); + } + + // Published desktop releases, newest first. CLI-only tags and the rolling + // pre-release channels (desktop-edge, desktop-latest) are skipped. + function fetchReleases() { + try { + var cached = JSON.parse(sessionStorage.getItem(CACHE_KEY) || "null"); + if (cached && Date.now() - cached.at < CACHE_MS) return Promise.resolve(cached.releases); + } catch (e) { + /* storage unavailable: fetch instead */ + } + return fetch("https://api.github.com/repos/" + REPO + "/releases?per_page=20", { + headers: { Accept: "application/vnd.github+json" }, + }) + .then(function (resp) { + if (!resp.ok) throw new Error("GitHub API returned " + resp.status); + return resp.json(); + }) + .then(function (releases) { + var slim = releases + .filter(function (r) { + return !r.draft && !r.prerelease && /^desktop-v\d/.test(r.tag_name); + }) + .map(function (r) { + return { + tag_name: r.tag_name, + html_url: r.html_url, + published_at: r.published_at, + assets: r.assets.map(function (a) { + return { name: a.name, size: a.size, url: a.browser_download_url }; + }), + }; + }); + if (!slim.length) throw new Error("No desktop release published yet"); + try { + sessionStorage.setItem(CACHE_KEY, JSON.stringify({ at: Date.now(), releases: slim })); + } catch (e) { + /* not cached; fine */ + } + return slim; + }); + } + + // Best guess at the visitor's installer. Windows on ARM can only be told + // apart through User-Agent Client Hints (Chromium browsers). + function detectSystem() { + var uaData = navigator.userAgentData; + var platform = ((uaData && uaData.platform) || navigator.platform || "").toLowerCase(); + var ua = navigator.userAgent.toLowerCase(); + + if (/android|iphone|ipad|ipod/.test(ua) || (uaData && uaData.mobile)) { + return Promise.resolve("mobile"); + } + if (platform.indexOf("win") === 0 || ua.indexOf("windows") !== -1) { + if (uaData && uaData.getHighEntropyValues) { + return uaData + .getHighEntropyValues(["architecture"]) + .then(function (v) { + return v.architecture === "arm" ? "win-arm64" : "win-x64"; + }) + .catch(function () { + return "win-x64"; + }); + } + return Promise.resolve(/arm64|aarch64/.test(ua) ? "win-arm64" : "win-x64"); + } + if (platform.indexOf("mac") === 0 || ua.indexOf("mac os") !== -1) return Promise.resolve("mac"); + if (platform.indexOf("linux") !== -1 || ua.indexOf("linux") !== -1) return Promise.resolve("linux-appimage"); + return Promise.resolve(null); + } + + // The newest installer for `key`. If the latest release is missing one + // platform (its build failed, say), fall back to the newest release that + // has it, so the link is still a direct download. + function findAsset(releases, key) { + var pattern = ASSETS[key] && ASSETS[key].pattern; + if (!pattern) return null; + for (var i = 0; i < releases.length; i++) { + var asset = releases[i].assets.find(function (a) { + return pattern.test(a.name); + }); + if (asset) return { asset: asset, release: releases[i] }; + } + return null; + } + + function fillTable(releases, yours) { + var latest = releases[0]; + document.querySelectorAll("[data-asset]").forEach(function (row) { + var key = row.getAttribute("data-asset"); + var found = findAsset(releases, key); + var link = row.querySelector("[data-link]"); + var size = row.querySelector("[data-size]"); + row.classList.toggle("is-yours", key === yours); + if (found) { + link.href = found.asset.url; + link.textContent = "Download"; + link.setAttribute("aria-label", "Download " + found.asset.name); + size.textContent = formatSize(found.asset.size); + if (found.release !== latest) size.textContent += " · version " + versionOf(found.release); + row.querySelector("[data-name]").title = found.asset.name; + } else { + size.textContent = "Not available yet"; + link.href = latest.html_url; + link.textContent = "See release"; + } + }); + + var line = document.querySelector("[data-release-line]"); + if (line) { + var date = new Date(latest.published_at).toLocaleDateString(undefined, { + year: "numeric", month: "long", day: "numeric", + }); + line.textContent = "Version " + versionOf(latest) + ", released " + date + "."; + } + } + + function fillPrimary(releases, yours) { + var button = document.querySelector("[data-download-primary]"); + var label = document.querySelector("[data-download-label]"); + var meta = document.querySelector("[data-download-meta]"); + if (!button) return; + + var found = yours && findAsset(releases, yours); + if (yours === "mobile") { + label.textContent = "See desktop downloads"; + button.href = "#download"; + var other = document.querySelector(".lx-get .lx-button--quiet"); + if (other) other.hidden = true; + meta.textContent = "Locus is a desktop app for Windows, macOS and Linux."; + return; + } + if (!found) { + label.textContent = "Choose your download"; + button.href = "#download"; + meta.textContent = "Version " + versionOf(releases[0]) + " · free · no account needed"; + return; + } + button.href = found.asset.url; + label.textContent = ASSETS[yours].label; + meta.textContent = + "Version " + versionOf(found.release) + " · " + formatSize(found.asset.size) + " · " + + ASSETS[yours].system; + } + + function init() { + if (!document.querySelector("[data-download]")) return; + Promise.all([fetchReleases(), detectSystem()]) + .then(function (results) { + fillPrimary(results[0], results[1]); + fillTable(results[0], results[1]); + }) + .catch(function () { + // Keep the fallback links to the latest release page. + var meta = document.querySelector("[data-download-meta]"); + if (meta) meta.textContent = "Free · opens the latest release on GitHub"; + }); + } + + if (document.readyState === "loading") { + document.addEventListener("DOMContentLoaded", init); + } else { + init(); + } +})(); diff --git a/docs/overrides/home.html b/docs/overrides/home.html new file mode 100644 index 0000000..4ba9031 --- /dev/null +++ b/docs/overrides/home.html @@ -0,0 +1,254 @@ +{% extends "main.html" %} + +{#- The landing page. It keeps Material's (title, meta, search index) + but replaces the header, tabs, body and footer with its own markup, and + loads no web fonts: system fonts only, so the page talks to nobody but + GitHub (for the download links). -#} + +{% block htmltitle %} + Locus: a private AI assistant that runs on your computer +{% endblock %} + +{% block fonts %}{% endblock %} + +{% block extrahead %} + {{ super() }} + + + + + +{% endblock %} + +{% block header %} + Skip to content +
+ +
+{% endblock %} + +{% block tabs %}{% endblock %} +{% block site_nav %}{% endblock %} +{% block footer %}{% endblock %} + +{% block container %} +
+ +
+
+

Free and open source · Windows, macOS, Linux

+

An AI assistant that runs on your computer, not someone else's.

+

+ Locus runs language models on your own machine. Ask it questions, + have it read your notes and documents, or set it to send you a + briefing every morning. Nothing leaves your computer unless you + connect a service yourself. +

+ + +

Free · no account needed

+
+ +
+
+ + Locus + On this computer · qwen3.5:4b +
+
+

What did I write down about the lease renewal?

+
+

Two notes mention it. In Apartment.md (March 3) you wrote that + the landlord offered 12 months at the same rent if you sign by April 15. + In To do.md you added “ask about parking spot” next to it.

+

Read from your Obsidian vault · nothing sent online

+
+

Remind me on April 10.

+
+

Done. I'll message you on Telegram at 9:00 on April 10.

+
+
+
Illustration. Answers depend on the model and the sources you connect.
+
+
+ +
+

What you can use it for

+

Locus is one app with a few jobs. Each works with a model on + your machine; cloud models are there only if you add your own API key.

+
+
+

Ask and write

+
    +
  • explain this error message
  • +
  • rewrite this email so it's shorter
  • +
  • what's the difference between TCP and UDP
  • +
+

Type or talk to it. It can read answers aloud.

+
+
+

Your files and notes

+
    +
  • find the PDF about my car insurance
  • +
  • summarize the meeting notes from last week
  • +
  • what did I decide about the kitchen paint
  • +
+

Indexes folders, PDFs, Obsidian, Notion, Google Drive and more, on your machine.

+
+
+

Things on a schedule

+
    +
  • a morning briefing from email, calendar and news
  • +
  • a research report with sources, while you're away
  • +
  • a check on a web page every hour
  • +
+

Get the results in the app, or on Telegram, Slack, Discord or email.

+
+
+
+ +
+
+

Install it like any other app

+

You don't need Python, Ollama or any developer tools. Locus + sets itself up the first time it opens.

+
    +
  1. + 1 +

    Download and open it

    +

    One installer for your system. The download button above picks the right one.

    +
  2. +
  3. + 2 +

    Choose where models run

    +

    Pick Ollama to run them on this computer, or point Locus at a server you + already use, like LM Studio.

    +
  4. +
  5. + 3 +

    Wait a few minutes, once

    +

    Locus installs what it needs and downloads a model that fits your memory. After + that it starts in seconds.

    +
  6. +
+
+
+ +
+
+

Private because it's local

+

Most assistants are a chat box connected to a company's + servers. Locus keeps the model, your documents and your history on your own disk.

+
+
+
Runs on your machine
Models run through Ollama or another local engine. Cloud models are opt-in.
+
No analytics
Locus ships with no analytics destination, so nothing about your use is sent anywhere.
+
You choose what it can see
Email, calendar and chat apps are off until you connect them, one by one.
+
It asks before risky actions
Running shell commands and similar tools needs your approval first.
+
+
+ +
+
+

Download

+

The latest version for every platform.

+ +
+ + + + + + + + + + + + + +
SystemFileSizeLink
Windows 10 and 11 64-bit (Intel or AMD)Installer (.exe)–Download
Windows 10 and 11 64-bit, for IT deploymentInstaller (.msi)–Download
Windows 11 on ARM Snapdragon laptopsInstaller (.exe)–Download
macOS 10.15 or later Apple silicon and IntelDisk image (.dmg)–Download
Linux any distribution, x86-64AppImage–Download
Ubuntu, Debian x86-64Package (.deb)–Download
Fedora, RHEL x86-64Package (.rpm)–Download
+
+ +
+
+

Before you install

+

The installers aren't code-signed yet, so your system will warn you the first + time. On Windows, choose More info → Run anyway. On a Mac, + right-click Locus and choose Open.

+

8 GB of memory is enough for a small model; 16 GB runs noticeably better ones. + A graphics card helps but isn't required.

+
+
+

Prefer the command line?

+

macOS, Linux and WSL2:

+
curl -fsSL https://aryanjsx.github.io/Locus/install.sh | bash
+

Windows PowerShell:

+
irm https://aryanjsx.github.io/Locus/install.ps1 | iex
+

Or pip install locus-assistant. See the + installation guide.

+
+
+
+
+ +
+

Documentation

+ +
+ +
+ + +{% endblock %} + +{#- Material's bundle drives search, tabs and the sidebar, none of which this + page has (it fails looking for the header). The colour scheme is set by an + inline script in Material's base template, so it still applies. -#} +{% block scripts %} + +{% endblock %} diff --git a/docs/stylesheets/home.css b/docs/stylesheets/home.css new file mode 100644 index 0000000..6491f99 --- /dev/null +++ b/docs/stylesheets/home.css @@ -0,0 +1,327 @@ +/* Landing page (docs/overrides/home.html). Self-contained: system fonts only, + and every rule is scoped to .lx* classes so the docs pages are unaffected. */ + +body:has(.lx) { + --lx-paper: #f5f3ee; + --lx-panel: #fffdf8; + --lx-band: #ebe7de; + --lx-ink: #1d1c1a; + --lx-muted: #625e56; + --lx-line: #d9d4c9; + --lx-accent: #b9481f; + --lx-accent-ink: #ffffff; + --lx-ok: #2f6b4f; + + --lx-serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif; + --lx-sans: system-ui, "Segoe UI", -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif; + --lx-mono: ui-monospace, "Cascadia Mono", "Cascadia Code", Consolas, "SF Mono", Menlo, monospace; + + --lx-wrap: 1080px; + --lx-radius: 6px; + + /* Material lays out as a flex row; this page is a plain column. */ + display: block; + margin: 0; + background: var(--lx-paper); + color: var(--lx-ink); + font: 1.0625rem/1.6 var(--lx-sans); + -webkit-font-smoothing: antialiased; +} + +body[data-md-color-scheme="slate"]:has(.lx) { + --lx-paper: #141412; + --lx-panel: #1c1b19; + --lx-band: #1a1917; + --lx-ink: #ece9e2; + --lx-muted: #a39e94; + --lx-line: #2f2d29; + --lx-accent: #e06a3b; + --lx-accent-ink: #141412; + --lx-ok: #7fbf9c; +} + +/* Material sizes everything from html { font-size: 125% }; undo it here. */ +html:has(.lx) { font-size: 100%; scroll-padding-top: 1rem; } + +/* The page renders inside Material's content grid; make it a plain column. */ +body:has(.lx) .md-container, +body:has(.lx) .md-main, +body:has(.lx) .md-main__inner { + display: block; + max-width: none; + margin: 0; + padding: 0; +} + +.lx a, +.lx-header a, +.lx-footer a { + color: inherit; + text-decoration-thickness: 1px; + text-underline-offset: 0.18em; +} +.lx a:hover, +.lx-header a:hover, +.lx-footer a:hover { color: var(--lx-accent); } +.lx :focus-visible, +.lx-header :focus-visible, +.lx-footer :focus-visible { + outline: 2px solid var(--lx-accent); + outline-offset: 3px; + border-radius: 2px; +} + +.lx h1, +.lx h2, +.lx h3 { + font-family: var(--lx-serif); + font-weight: 600; + line-height: 1.15; + letter-spacing: normal; + color: inherit; + margin: 0; +} +.lx h1 { font-size: clamp(2.2rem, 4.6vw, 3.4rem); letter-spacing: -0.01em; } +.lx h2 { font-size: clamp(1.7rem, 3vw, 2.2rem); } +.lx h3 { font-size: 1.15rem; } +.lx p { margin: 0; } +.lx ul, +.lx ol, +.lx dl { margin: 0; padding: 0; list-style: none; } + +.lx-wrap { max-width: var(--lx-wrap); margin: 0 auto; padding: 0 1.5rem; } +.lx-sr { + position: absolute; width: 1px; height: 1px; overflow: hidden; + clip: rect(0 0 0 0); white-space: nowrap; +} + +.lx-skip { + position: absolute; left: 1rem; top: -3rem; z-index: 10; + background: var(--lx-ink); color: var(--lx-paper); padding: 0.5rem 0.9rem; +} +.lx-skip:focus { top: 1rem; } + +/* ---------- header ---------- */ + +.lx-header { border-bottom: 1px solid var(--lx-line); } +.lx-header__inner { + display: flex; align-items: center; justify-content: space-between; + gap: 1rem; flex-wrap: wrap; padding-top: 1rem; padding-bottom: 1rem; +} +.lx-brand { + display: inline-flex; align-items: center; gap: 0.55rem; + font-family: var(--lx-serif); font-size: 1.35rem; font-weight: 600; + text-decoration: none; +} +.lx-brand__mark { width: 1.6rem; height: 1.6rem; } +.lx-brand__dot { fill: var(--lx-accent); } +.lx-nav { + display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 1.4rem; + margin: 0; padding: 0; list-style: none; font-size: 0.95rem; +} +.lx-nav a { text-decoration: none; color: var(--lx-muted); } +.lx-nav a:hover { color: var(--lx-ink); } +.lx-nav .lx-nav__download { + color: var(--lx-ink); + border: 1px solid var(--lx-line); + border-radius: var(--lx-radius); + padding: 0.3rem 0.75rem; +} + +/* ---------- hero ---------- */ + +.lx-hero { + display: grid; grid-template-columns: 1.05fr 1fr; gap: 3.5rem; + align-items: center; padding-top: 4.5rem; padding-bottom: 4.5rem; +} +.lx-eyebrow { + font-size: 0.85rem; letter-spacing: 0.04em; text-transform: uppercase; + color: var(--lx-muted); margin-bottom: 1.1rem !important; +} +.lx-lede { + font-size: 1.2rem; color: var(--lx-muted); max-width: 34rem; + margin-top: 1.25rem !important; +} + +.lx-get { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; } +.lx-button { + display: inline-flex; align-items: center; gap: 0.55rem; + padding: 0.8rem 1.25rem; border-radius: var(--lx-radius); + font-weight: 600; font-size: 1rem; text-decoration: none; + border: 1px solid transparent; + transition: background-color 0.15s, border-color 0.15s; +} +.lx-button svg { width: 1.15rem; height: 1.15rem; flex: none; } +.lx .lx-button--primary { background: var(--lx-accent); color: var(--lx-accent-ink); } +.lx .lx-button--primary:hover { color: var(--lx-accent-ink); filter: brightness(1.08); } +.lx .lx-button--quiet { border-color: var(--lx-line); color: var(--lx-ink); } +.lx .lx-button--quiet:hover { border-color: var(--lx-muted); color: var(--lx-ink); } +.lx-get__meta { margin-top: 0.85rem !important; font-size: 0.9rem; color: var(--lx-muted); } + +/* The app illustration. Built in HTML, not a screenshot, so it reads well in + both colour schemes and at any size. */ +.lx-window { + margin: 0; background: var(--lx-panel); + border: 1px solid var(--lx-line); border-radius: 10px; + box-shadow: 0 1px 0 var(--lx-line), 0 18px 40px -24px rgba(0, 0, 0, 0.35); + overflow: hidden; +} +.lx-window__bar { + display: flex; align-items: center; gap: 0.75rem; + padding: 0.6rem 0.9rem; border-bottom: 1px solid var(--lx-line); + font-size: 0.8rem; color: var(--lx-muted); +} +.lx-window__dots { display: inline-flex; gap: 0.35rem; } +.lx-window__dots i { + width: 0.6rem; height: 0.6rem; border-radius: 50%; + background: var(--lx-line); display: block; +} +.lx-window__title { font-weight: 600; color: var(--lx-ink); } +.lx-window__status { margin-left: auto; display: inline-flex; align-items: center; gap: 0.4rem; } +.lx-dot { width: 0.45rem; height: 0.45rem; border-radius: 50%; background: var(--lx-ok); } +.lx-window__body { padding: 1.2rem 1.1rem 1.3rem; display: grid; gap: 0.85rem; font-size: 0.95rem; } +.lx-msg { max-width: 88%; line-height: 1.5; } +.lx-msg p + p { margin-top: 0.45rem; } +.lx-msg--you { + justify-self: end; background: color-mix(in srgb, var(--lx-ink) 8%, var(--lx-panel)); + padding: 0.55rem 0.8rem; border-radius: 10px 10px 2px 10px; +} +.lx-msg--locus { justify-self: start; } +.lx-msg__source { font-size: 0.78rem; color: var(--lx-muted); } +.lx-window figcaption { + font-size: 0.75rem; color: var(--lx-muted); + padding: 0.55rem 0.9rem; border-top: 1px solid var(--lx-line); +} + +/* ---------- sections ---------- */ + +.lx-section { padding-top: 4.5rem; padding-bottom: 4.5rem; } +.lx-section--band { + background: var(--lx-band); + border-top: 1px solid var(--lx-line); border-bottom: 1px solid var(--lx-line); +} +.lx-section__lede { + color: var(--lx-muted); max-width: 40rem; margin-top: 0.75rem !important; + font-size: 1.1rem; +} + +.lx-columns { + display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.5rem; margin-top: 2.5rem; +} +.lx-examples { margin-top: 0.9rem !important; display: grid; gap: 0.45rem; } +.lx-examples li { + font-family: var(--lx-mono); font-size: 0.88rem; + padding: 0.45rem 0.65rem; background: var(--lx-panel); + border: 1px solid var(--lx-line); border-radius: var(--lx-radius); +} +.lx-columns__note { margin-top: 0.9rem !important; font-size: 0.92rem; color: var(--lx-muted); } + +.lx-steps { + display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.5rem; margin-top: 2.5rem !important; + counter-reset: none; +} +.lx-steps li { position: relative; padding-top: 2.6rem; } +.lx-steps__n { + position: absolute; top: 0; left: 0; + font-family: var(--lx-serif); font-size: 1.6rem; font-weight: 600; color: var(--lx-accent); +} +.lx-steps p { color: var(--lx-muted); margin-top: 0.5rem !important; } + +.lx-split { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 3.5rem; align-items: start; } +.lx-facts { display: grid; gap: 0; border-top: 1px solid var(--lx-line); } +.lx-facts > div { + display: grid; grid-template-columns: 13rem 1fr; gap: 1rem; + padding: 1rem 0; border-bottom: 1px solid var(--lx-line); +} +.lx-facts dt { font-weight: 600; } +.lx-facts dd { margin: 0; color: var(--lx-muted); } + +/* ---------- downloads ---------- */ + +.lx-table-wrap { overflow-x: auto; margin-top: 2rem; } +.lx-downloads { + width: 100%; border-collapse: collapse; font-size: 0.97rem; + background: var(--lx-panel); border: 1px solid var(--lx-line); border-radius: var(--lx-radius); +} +.lx-downloads th, +.lx-downloads td { + text-align: left; padding: 0.8rem 1rem; border-bottom: 1px solid var(--lx-line); + vertical-align: middle; +} +.lx-downloads thead th { + font-size: 0.8rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; + color: var(--lx-muted); +} +.lx-downloads tbody tr:last-child > * { border-bottom: 0; } +.lx-downloads tbody th { font-weight: 600; } +.lx-downloads tbody th span { display: block; font-weight: 400; font-size: 0.85rem; color: var(--lx-muted); } +.lx-downloads td[data-size] { color: var(--lx-muted); white-space: nowrap; font-variant-numeric: tabular-nums; } +.lx-downloads td:last-child { text-align: right; } +.lx-downloads tr.is-yours { background: color-mix(in srgb, var(--lx-accent) 8%, transparent); } +.lx-downloads tr.is-yours th::after { + content: "Your system"; display: inline-block; margin-left: 0.6rem; + font-size: 0.72rem; font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase; + color: var(--lx-accent); vertical-align: 0.12em; +} +.lx-downloads a { font-weight: 600; } + +.lx-notes { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; margin-top: 2.5rem; } +.lx-notes p { color: var(--lx-muted); margin-top: 0.6rem !important; } +.lx-notes b { color: var(--lx-ink); } +.lx pre { + margin: 0.45rem 0 0; padding: 0.7rem 0.85rem; overflow-x: auto; + background: var(--lx-panel); border: 1px solid var(--lx-line); border-radius: var(--lx-radius); +} +.lx code { font-family: var(--lx-mono); font-size: 0.86rem; color: var(--lx-ink); } +.lx p code { + background: var(--lx-panel); border: 1px solid var(--lx-line); + border-radius: 4px; padding: 0.05rem 0.3rem; +} + +/* ---------- docs list ---------- */ + +.lx-docs { + display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: 1.75rem !important; + border-top: 1px solid var(--lx-line); +} +.lx-docs a { + display: grid; gap: 0.2rem; padding: 1.1rem 1.25rem 1.1rem 0; + border-bottom: 1px solid var(--lx-line); text-decoration: none; height: 100%; +} +.lx-docs a span { color: var(--lx-muted); font-size: 0.93rem; } +.lx-docs b { font-family: var(--lx-serif); font-size: 1.1rem; } + +/* ---------- footer ---------- */ + +.lx-footer { border-top: 1px solid var(--lx-line); font-size: 0.92rem; color: var(--lx-muted); } +.lx-footer__inner { + display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem 2rem; + padding-top: 2rem; padding-bottom: 2.5rem; +} +.lx-footer__inner p { max-width: 36rem; margin: 0; } +.lx-footer__links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; margin: 0; padding: 0; list-style: none; } + +/* ---------- small screens ---------- */ + +@media (max-width: 860px) { + .lx-hero, + .lx-split, + .lx-notes { grid-template-columns: 1fr; gap: 2.5rem; } + .lx-hero { padding-top: 3rem; padding-bottom: 3rem; } + .lx-columns, + .lx-steps, + .lx-docs { grid-template-columns: 1fr; gap: 2rem; } + .lx-docs { gap: 0; } + .lx-facts > div { grid-template-columns: 1fr; gap: 0.25rem; } + .lx-section { padding-top: 3.25rem; padding-bottom: 3.25rem; } +} + +@media (max-width: 560px) { + .lx-nav li:not(:last-child):not(:nth-last-child(2)) { display: none; } + .lx-downloads th:nth-child(2), + .lx-downloads td:nth-child(2) { display: none; } +} + +@media (prefers-reduced-motion: reduce) { + .lx-button { transition: none; } +} diff --git a/mkdocs.yml b/mkdocs.yml index c0c2bac..235bf67 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -11,6 +11,7 @@ copyright: Copyright © 2026 Locus Contributors theme: name: material custom_dir: docs/overrides + favicon: assets/favicon.svg language: en font: text: Georgia @@ -133,8 +134,6 @@ extra_javascript: - javascripts/docsearch-init.js extra: - version: - default: v1.0.0 algolia: app_id: "" # Fill after DocSearch approval api_key: "" # Search-only key