Spaces:
Running
Running
Update: ≤3s WeChat-compatible live photos, sets 3 & 4 (fill-in-the-blank), in-browser maker tool
0daf81d verified Download source/frontend/src/lib/live/styles.ts from Ethscriptions/eths: direct link, hf CLI and curl.
- Browser
- Download file 2.49 kB
-
https://huggingface.co/spaces/Ethscriptions/eths/resolve/main/source/frontend/src/lib/live/styles.ts
- Command line
-
hf download hf://spaces/Ethscriptions/eths/source/frontend/src/lib/live/styles.ts
-
curl -L -o styles.ts https://huggingface.co/spaces/Ethscriptions/eths/resolve/main/source/frontend/src/lib/live/styles.ts
2.49 kB
| export interface CardStyle { | |
| id: string | |
| name: string | |
| card: 'glass' | 'solid' | |
| fill: string // glass: tint drawn over the blurred photo; solid: card colour | |
| ink: string | |
| sub: string | |
| rim: string | null | |
| shadow: number | |
| radius: number | |
| rotate: number // degrees | |
| pillQ: { bg: string; fg: string } | |
| pillA: { bg: string; fg: string } | |
| marker: string | |
| tag: { bg: string; fg: string } | |
| swatch: string // UI preview | |
| } | |
| export const STYLES: CardStyle[] = [ | |
| { | |
| id: 'glass', name: '磨砂白', card: 'glass', fill: 'rgba(255,255,255,0.70)', ink: '#16161c', sub: '#282834', | |
| rim: 'rgba(255,255,255,0.8)', shadow: 0.43, radius: 46, rotate: 0, | |
| pillQ: { bg: '#ffd63d', fg: '#16161c' }, pillA: { bg: '#22c55e', fg: '#ffffff' }, | |
| marker: 'rgba(255,214,61,0.85)', tag: { bg: 'rgba(22,22,28,0.9)', fg: '#ffffff' }, swatch: 'linear-gradient(135deg,#f5f5f7,#d9dbe3)', | |
| }, | |
| { | |
| id: 'night', name: '暗夜玻璃', card: 'glass', fill: 'rgba(14,14,20,0.62)', ink: '#ffffff', sub: '#e8e8f0', | |
| rim: 'rgba(255,255,255,0.22)', shadow: 0.5, radius: 46, rotate: 0, | |
| pillQ: { bg: 'rgba(255,255,255,0.16)', fg: '#ffffff' }, pillA: { bg: '#22c55e', fg: '#ffffff' }, | |
| marker: 'rgba(255,59,92,0.55)', tag: { bg: '#ffffff', fg: '#16161c' }, swatch: 'linear-gradient(135deg,#2a2a35,#0e0e14)', | |
| }, | |
| { | |
| id: 'sticky', name: '便利贴', card: 'solid', fill: '#ffe680', ink: '#2a2418', sub: '#3a3222', | |
| rim: null, shadow: 0.35, radius: 16, rotate: -2, | |
| pillQ: { bg: '#2a2418', fg: '#ffe680' }, pillA: { bg: '#2a2418', fg: '#ffe680' }, | |
| marker: 'rgba(255,120,120,0.55)', tag: { bg: '#2a2418', fg: '#ffe680' }, swatch: 'linear-gradient(135deg,#fff1a8,#ffd84d)', | |
| }, | |
| { | |
| id: 'paper', name: '纯白卡片', card: 'solid', fill: '#ffffff', ink: '#111114', sub: '#2a2a33', | |
| rim: null, shadow: 0.3, radius: 36, rotate: 0, | |
| pillQ: { bg: '#111114', fg: '#ffffff' }, pillA: { bg: '#22c55e', fg: '#ffffff' }, | |
| marker: 'rgba(255,214,61,0.9)', tag: { bg: '#111114', fg: '#ffffff' }, swatch: '#ffffff', | |
| }, | |
| { | |
| id: 'mono', name: '极简黑', card: 'solid', fill: 'rgba(14,14,18,0.94)', ink: '#ffffff', sub: '#dcdce4', | |
| rim: 'rgba(255,255,255,0.12)', shadow: 0.45, radius: 28, rotate: 0, | |
| pillQ: { bg: '#ffffff', fg: '#111114' }, pillA: { bg: '#ffffff', fg: '#111114' }, | |
| marker: 'rgba(255,59,92,0.6)', tag: { bg: '#ffffff', fg: '#111114' }, swatch: '#111114', | |
| }, | |
| ] | |
| export const getStyle = (id: string) => STYLES.find((s) => s.id === id) ?? STYLES[0] | |