Painless idle dashboard optimized for E-Ink Displays
|
|
před 3 měsíci | |
|---|---|---|
| .astro | před 3 měsíci | |
| prisma | před 3 měsíci | |
| public | před 3 měsíci | |
| src | před 3 měsíci | |
| .gitignore | před 3 měsíci | |
| README.md | před 3 měsíci | |
| SNAP_FIX.md | před 3 měsíci | |
| SNAP_IMPROVEMENTS.md | před 3 měsíci | |
| SNAP_SYSTEM.md | před 3 měsíci | |
| TESTING_SNAP.md | před 3 měsíci | |
| astro.config.mjs | před 3 měsíci | |
| dev.db | před 3 měsíci | |
| example-config.json | před 3 měsíci | |
| export | před 3 měsíci | |
| package-lock.json | před 3 měsíci | |
| package.json | před 3 měsíci | |
| tsconfig.json | před 3 měsíci |
A monochrome, monospaced, dark mode themed static site generator for eInk displays. Build custom dashboards with configurable widgets.
npm install
npm run dev
Visit http://localhost:4321 to start building your dashboard.
npm run build
The static site will be generated in the dist/ directory, ready to deploy.
Create a new file in src/widgets/YourWidget.tsx:
import { Component } from 'solid-js';
import type { WidgetSettings, WidgetSchema } from '../types/widget';
interface YourWidgetProps {
settings: WidgetSettings;
}
export const YourWidget: Component<YourWidgetProps> = (props) => {
return (
<div style={{
border: '1px solid var(--border)',
padding: '1rem'
}}>
<div>{props.settings.title}</div>
{/* Your widget content */}
</div>
);
};
export const yourWidgetSchema: WidgetSchema = {
name: 'Your Widget',
description: 'Description of what your widget does',
settingsSchema: {
title: {
type: 'string',
label: 'Title',
default: 'My Widget',
required: true
},
refreshRate: {
type: 'number',
label: 'Refresh Rate (ms)',
default: 60000
},
enabled: {
type: 'boolean',
label: 'Enabled',
default: true
}
}
};
Add your widget to src/widgets/registry.ts:
import { YourWidget, yourWidgetSchema } from './YourWidget';
export const widgetRegistry: Record<string, WidgetComponent> = {
// ... existing widgets
'your-widget': {
schema: yourWidgetSchema,
Component: YourWidget
}
};
Each widget defines its settings using a standardized schema. Supported types:
Example schema:
settingsSchema: {
symbol: {
type: 'string',
label: 'Crypto Symbol',
default: 'BTC',
required: true
},
interval: {
type: 'number',
label: 'Update Interval (ms)',
default: 60000
},
showIcon: {
type: 'boolean',
label: 'Show Icon',
default: true
},
theme: {
type: 'select',
label: 'Theme',
default: 'dark',
options: ['dark', 'light']
}
}
Displays cryptocurrency prices from CoinGecko API.
Settings:
symbol: Crypto symbol (BTC, ETH, etc.)currency: Display currency (USD, EUR, etc.)refreshInterval: Update frequency in millisecondsshowLabel: Show/hide labellabel: Custom label textDisplays current time and date.
Settings:
format: Time format (12h/24h)showDate: Show/hide dateshowLabel: Show/hide labellabel: Custom label textThe app uses CSS custom properties for theming. Edit src/layouts/Layout.astro:
:root {
--bg: #000000; /* Background color */
--fg: #ffffff; /* Foreground/text color */
--border: #ffffff; /* Border color */
--gray: #808080; /* Muted text color */
}
dashMaker/
├── src/
│ ├── components/ # Reusable UI components
│ │ ├── Dashboard.tsx # Main dashboard interface
│ │ ├── WidgetRenderer.tsx
│ │ └── WidgetConfigurator.tsx
│ ├── layouts/
│ │ └── Layout.astro # Base HTML layout with theme
│ ├── pages/
│ │ └── index.astro # Main page
│ ├── types/
│ │ └── widget.ts # TypeScript interfaces
│ └── widgets/ # Widget components
│ ├── registry.ts # Widget registry
│ ├── CryptoPrice.tsx
│ └── Clock.tsx
├── astro.config.mjs
├── package.json
└── tsconfig.json
ISC