Initial commit

This commit is contained in:
Zhongwei Li
2025-11-29 18:16:40 +08:00
commit f125e90b9f
370 changed files with 67769 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
# Changelog
All notable changes to the html-diagram-creator skill will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [0.1.0] - 2025-11-27
### Added
- Initial release with publication-quality HTML diagram generation
- Academic styling based on HELM, BetterBench, EleutherAI papers
- Color-coded component stages (Data/Execution/Analysis)
- Three copy-paste templates (Linear, Branching, Comparison)
- Arrow SVG snippets for horizontal, vertical, and bidirectional flows
- Integration guidance with html-to-png-converter and markdown-to-pdf-converter
- Mandatory completion checklist for quality assurance

View File

@@ -0,0 +1,48 @@
# HTML Diagram Creator
Publication-quality architecture diagrams as HTML files following academic paper conventions.
## Overview
This skill generates HTML-based diagrams styled after major ML benchmark papers (HELM, BetterBench, EleutherAI Evaluation Harness). Output can be exported to PNG for embedding in research papers, documentation, and presentations.
## Key Features
- **Academic styling**: Rounded corners, subtle shadows, figure numbering
- **Color-coded stages**: Data Preparation (blue), Execution (green), Analysis (orange)
- **TikZ-inspired design**: Follows LaTeX academic paper conventions
- **Export-ready**: HTML viewable in browser, exportable to PNG via Playwright
## Quick Start
```bash
# Trigger the skill
"Create an architecture diagram for [your pipeline]"
# Export to PNG (after HTML is generated)
npx playwright screenshot --full-page --device-scale-factor=2 "file://$(pwd)/diagram.html" diagram@2x.png
```
## Trigger Phrases
- "create an architecture diagram"
- "make a pipeline diagram for my paper"
- "publication-ready figure"
- "academic diagram"
- "benchmark visualization"
## Templates Available
- **Linear Pipeline**: 3-box horizontal flow
- **Branching Architecture**: Y-split parallel paths
- **Comparison**: Before/After side-by-side
## Related Skills
- `html-to-png-converter` - Export HTML diagrams to PNG
- `markdown-to-pdf-converter` - Embed PNG in professional PDFs
- `ascii-diagram-creator` - Terminal-compatible text diagrams
## Documentation
See [SKILL.md](SKILL.md) for complete templates, CSS reference, and workflow details.

View File

