01 · Template gallery模板画廊

Fourteen templates,
drawn in glass.
十四张模板,
画在玻璃上。


Every diagram genre glass-design ships as a copy-ready template — from architecture, flow and sequence to SoC block, timing waveform, ring buffer and scheduler timeline. Paste one into a glass page, drop the preview style, and the page's tokens take over both themes. glass-design 把每种图型都做成可直接复制的模板——从架构、流程、时序,到 SoC 框图、时序波形、环形缓冲、调度时间线。把它贴进 glass 页面、删掉预览样式,页面的 token 就会接管双主题配色。

02 · Featured主图

The architecture template. 架构模板。

03 · The classic six经典六张

Six genres, one material. 六种图型,一种材质。

templates/diagrams/flow.svg
App SDK Edge batch Region log emit + tag 4ms window at-least-once EVENT LEAVES THE PROCESS IN UNDER 1MS BACKPRESSURE FLOWS RIGHT TO LEFT
Three nodes and two cyan hops — the smallest flow that still says where energy goes. Start here for any left-to-right pipeline. 三个节点、两段 cyan 连线——能说清能量去向的最小流程图。任何从左到右的管线都从它起步。
templates/diagrams/sequence.svg
Client Planner Regions ×6 SQL scatter ×6 partials 38MS P99 merge + sort
Lifelines are hairlines, the reply is dashed, and the one accent label marks the latency that matters. 生命线就是发丝线,回包用虚线,唯一的 accent 标签标出真正要紧的延迟。
templates/diagrams/state-machine.svg
baseline candidate firing resolved 3σ × 4MIN HUMAN PAGED BACK IN BAND RELEARN
Pill-shaped states, dashed return edges, mono guards on every transition — only the firing state takes the strong stroke. 药丸形状态、虚线回边、每条迁移都带 mono 守卫——只有 firing 态拿到强描边。
templates/diagrams/timeline.svg
T+0 T+15M T+45M T+90M canary 1% wave 25% wave 75% full fleet auto-diff vs baseline error budget watch latency gate marker on charts ANY GATE FAILS → AUTO-ROLLBACK IN 40S
One hairline, four stops; the cyan tick marks the moment a human last touched it. 一条发丝线、四个停靠点;cyan 刻度标记人手最后碰过的时刻。
templates/diagrams/bitfield.svg
128-BIT HEADER · LITTLE ENDIAN timestamp stream id shard flags crc 48 32 16 16 16 payload — column-coded key/value pairs SHARD FIELD ROUTES WITHOUT PARSING THE PAYLOAD
Bit cells keep square corners on purpose — adjacent fields read as one 128-bit word, and the routed field is the only lit one. 位格刻意不做圆角——相邻字段读起来是同一个 128 位字,被路由读取的字段是唯一点亮的。
templates/diagrams/build-pipeline.svg
commit unit ×3k e2e ×140 image sign + deploy MEDIAN COMMIT → FLEET · 22 MIN EVERY ARTIFACT SIGNED · SBOM ATTACHED
Fan out for the tests, fan back in for the artifact — the signed deploy node carries the strong stroke. 测试先扇出、再为产物收拢——签名发布节点带着强描边。
04 · The systems seven系统七张

Seven more, drawn for systems work. 再添七张,画给系统工程。

Hierarchy, control flow, deployment, silicon, signals, memory and scheduling — the denser genres run full-width so every label keeps its size, and the tint layer carries the categories: cyan for the hot path, indigo for storage and secondary lanes. 层级、控制流、部署、芯片、信号、内存、调度——更密的图型整行展开,每个标签都保住尺寸;类别交给着色层:cyan 是热路径,indigo 是存储与次级泳道。

05 · Silicon & code芯片与代码

Seven more, drawn for silicon. 再添七张,画给芯片。

Board topology over its own address bar, a tile mesh, a gate-level datapath, layered encapsulation on a byte ruler, an annotated console, a pointer graph and a bus fabric. Cyan stays reserved for the one thing being traced — the mesh rails and the ring stops drop to the neutral line token so that reservation still means something. 板级拓扑压在自己的地址条上、瓦片网格、器件级数据通路、字节标尺上的逐层封装、终端实录标注、指针图、总线挂载。cyan 只留给被追踪的那一样——互连轨和站点降到中性线条 token,这个约定才还算数。

06 · How to use one怎么用

Paste, prune,
let the tokens work.
贴入、删两样,
剩下交给 token。

Each template previews standalone with an embedded style block and a navy backdrop. On a glass page both are dead weight — the page already provides the classes, the canvas and the light. 每张模板都带一段内嵌样式和一块藏青底,用来单独预览。进了 glass 页面这两样都是累赘——页面本身已经提供了类、画布和光。

T·1

Delete the preview style删掉预览样式

Drop the embedded style block and the background rect when you paste. This page did exactly that for all fourteen. 粘贴时删掉内嵌的 style 块和背景 rect。本页的十四张图就是这么处理的。

T·2

Ink through tokens用 token 上墨

Labels go through the .glass-svg classes, so the same SVG survives the light theme. Hardcoded white text vanishes at noon; hardcoded cyan text dies on white. 标签全部走 .glass-svg 类,同一张 SVG 切到 light 主题原样存活。写死的白字到了白天就消失,写死的 cyan 字在白底上看不清。

T·3

Spend cyan like money把 cyan 当钱花

At most three glow elements per diagram — the flow, the focus, the live marker. Zero is a wireframe; four is a christmas tree. 每张图至多三个发光元素——流向、焦点、live 标记。零个是线稿,四个是圣诞树。

07 · Go deeper更进一步

See them in a real page. 看它们在真实页面里的样子。

The flagship demo redraws three of these genres on the repo's own story — architecture, silicon and a three-remote git flow, all in the same glass. 旗舰 demo 用仓库自己的故事重画了其中三种图型——架构、芯片、三远端 git 协作,全部用同一块玻璃。

Open the flagship demo打开旗舰 demo Templates on GitHubGitHub 上的模板