xonecas.io
523
Tc

the-champs-timer / commit f444bf1

feat: icons and updated readme

Sean2025-09-05 f444bf1a832e85c6f042afeeb4a92171be72b6bd parent 1c6f789

4 files changed

README.md+4−66
@@ -1,69 +1,7 @@
1-# React + TypeScript + Vite
1+# The Champ's Timer
22
3-This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
3+I was tired of using boxing timer apps filled with intrusive advertising, so I made this free one.
44
5-Currently, two official plugins are available:
5+## AI Usage:
66
7-- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Babel](https://babeljs.io/) for Fast Refresh
8-- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
9-
10-## Expanding the ESLint configuration
11-
12-If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:
13-
14-```js
15-export default tseslint.config([
16- globalIgnores(['dist']),
17- {
18- files: ['**/*.{ts,tsx}'],
19- extends: [
20- // Other configs...
21-
22- // Remove tseslint.configs.recommended and replace with this
23- ...tseslint.configs.recommendedTypeChecked,
24- // Alternatively, use this for stricter rules
25- ...tseslint.configs.strictTypeChecked,
26- // Optionally, add this for stylistic rules
27- ...tseslint.configs.stylisticTypeChecked,
28-
29- // Other configs...
30- ],
31- languageOptions: {
32- parserOptions: {
33- project: ['./tsconfig.node.json', './tsconfig.app.json'],
34- tsconfigRootDir: import.meta.dirname,
35- },
36- // other options...
37- },
38- },
39-])
40-```
41-
42-You can also install [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) for React-specific lint rules:
43-
44-```js
45-// eslint.config.js
46-import reactX from 'eslint-plugin-react-x'
47-import reactDom from 'eslint-plugin-react-dom'
48-
49-export default tseslint.config([
50- globalIgnores(['dist']),
51- {
52- files: ['**/*.{ts,tsx}'],
53- extends: [
54- // Other configs...
55- // Enable lint rules for React
56- reactX.configs['recommended-typescript'],
57- // Enable lint rules for React DOM
58- reactDom.configs.recommended,
59- ],
60- languageOptions: {
61- parserOptions: {
62- project: ['./tsconfig.node.json', './tsconfig.app.json'],
63- tsconfigRootDir: import.meta.dirname,
64- },
65- // other options...
66- },
67- },
68-])
69-```
7+- The stopwatch graphic being used at the icon for the app, is AI generated.
index.html+2−2
@@ -2,9 +2,9 @@
22 <html lang="en">
33 <head>
44 <meta charset="UTF-8" />
5- <link rel="icon" type="image/svg+xml" href="/vite.svg" />
5+ <link rel="icon" type="image/svg+xml" href="/stopwatch-icon.svg" />
66 <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7- <title>🥊</title>
7+ <title>The Champ's Timer</title>
88 </head>
99 <body>
1010 <div id="root"></div>
public/stopwatch-icon.svg+128−0
@@ -0,0 +1,128 @@
1+<?xml version="1.0" encoding="UTF-8"?>
2+<svg width="128" height="128" viewBox="0 0 128 128" fill="none" xmlns="http://www.w3.org/2000/svg" role="img" aria-labelledby="title desc">
3+ <title id="title">Grayscale Vintage Stopwatch Icon</title>
4+ <desc id="desc">A small, monochrome stopwatch with top ring, crown, metal case, ticks, and a central hand.</desc>
5+
6+ <!-- ====== DEFS ====== -->
7+ <defs>
8+ <!-- Soft shadow (subtle, grayscale) -->
9+ <filter id="s" x="-30%" y="-30%" width="160%" height="160%">
10+ <feOffset dx="0" dy="1" result="o"/>
11+ <feGaussianBlur in="o" stdDeviation="1.2" result="b"/>
12+ <feColorMatrix in="b" type="matrix"
13+ values="0 0 0 0 0
14+ 0 0 0 0 0
15+ 0 0 0 0 0
16+ 0 0 0 .25 0"/>
17+ <feBlend in="SourceGraphic" mode="normal"/>
18+ </filter>
19+
20+ <!-- Case & dial grayscale gradients -->
21+ <linearGradient id="gMetal" x1="0" y1="0" x2="0" y2="1">
22+ <stop offset="0%" stop-color="#F2F2F2"/>
23+ <stop offset="50%" stop-color="#D9D9D9"/>
24+ <stop offset="100%" stop-color="#F2F2F2"/>
25+ </linearGradient>
26+
27+ <radialGradient id="gRim" cx="50%" cy="50%" r="50%">
28+ <stop offset="70%" stop-color="#D0D0D0"/>
29+ <stop offset="100%" stop-color="#A3A3A3"/>
30+ </radialGradient>
31+
32+ <radialGradient id="gDial" cx="50%" cy="45%" r="65%">
33+ <stop offset="0%" stop-color="#FFFFFF"/>
34+ <stop offset="100%" stop-color="#EDEDED"/>
35+ </radialGradient>
36+
37+ <linearGradient id="gGlass" x1="0" y1="0" x2="1" y2="1">
38+ <stop offset="0%" stop-color="#FFFFFF" stop-opacity=".55"/>
39+ <stop offset="60%" stop-color="#FFFFFF" stop-opacity=".10"/>
40+ <stop offset="100%" stop-color="#FFFFFF" stop-opacity="0"/>
41+ </linearGradient>
42+
43+ <style>
44+ .tick { stroke:#222; stroke-linecap:round; }
45+ </style>
46+ </defs>
47+
48+ <!-- ====== WATCH GROUP (center at 64,68) ====== -->
49+ <g transform="translate(64 68)" filter="url(#s)">
50+
51+ <!-- Top ring -->
52+ <g transform="translate(0 -44)">
53+ <circle r="7.5" fill="url(#gRim)"/>
54+ <circle r="5.5" fill="url(#gMetal)" stroke="#8C8C8C" stroke-width="1"/>
55+ </g>
56+
57+ <!-- Crown -->
58+ <g transform="translate(0 -32)">
59+ <rect x="-12" y="-6.5" width="24" height="13" rx="3" fill="url(#gMetal)" stroke="#8C8C8C" stroke-width="1"/>
60+ <!-- simple knurl -->
61+ <g opacity=".35">
62+ <rect x="-9" y="-4" width="2" height="9" rx="1" fill="#9A9A9A"/>
63+ <rect x="-5" y="-4" width="2" height="9" rx="1" fill="#9A9A9A"/>
64+ <rect x="-1" y="-4" width="2" height="9" rx="1" fill="#9A9A9A"/>
65+ <rect x="3" y="-4" width="2" height="9" rx="1" fill="#9A9A9A"/>
66+ <rect x="7" y="-4" width="2" height="9" rx="1" fill="#9A9A9A"/>
67+ </g>
68+ </g>
69+
70+ <!-- Case & dial -->
71+ <circle r="44" fill="url(#gMetal)"/>
72+ <circle r="41" fill="url(#gRim)"/>
73+ <circle r="39" fill="#F5F5F5"/>
74+ <circle r="37" fill="url(#gDial)" stroke="#BFBFBF" stroke-width="1"/>
75+
76+ <!-- Major ticks (12) -->
77+ <g id="maj">
78+ <line class="tick" x1="0" y1="-31" x2="0" y2="-35" stroke-width="2"/>
79+ </g>
80+ <g>
81+ <use href="#maj" transform="rotate(0)"/>
82+ <use href="#maj" transform="rotate(30)"/>
83+ <use href="#maj" transform="rotate(60)"/>
84+ <use href="#maj" transform="rotate(90)"/>
85+ <use href="#maj" transform="rotate(120)"/>
86+ <use href="#maj" transform="rotate(150)"/>
87+ <use href="#maj" transform="rotate(180)"/>
88+ <use href="#maj" transform="rotate(210)"/>
89+ <use href="#maj" transform="rotate(240)"/>
90+ <use href="#maj" transform="rotate(270)"/>
91+ <use href="#maj" transform="rotate(300)"/>
92+ <use href="#maj" transform="rotate(330)"/>
93+ </g>
94+
95+ <!-- Minor ticks (12, between majors) -->
96+ <g id="min">
97+ <line class="tick" x1="0" y1="-32" x2="0" y2="-34" stroke-width="1"/>
98+ </g>
99+ <g>
100+ <use href="#min" transform="rotate(15)"/>
101+ <use href="#min" transform="rotate(45)"/>
102+ <use href="#min" transform="rotate(75)"/>
103+ <use href="#min" transform="rotate(105)"/>
104+ <use href="#min" transform="rotate(135)"/>
105+ <use href="#min" transform="rotate(165)"/>
106+ <use href="#min" transform="rotate(195)"/>
107+ <use href="#min" transform="rotate(225)"/>
108+ <use href="#min" transform="rotate(255)"/>
109+ <use href="#min" transform="rotate(285)"/>
110+ <use href="#min" transform="rotate(315)"/>
111+ <use href="#min" transform="rotate(345)"/>
112+ </g>
113+
114+ <!-- Hand (seconds) -->
115+ <g>
116+ <line x1="0" y1="6" x2="0" y2="-29" stroke="#111" stroke-width="2" stroke-linecap="round"/>
117+ <line x1="0" y1="6" x2="0" y2="12" stroke="#111" stroke-width="2" stroke-linecap="round"/>
118+ <circle r="2.5" fill="#111"/>
119+ </g>
120+
121+ <!-- Glass highlight -->
122+ <path d="M -24 -30 C -6 -38, 6 -38, 24 -30
123+ C 26 -29, 25 -26, 22 -25
124+ C 8 -22, -8 -22, -22 -25
125+ C -25 -26, -26 -29, -24 -30 Z"
126+ fill="url(#gGlass)" opacity=".55" pointer-events="none"/>
127+ </g>
128+</svg>
src/components/header.tsx+8−1
@@ -12,7 +12,14 @@ const Header: React.FC<{
1212 }> = ({ isSettingsOpen, handleSettingsOpen }) => {
1313 return (
1414 <RowContainer className="p-4 border-b border-slate-400 dark:border-slate-600">
15- <h1 className="text-lg font-bold">The Champ's Timer 🥊</h1>
15+ <h1 className="text-lg font-bold">
16+ <img
17+ src="/stopwatch-icon.svg"
18+ alt="Stopwatch"
19+ className="size-10 inline-block bottom-0.5 relative mr-4"
20+ />
21+ The Champ's Timer
22+ </h1>
1623
1724 <Button onClick={handleSettingsOpen}>
1825 {isSettingsOpen ? (