@@ -0,0 +1,146 @@
---
name: html-diagram-creator
version: 0.1.0
description: Use PROACTIVELY when user needs publication-quality architecture diagrams for research papers, documentation, or presentations. Triggers on "architecture diagram", "pipeline diagram", "figure for paper", "academic diagram", "benchmark visualization", or "publication-ready figure". Generates HTML diagrams following academic paper conventions (HELM, BetterBench, EleutherAI) with proper color coding, rounded corners, figure numbering, and export to PNG. Not for ASCII diagrams or flowcharts.
---
# HTML Diagram Creator
## Overview
Generates **publication-quality architecture diagrams** as HTML files for research papers, documentation, and presentations. Follows academic conventions from HELM, BetterBench, and EleutherAI papers.
**Key Capabilities**:
- Academic styling (rounded corners, shadows, figure numbering)
- Color-coded components (Data/Execution/Analysis stages)
- Browser-based with PNG export via Playwright
- Stage grouping with labels and legends
## When to Use This Skill
**Trigger Phrases**:
- "create an architecture diagram"
- "make a pipeline diagram for my paper"
- "publication-ready figure"
- "academic diagram"
- "benchmark visualization"
**Use PROACTIVELY when**:
- User is writing research documentation or papers
- User mentions "publication", "paper", "academic"
- User requests "PNG diagram" or "exportable diagram"
**Do NOT use when**:
- User wants ASCII diagrams (use ascii-diagram-creator)
- User needs interactive flowcharts (use Mermaid)
- User wants UML diagrams
## Quick Reference
### Color Palette
| Stage | Fill | Border | Usage |
|-------|------|--------|-------|
| Data Preparation | `#E3F2FD` | `#1976D2` | Input processing, loaders |
| Execution | `#E8F5E9` | `#388E3C` | API calls, inference |
| Analysis | `#FFF3E0` | `#F57C00` | Evaluation, scoring |
| Terminals | `#FF6B6B` | `#FF6B6B` | Input/Output markers |
### Visual Standards
| Element | Implementation |
|---------|----------------|
| Corners | `border-radius: 6px` |
| Shadows | `box-shadow: 0 2px 4px rgba(0,0,0,0.08)` |
| Arrows | Dark slate `#546E7A` with triangular heads |
| Figure label | "Figure N" format above title |
## Workflow
| Phase | Description | Details |
|-------|-------------|---------|
| 1 | Requirements Gathering | Identify components, flow type, stage categories |
| 2 | HTML Generation | Create standalone HTML with academic CSS |
| 3 | Component Layout | Structure with flexbox alignment |
| 4 | Export | PNG via Playwright or screenshot |
### Phase 1: Requirements
1. **Identify components**: What boxes/stages need to be shown?
2. **Determine flow**: Linear pipeline? Branching? Multi-path?
3. **Categorize stages**: Data (blue), Execution (green), Analysis (orange)
### Phase 2: HTML Structure
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>[Diagram Title]</title>
<style>/* Academic styling */</style>
</head>
<body>
<div class="diagram-container">
<div class="figure-label">Figure [N]</div>
<h2 class="diagram-title">[Title]</h2>
<!-- Pipeline components -->
<p class="figure-caption">[Caption]</p>
</div>
</body>
</html>
```
### Phase 3: Component Layout
```html
<div class="pipeline">
<div class="component-box data-prep">
<span class="component-name">[Name]</span>
<span class="component-tech">[Tech]</span>
</div>
<div class="arrow"></div>
<!-- More components -->
</div>
```
### Phase 4: Export
```bash
# Retina quality (recommended)
npx playwright screenshot --full-page --device-scale-factor=2 \
"file://$(pwd)/diagram.html" diagram@2x.png
# Standard resolution
npx playwright screenshot --full-page "file://$(pwd)/diagram.html" diagram.png
```
## Templates
Copy-paste ready templates available in [reference/html-templates.md](reference/html-templates.md):
- **Linear Pipeline**: 3-box horizontal flow
- **Branching Architecture**: Y-split parallel paths
- **Comparison**: Before/After side-by-side
- **Arrow Snippets**: Horizontal, vertical, bidirectional
## Reference
- [HTML Templates](reference/html-templates.md) - Copy-paste ready diagrams
- [CSS Components](reference/css-components.md) - Complete class definitions
- [Additional Templates](reference/templates.md) - More pipeline variants
## Completion Checklist
- [ ] HTML file generated with academic styling
- [ ] Figure numbering applied
- [ ] Color-coded by stage
- [ ] Rounded corners (6px) and shadows
- [ ] Export method explained
## Related Skills
- **html-to-png-converter**: Export HTML to PNG with retina support
- **markdown-to-pdf-converter**: Embed diagrams in PDFs
- **ascii-diagram-creator**: Terminal-compatible text diagrams
**Pipeline**: Create diagram → Export to PNG → Embed in markdown → Generate PDF

View File

@@ -0,0 +1,276 @@
# CSS Components Reference
Complete CSS class definitions for academic-style diagrams.
## Base Container
```css
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
background: #ffffff;
min-height: 100vh;
display: flex;
justify-content: center;
align-items: center;
padding: 40px;
}
.diagram-container {
background: #fafbfc;
border: 1px solid #e1e4e8;
border-radius: 8px;
padding: 40px 50px;
max-width: 1200px;
}
```
## Typography
```css
.figure-label {
font-size: 12px;
color: #57606a;
margin-bottom: 8px;
font-weight: 500;
}
.diagram-title {
font-size: 18px;
font-weight: 600;
color: #24292f;
text-align: center;
margin-bottom: 30px;
}
.figure-caption {
text-align: center;
margin-top: 25px;
font-size: 12px;
color: #57606a;
font-style: italic;
}
```
## Stage Labels
```css
.stage-labels {
display: flex;
justify-content: space-between;
padding: 0 30px;
margin-bottom: 15px;
}
.stage-label {
font-size: 10px;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.5px;
color: #6e7781;
text-align: center;
}
```
## Component Boxes
```css
.component {
display: flex;
flex-direction: column;
align-items: center;
}
.component-box {
width: 130px;
height: 72px;
border-radius: 6px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
text-align: center;
padding: 10px;
box-shadow: 0 2px 4px rgba(0,0,0,0.08);
border: 1px solid;
}
.component-name {
font-size: 12px;
font-weight: 600;
color: #24292f;
line-height: 1.3;
}
.component-tech {
font-size: 9px;
color: #57606a;
margin-top: 4px;
font-style: italic;
}
```
## Color-Coded Stages
```css
/* Data Preparation - Blue */
.component-box.data-prep {
background: #e3f2fd;
border-color: #1976d2;
}
/* Execution - Green */
.component-box.execution {
background: #e8f5e9;
border-color: #388e3c;
}
/* Analysis - Orange */
.component-box.analysis {
background: #fff3e0;
border-color: #f57c00;
}
```
## Data Labels
```css
.data-label {
font-size: 9px;
color: #57606a;
font-family: 'SF Mono', Monaco, 'Courier New', monospace;
margin-bottom: 6px;
white-space: nowrap;
height: 14px;
}
```
## Terminal Circles
```css
.terminal {
width: 44px;
height: 44px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-size: 11px;
font-weight: 600;
flex-shrink: 0;
}
.terminal.input {
background: #fff;
border: 3px solid #ff6b6b;
color: #ff6b6b;
}
.terminal.output {
background: #ff6b6b;
border: 3px solid #ff6b6b;
color: #fff;
}
```
## Arrows
```css
.arrow {
display: flex;
align-items: center;
justify-content: center;
width: 50px;
flex-shrink: 0;
padding-top: 20px;
}
.arrow svg {
width: 40px;
height: 16px;
}
.arrow path {
fill: none;
stroke: #546e7a;
stroke-width: 2;
}
.arrow polygon {
fill: #546e7a;
}
```
**Arrow SVG Template**:
```html
<svg viewBox="0 0 40 16">
<path d="M0,8 L30,8" />
<polygon points="30,4 38,8 30,12" />
</svg>
```
## Stage Brackets
```css
.stage-brackets {
display: flex;
justify-content: center;
padding: 0 30px;
margin-top: 5px;
}
.bracket {
height: 12px;
border-left: 2px solid #d0d7de;
border-right: 2px solid #d0d7de;
border-bottom: 2px solid #d0d7de;
border-radius: 0 0 4px 4px;
}
```
## Legend
```css
.legend {
display: flex;
justify-content: center;
gap: 24px;
margin-top: 20px;
padding-top: 15px;
border-top: 1px solid #e1e4e8;
}
.legend-item {
display: flex;
align-items: center;
gap: 6px;
font-size: 10px;
color: #57606a;
}
.legend-swatch {
width: 16px;
height: 16px;
border-radius: 3px;
border: 1px solid;
}
```
## Alternative Color Schemes
### Monochrome (Print-Friendly)
```css
.component-box.data-prep { background: #f5f5f5; border-color: #9e9e9e; }
.component-box.execution { background: #e0e0e0; border-color: #757575; }
.component-box.analysis { background: #bdbdbd; border-color: #616161; }
```
### Dark Theme
```css
.diagram-container { background: #1e1e1e; border-color: #333; }
.diagram-title { color: #e0e0e0; }
.component-box.data-prep { background: #1e3a5f; border-color: #42a5f5; }
.component-box.execution { background: #1b5e20; border-color: #66bb6a; }
.component-box.analysis { background: #e65100; border-color: #ffa726; }
```

View File

@@ -0,0 +1,185 @@
# HTML Diagram Templates
Copy-paste ready HTML templates for common diagram types.
## Linear Pipeline (3 boxes)
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Pipeline Diagram</title>
<style>
body { font-family: -apple-system, sans-serif; padding: 2em; background: #f8f9fa; }
.diagram-container { max-width: 900px; margin: 0 auto; background: white; padding: 2em; border-radius: 8px; }
.figure-label { font-size: 12px; color: #57606a; margin-bottom: 0.5em; }
.diagram-title { font-size: 18px; font-weight: 600; color: #24292f; margin: 0 0 1.5em 0; }
.pipeline { display: flex; align-items: center; justify-content: center; gap: 0; }
.component-box { padding: 1em 1.5em; border-radius: 6px; text-align: center; box-shadow: 0 2px 4px rgba(0,0,0,0.08); min-width: 120px; }
.component-name { font-size: 12px; font-weight: 600; display: block; }
.component-tech { font-size: 9px; font-style: italic; color: #57606a; }
.data-prep { background: #E3F2FD; border: 1px solid #1976D2; }
.execution { background: #E8F5E9; border: 1px solid #388E3C; }
.analysis { background: #FFF3E0; border: 1px solid #F57C00; }
.arrow { width: 40px; height: 2px; background: #546E7A; position: relative; margin: 0 -1px; }
.arrow::after { content: ''; position: absolute; right: -6px; top: -4px; border: 5px solid transparent; border-left: 6px solid #546E7A; }
.figure-caption { font-style: italic; color: #57606a; text-align: center; margin-top: 1.5em; font-size: 14px; }
</style>
</head>
<body>
<div class="diagram-container">
<div class="figure-label">Figure 1</div>
<h2 class="diagram-title">Pipeline Architecture</h2>
<div class="pipeline">
<div class="component-box data-prep">
<span class="component-name">Data Loader</span>
<span class="component-tech">JSON/CSV</span>
</div>
<div class="arrow"></div>
<div class="component-box execution">
<span class="component-name">Processor</span>
<span class="component-tech">Node.js</span>
</div>
<div class="arrow"></div>
<div class="component-box analysis">
<span class="component-name">Analyzer</span>
<span class="component-tech">Statistics</span>
</div>
</div>
<p class="figure-caption">Data flows through preparation, execution, and analysis stages.</p>
</div>
</body>
</html>
```
## Branching Architecture (Y-split)
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Branching Diagram</title>
<style>
body { font-family: -apple-system, sans-serif; padding: 2em; background: #f8f9fa; }
.diagram-container { max-width: 700px; margin: 0 auto; background: white; padding: 2em; border-radius: 8px; }
.figure-label { font-size: 12px; color: #57606a; }
.diagram-title { font-size: 18px; font-weight: 600; color: #24292f; margin: 0.5em 0 1.5em 0; }
.component-box { padding: 1em 1.5em; border-radius: 6px; text-align: center; box-shadow: 0 2px 4px rgba(0,0,0,0.08); }
.component-name { font-size: 12px; font-weight: 600; display: block; }
.input { background: #E3F2FD; border: 1px solid #1976D2; width: fit-content; margin: 0 auto 1em auto; }
.branch-a { background: #E8F5E9; border: 1px solid #388E3C; }
.branch-b { background: #FFF3E0; border: 1px solid #F57C00; }
.branches { display: flex; justify-content: center; gap: 3em; margin-top: 1em; }
.branch { text-align: center; }
.vertical-arrow { width: 2px; height: 30px; background: #546E7A; margin: 0 auto; position: relative; }
.vertical-arrow::after { content: ''; position: absolute; bottom: -6px; left: -4px; border: 5px solid transparent; border-top: 6px solid #546E7A; }
.figure-caption { font-style: italic; color: #57606a; text-align: center; margin-top: 1.5em; font-size: 14px; }
</style>
</head>
<body>
<div class="diagram-container">
<div class="figure-label">Figure 2</div>
<h2 class="diagram-title">Branching Architecture</h2>
<div class="component-box input"><span class="component-name">Input Router</span></div>
<div class="branches">
<div class="branch">
<div class="vertical-arrow"></div>
<div class="component-box branch-a"><span class="component-name">Path A</span></div>
</div>
<div class="branch">
<div class="vertical-arrow"></div>
<div class="component-box branch-b"><span class="component-name">Path B</span></div>
</div>
</div>
<p class="figure-caption">Input is routed to parallel processing paths.</p>
</div>
</body>
</html>
```
## Comparison (Before/After)
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Comparison Diagram</title>
<style>
body { font-family: -apple-system, sans-serif; padding: 2em; background: #f8f9fa; }
.diagram-container { max-width: 800px; margin: 0 auto; background: white; padding: 2em; border-radius: 8px; }
.figure-label { font-size: 12px; color: #57606a; }
.diagram-title { font-size: 18px; font-weight: 600; color: #24292f; margin: 0.5em 0 1.5em 0; }
.comparison { display: flex; gap: 2em; justify-content: center; }
.side { flex: 1; max-width: 300px; }
.side-label { font-size: 14px; font-weight: 600; text-align: center; margin-bottom: 1em; padding: 0.5em; border-radius: 4px; }
.before-label { background: #ffebee; color: #c62828; }
.after-label { background: #e8f5e9; color: #2e7d32; }
.component-box { padding: 0.8em 1em; border-radius: 6px; text-align: center; margin-bottom: 0.5em; font-size: 12px; }
.old { background: #fafafa; border: 1px solid #ccc; color: #666; }
.new { background: #E3F2FD; border: 1px solid #1976D2; }
.figure-caption { font-style: italic; color: #57606a; text-align: center; margin-top: 1.5em; font-size: 14px; }
</style>
</head>
<body>
<div class="diagram-container">
<div class="figure-label">Figure 3</div>
<h2 class="diagram-title">Architecture Comparison</h2>
<div class="comparison">
<div class="side">
<div class="side-label before-label">Before</div>
<div class="component-box old">Legacy Component A</div>
<div class="component-box old">Legacy Component B</div>
<div class="component-box old">Legacy Component C</div>
</div>
<div class="side">
<div class="side-label after-label">After</div>
<div class="component-box new">Modern Service</div>
<div class="component-box new">Unified API</div>
</div>
</div>
<p class="figure-caption">Migration consolidates three legacy components into two modern services.</p>
</div>
</body>
</html>
```
## Arrow SVG Snippets
### Horizontal Arrow (right)
```html
<div class="arrow" style="width: 40px; height: 2px; background: #546E7A; position: relative;">
<div style="position: absolute; right: -6px; top: -4px; border: 5px solid transparent; border-left: 6px solid #546E7A;"></div>
</div>
```
### Horizontal Arrow (left)
```html
<div class="arrow" style="width: 40px; height: 2px; background: #546E7A; position: relative;">
<div style="position: absolute; left: -6px; top: -4px; border: 5px solid transparent; border-right: 6px solid #546E7A;"></div>
</div>
```
### Vertical Arrow (down)
```html
<div style="width: 2px; height: 30px; background: #546E7A; margin: 0 auto; position: relative;">
<div style="position: absolute; bottom: -6px; left: -4px; border: 5px solid transparent; border-top: 6px solid #546E7A;"></div>
</div>
```
### Vertical Arrow (up)
```html
<div style="width: 2px; height: 30px; background: #546E7A; margin: 0 auto; position: relative;">
<div style="position: absolute; top: -6px; left: -4px; border: 5px solid transparent; border-bottom: 6px solid #546E7A;"></div>
</div>
```
### Bidirectional Arrow (horizontal)
```html
<div style="width: 40px; height: 2px; background: #546E7A; position: relative; margin: 0 8px;">
<div style="position: absolute; left: -6px; top: -4px; border: 5px solid transparent; border-right: 6px solid #546E7A;"></div>
<div style="position: absolute; right: -6px; top: -4px; border: 5px solid transparent; border-left: 6px solid #546E7A;"></div>
</div>
```

View File

@@ -0,0 +1,225 @@
# Diagram Templates
Ready-to-use HTML templates for common diagram patterns.
## Linear Pipeline Template
Standard left-to-right data flow (most common for benchmarks).
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>[TITLE]</title>
<style>
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
background: #fff;
min-height: 100vh;
display: flex;
justify-content: center;
align-items: center;
padding: 40px;
}
.diagram-container {
background: #fafbfc;
border: 1px solid #e1e4e8;
border-radius: 8px;
padding: 40px 50px;
max-width: 1200px;
}
.figure-label { font-size: 12px; color: #57606a; margin-bottom: 8px; font-weight: 500; }
.diagram-title { font-size: 18px; font-weight: 600; color: #24292f; text-align: center; margin-bottom: 30px; }
.pipeline { display: flex; align-items: center; justify-content: center; }
.component { display: flex; flex-direction: column; align-items: center; }
.component-box {
width: 130px; height: 72px; border-radius: 6px;
display: flex; flex-direction: column; align-items: center; justify-content: center;
text-align: center; padding: 10px;
box-shadow: 0 2px 4px rgba(0,0,0,0.08); border: 1px solid;
}
.component-box.data-prep { background: #e3f2fd; border-color: #1976d2; }
.component-box.execution { background: #e8f5e9; border-color: #388e3c; }
.component-box.analysis { background: #fff3e0; border-color: #f57c00; }
.component-name { font-size: 12px; font-weight: 600; color: #24292f; line-height: 1.3; }
.component-tech { font-size: 9px; color: #57606a; margin-top: 4px; font-style: italic; }
.data-label { font-size: 9px; color: #57606a; font-family: monospace; margin-bottom: 6px; height: 14px; }
.terminal {
width: 44px; height: 44px; border-radius: 50%;
display: flex; align-items: center; justify-content: center;
font-size: 11px; font-weight: 600;
}
.terminal.input { background: #fff; border: 3px solid #ff6b6b; color: #ff6b6b; }
.terminal.output { background: #ff6b6b; border: 3px solid #ff6b6b; color: #fff; }
.arrow { display: flex; align-items: center; justify-content: center; width: 50px; padding-top: 20px; }
.arrow svg { width: 40px; height: 16px; }
.arrow path { fill: none; stroke: #546e7a; stroke-width: 2; }
.arrow polygon { fill: #546e7a; }
.figure-caption { text-align: center; margin-top: 25px; font-size: 12px; color: #57606a; font-style: italic; }
.legend { display: flex; justify-content: center; gap: 24px; margin-top: 20px; padding-top: 15px; border-top: 1px solid #e1e4e8; }
.legend-item { display: flex; align-items: center; gap: 6px; font-size: 10px; color: #57606a; }
.legend-swatch { width: 16px; height: 16px; border-radius: 3px; border: 1px solid; }
.legend-swatch.data-prep { background: #e3f2fd; border-color: #1976d2; }
.legend-swatch.execution { background: #e8f5e9; border-color: #388e3c; }
.legend-swatch.analysis { background: #fff3e0; border-color: #f57c00; }
</style>
</head>
<body>
<div class="diagram-container">
<div class="figure-label">Figure [N]</div>
<h2 class="diagram-title">[TITLE]</h2>
<div class="pipeline">
<!-- Input Terminal -->
<div class="component">
<span class="data-label">&nbsp;</span>
<div class="terminal input">In</div>
</div>
<div class="arrow"><svg viewBox="0 0 40 16"><path d="M0,8 L30,8"/><polygon points="30,4 38,8 30,12"/></svg></div>
<!-- Component 1 -->
<div class="component">
<span class="data-label">[data_type_1]</span>
<div class="component-box data-prep">
<span class="component-name">[Name 1]</span>
<span class="component-tech">[Technology]</span>
</div>
</div>
<div class="arrow"><svg viewBox="0 0 40 16"><path d="M0,8 L30,8"/><polygon points="30,4 38,8 30,12"/></svg></div>
<!-- Component 2 -->
<div class="component">
<span class="data-label">[data_type_2]</span>
<div class="component-box execution">
<span class="component-name">[Name 2]</span>
<span class="component-tech">[Technology]</span>
</div>
</div>
<div class="arrow"><svg viewBox="0 0 40 16"><path d="M0,8 L30,8"/><polygon points="30,4 38,8 30,12"/></svg></div>
<!-- Component 3 -->
<div class="component">
<span class="data-label">[data_type_3]</span>
<div class="component-box analysis">
<span class="component-name">[Name 3]</span>
<span class="component-tech">[Technology]</span>
</div>
</div>
<div class="arrow"><svg viewBox="0 0 40 16"><path d="M0,8 L30,8"/><polygon points="30,4 38,8 30,12"/></svg></div>
<!-- Output Terminal -->
<div class="component">
<span class="data-label">Results</span>
<div class="terminal output">Out</div>
</div>
</div>
<p class="figure-caption">[CAPTION - Describe what the diagram shows]</p>
<div class="legend">
<div class="legend-item"><div class="legend-swatch data-prep"></div><span>Data Preparation</span></div>
<div class="legend-item"><div class="legend-swatch execution"></div><span>Execution</span></div>
<div class="legend-item"><div class="legend-swatch analysis"></div><span>Analysis</span></div>
</div>
</div>
</body>
</html>
```
## Branching Architecture Template
For systems with parallel processing or multiple output paths.
```html
<!-- Add to body after pipeline -->
<div class="branch-container">
<div class="branch-label">Branch A</div>
<div class="pipeline branch">
<!-- Branch A components -->
</div>
<div class="branch-label">Branch B</div>
<div class="pipeline branch">
<!-- Branch B components -->
</div>
</div>
<style>
.branch-container { margin-top: 20px; }
.branch-label {
font-size: 10px; font-weight: 600;
color: #57606a; margin: 10px 0 5px 50px;
}
.pipeline.branch {
padding-left: 50px;
border-left: 2px solid #d0d7de;
}
</style>
```
## Multi-Stage with Grouping Template
For showing distinct phases with visual grouping.
```html
<!-- Add stage labels above pipeline -->
<div class="stage-labels">
<span class="stage-label" style="width: 280px;">Data Preparation</span>
<span class="stage-label" style="width: 140px;">Execution</span>
<span class="stage-label" style="width: 280px;">Analysis</span>
</div>
<!-- Add brackets below pipeline -->
<div class="stage-brackets">
<div class="bracket" style="width: 340px; margin-right: 10px;"></div>
<div class="bracket" style="width: 130px; margin-right: 10px;"></div>
<div class="bracket" style="width: 340px;"></div>
</div>
<style>
.stage-labels {
display: flex; justify-content: space-between;
padding: 0 30px; margin-bottom: 15px;
}
.stage-label {
font-size: 10px; font-weight: 600;
text-transform: uppercase; letter-spacing: 0.5px;
color: #6e7781; text-align: center;
}
.stage-brackets {
display: flex; justify-content: center;
padding: 0 30px; margin-top: 5px;
}
.bracket {
height: 12px;
border-left: 2px solid #d0d7de;
border-right: 2px solid #d0d7de;
border-bottom: 2px solid #d0d7de;
border-radius: 0 0 4px 4px;
}
</style>
```
## Vertical Stack Template
For systems with top-to-bottom flow.
```html
<style>
.pipeline.vertical {
flex-direction: column;
gap: 0;
}
.arrow.vertical {
transform: rotate(90deg);
height: 50px;
width: auto;
padding: 0 20px;
}
</style>
```
## Usage Notes
1. **Replace placeholders**: `[TITLE]`, `[N]`, `[Name]`, `[Technology]`, `[data_type]`, `[CAPTION]`
2. **Adjust widths**: Modify `.stage-label` and `.bracket` widths to match component count
3. **Add/remove components**: Copy component blocks as needed
4. **Change stages**: Use appropriate class (`data-prep`, `execution`, `analysis`)