The official landing page for the PathSim ecosystem, showcasing PathSim, PathSim-Chem, PathSim-Vehicle, and PathView. Built with SvelteKit and hosted at pathsim.org.
- SvelteKit 2 with Svelte 5 runes
- CodeMirror 6 for interactive code examples
- Static site generation via adapter-static
- CSS custom properties for theming
npm install
npm run devFor production:
npm run build
npm run previewsrc/
├── lib/
│ ├── components/
│ │ ├── common/
│ │ │ ├── Icon.svelte # 440+ SVG icons
│ │ │ ├── Tooltip.svelte # Position-aware tooltips
│ │ │ └── CodeBlock.svelte # Code display component
│ │ └── layout/
│ │ ├── Header.svelte # Sticky navigation
│ │ └── Footer.svelte # Footer links
│ ├── config/
│ │ ├── config.ts # Links, content, features
│ │ ├── cdn.ts # External resource URLs
│ │ └── timing.ts # Animation timings
│ └── utils/
│ ├── codemirror.ts # Editor setup
│ ├── clipboard.ts # Copy functionality
│ └── colors.ts # Syntax highlighting
├── routes/
│ ├── +layout.svelte # App shell, theme toggle
│ └── +page.svelte # Homepage
└── app.css # Global design system
static/
├── favicon.png
├── pathsim_logo.png
├── pathsim_chem_logo.png
├── pathsim_vehicle_logo.png
├── pathsim_flight_logo.png
└── pathview_logo.png
- PathSim logo and tagline
- Brief description
- Action buttons: Intro, Docs, Editor, GitHub, Sponsor
- Interactive code example (read-only CodeMirror)
Two-card layout with one-click copy:
pip install pathsim
conda install -c conda-forge pathsimGrid of 4 package cards:
| Package | Description |
|---|---|
| PathView | Visual node editor (Editor) |
| PathSim | Core simulation framework |
| PathSim-Chem | Chemical reaction networks |
| PathSim-Vehicle | Vehicle dynamics |
Each card links to: App/Editor, API docs, Documentation, PyPI, Examples, GitHub
8 feature cards in a 4-column grid:
- Block-Diagram Modeling
- Adaptive Time-Stepping
- Real-Time Simulation
- Hierarchical Systems
- FMU Support
- Chemical Kinetics
- Vehicle Dynamics
- Open Source
All external links and content in one place:
export const links = {
docs: 'https://docs.pathsim.org',
view: 'https://view.pathsim.org',
github: 'https://github.com/pathsim/pathsim',
pypi: 'https://pypi.org/project/pathsim',
sponsor: 'https://github.com/sponsors/pathsim'
};
export const hero = {
tagline: 'Simulation Made Simple',
description: 'A Python framework for...'
};
export const features = [
{ title: 'Block-Diagram Modeling', description: '...' },
// ...
];
export const exampleCode = `
from pathsim import Simulation
from pathsim.blocks import Integrator, Amplifier
# ...
`;export const packages = {
pathsim: {
name: 'PathSim',
logo: '/pathsim_logo.png',
links: { ... }
},
chem: { ... },
vehicle: { ... },
pathview: { ... }
};Global styles in app.css (1000+ lines) with CSS custom properties.
- Dark theme (default):
--surface: #08080c - Light theme:
--surface: #f0f0f4 - Toggle via
data-themeattribute on<html> - Persisted to localStorage
| Variable | Dark | Light | Usage |
|---|---|---|---|
--surface |
#08080c | #f0f0f4 | Page background |
--surface-raised |
#1c1c26 | #ffffff | Cards, panels |
--text |
#f0f0f5 | #1a1a1f | Primary text |
--text-muted |
#808090 | #606068 | Secondary text |
--accent |
#0070c0 | #0070c0 | Brand blue |
--border |
#2a2a36 | #d4d4dc | Borders |
- UI Font: Inter (Google Fonts)
- Code Font: JetBrains Mono
- Base size: 12px
- Scale: xs (10px), sm (11px), base (12px), md (14px), lg (16px)
--space-xs: 4px;
--space-sm: 8px;
--space-md: 16px;
--space-lg: 24px;
--space-xl: 32px;
--space-2xl: 48px;| Class | Usage |
|---|---|
.panel |
Container with border and background |
.tile |
Clickable panel variant |
.elevated |
Subtle shadow effect |
.install-card |
Installation command card |
.icon-btn |
Icon-only button |
@media (max-width: 900px) /* Desktop → Tablet */
@media (max-width: 768px) /* Tablet → Mobile */
@media (max-width: 600px) /* Small mobile */440+ SVG icons from Feather icon set:
<Icon name="github" size={16} />
<Icon name="zap" /> <!-- Default 14px -->Common icons: zap, book, play, github, heart, sun, moon, code, copy, check, external-link
Position-aware tooltips via Svelte action:
<script>
import { tooltip } from '$lib/components/common/Tooltip.svelte';
</script>
<button use:tooltip={'Click to copy'}>Copy</button>
<button use:tooltip={{ text: 'Shortcut', shortcut: '⌘C' }}>Copy</button>Features:
- Auto-positioning (top, bottom, left, right)
- Viewport collision detection
- Optional keyboard shortcut display
- 50ms show/hide delay
Read-only code display with syntax highlighting:
<CodeBlock code={pythonCode} language="python" />Features:
- CodeMirror 6 with Python syntax
- Dark/light theme support
- Copy button with feedback
- Loading state
CodeMirror setup with custom theming:
import { loadCodeMirrorModules, createEditorExtensions, EditorManager } from '$lib/utils/codemirror';
// Load modules (cached)
const modules = await loadCodeMirrorModules();
// Create extensions
const extensions = createEditorExtensions(modules, {
readOnly: true,
theme: 'dark'
});
// Or use EditorManager for full lifecycle
const manager = new EditorManager(container, {
initialDoc: code,
readOnly: true
});
await manager.init();
manager.updateTheme('light');
manager.destroy();Copy to clipboard with feedback:
import { copyToClipboard } from '$lib/utils/clipboard';
await copyToClipboard(text, {
onStart: () => setCopying(true),
onSuccess: () => setSuccess(true),
onError: (err) => console.error(err),
onFinish: () => setCopying(false)
});| Script | Purpose |
|---|---|
npm run dev |
Start development server (localhost:5173) |
npm run build |
Production build to build/ |
npm run preview |
Preview production build |
npm run check |
TypeScript/Svelte type checking |
npm run lint |
Run ESLint |
npm run format |
Format with Prettier |
GitHub Pages deployment via GitHub Actions.
- Trigger on push to
master - Setup Node.js 20
- Build with
BASE_PATH=/${{ github.event.repository.name }} - Deploy to GitHub Pages
BASE_PATH: URL base path for subpath deployment
| Service | URL |
|---|---|
| Documentation | docs.pathsim.org |
| Visual Editor | view.pathsim.org |
| GitHub Org | github.com/pathsim |
| PyPI | pypi.org/project/pathsim |
| Sponsorship | github.com/sponsors/pathsim |
The design system (app.css) is shared across:
- pathsim-home (this repo)
- pathsim-docs
- pathview
Key shared elements:
- CSS custom properties
- Color palette
- Typography scale
- Component classes (
.panel,.tile,.elevated)
- Configuration-driven - All content in
config.ts, easy to update - Global styles first - Design tokens in
app.css, reused everywhere - Minimal components - Only essential UI (Icon, Tooltip, Header, Footer)
- Dark-first design - Default dark theme, light as override
- Responsive by default - Mobile-friendly from the start
- Static generation - No server required, fast CDN delivery
