From 580a9f8b1656310374426b8bbf9e9f8a1e60c1b4 Mon Sep 17 00:00:00 2001 From: Mohamed Mansour Date: Sat, 7 Mar 2026 02:09:20 -0800 Subject: [PATCH] Redesign docs with Copilot-inspired theme and update content - Add custom VitePress theme with raised content panel layout - Colors sampled from copilot.microsoft.com (warm stone/cream light, midnight navy dark) - Floating content card with rounded corners, shadow, and scrollbar inside panel - Frosted glass navbar, compact sidebar, responsive mobile layout - Mobile nav as top drawer, sidebar peek tab at bottom-left - Remove sidebar file list from playground, add tab-bar + and close buttons - Add syntax highlighting for light mode (defaultHighlightStyle) - Rewrite homepage features with accurate project descriptions - Rewrite guide introduction with architecture diagram - Update README with refined messaging and language list - Remove footer, hide VPLocalNav on desktop, disable aside/outline --- README.md | 14 +- docs/.vitepress/components/Playground.vue | 164 +++--- docs/.vitepress/config.js | 3 + docs/.vitepress/theme/custom.css | 619 ++++++++++++++++++++++ docs/.vitepress/theme/index.js | 6 + docs/guide/index.md | 77 ++- docs/index.md | 52 +- 7 files changed, 786 insertions(+), 149 deletions(-) create mode 100644 docs/.vitepress/theme/custom.css create mode 100644 docs/.vitepress/theme/index.js diff --git a/README.md b/README.md index d6fb63ed..59e8ebdb 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,18 @@ # WebUI -A high-performance server-side rendering framework built with Rust. No JavaScript runtime required. +Web rendering without a JavaScript runtime. Compile templates to binary. Serve them instantly from any backend. -**πŸ“– Documentation & Usage β†’ [microsoft.github.io/webui](https://microsoft.github.io/webui)** +WebUI is a high-performance server-side rendering framework built in Rust. It compiles HTML templates into a Protocol Buffer binary at build time, separating static structure from dynamic content. At runtime, your backend (Rust, Node, Bun, Deno, C#, Python, Go β€” or any language via FFI) simply fills in state data and gets rendered HTML back. No template parsing, no JS runtime, minimal work. + +**πŸ“– Documentation β†’ [microsoft.github.io/webui](https://microsoft.github.io/webui)** + +### Highlights + +- **Compiled to binary** β€” Templates are parsed once at build time into a compact protobuf protocol. Runtime just applies state. +- **Language agnostic** β€” Native support for Rust, Node/Bun/Deno, C#, Python, Go. Any other language via the C FFI. +- **Web Components** β€” Built on native web components with Shadow DOM encapsulation. +- **Server-side logic** β€” Conditionals and expressions evaluated on the server, not in the browser. +- **Plugin system** β€” Parser and handler plugins for hydration, adding reactivity to interactive islands, custom directives, and framework-specific behavior. ## Install diff --git a/docs/.vitepress/components/Playground.vue b/docs/.vitepress/components/Playground.vue index 48c08f64..110aa69f 100644 --- a/docs/.vitepress/components/Playground.vue +++ b/docs/.vitepress/components/Playground.vue @@ -70,9 +70,6 @@ function selectFile(name) { } function openNewFileInput() { - if (isMobileViewport()) { - mobileSidebarOpen.value = true - } showNewFileInput.value = true nextTick(() => { if (newFileInput.value) { @@ -136,7 +133,7 @@ async function setupEditor() { const { EditorState } = await import('@codemirror/state') const { defaultKeymap, history, historyKeymap } = await import('@codemirror/commands') const { oneDark } = await import('@codemirror/theme-one-dark') - const { bracketMatching } = await import('@codemirror/language') + const { bracketMatching, syntaxHighlighting, defaultHighlightStyle } = await import('@codemirror/language') const lang = getLanguage(activeFile.value) let langExt @@ -208,7 +205,7 @@ async function setupEditor() { bracketMatching(), keymap.of([...defaultKeymap, ...historyKeymap]), langExt, - ...(isDark ? [oneDark] : []), + ...(isDark ? [oneDark] : [syntaxHighlighting(defaultHighlightStyle, { fallback: true })]), updateListener, editorTheme, ], @@ -264,7 +261,6 @@ async function render() { const bodyBg = readThemeVar('--vp-c-bg', '#ffffff') const bodyText = readThemeVar('--vp-c-text-1', '#213547') const border = readThemeVar('--vp-c-divider', '#e2e2e3') - const heading = readThemeVar('--vp-c-text-1', '#213547') const mono = readThemeVar('--vp-font-family-mono', "'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace") const base = readThemeVar('--vp-font-family-base', "Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif") @@ -275,32 +271,24 @@ async function render() { @@ -379,68 +367,9 @@ onUnmounted(() => {