diff --git a/public/fonts/7segment.woff b/public/fonts/7segment.woff new file mode 100644 index 0000000..09ab315 Binary files /dev/null and b/public/fonts/7segment.woff differ diff --git a/resources/css/app.css b/resources/css/app.css index 2b360a8..912a683 100644 --- a/resources/css/app.css +++ b/resources/css/app.css @@ -5,12 +5,23 @@ @source '../views'; @source '../../vendor/laravel/framework/src/Illuminate/Pagination/resources/views/*.blade.php'; +@font-face { + font-family: '7Segment'; + src: url('/fonts/7segment.woff') format('woff'); + font-weight: normal; + font-style: normal; +} + +.font-digital { + font-family: '7Segment', monospace; +} + @custom-variant dark (&:is(.dark *)); @theme { --font-sans: 'Instrument Sans', ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji'; - + --font-mono-display: 'Major Mono Display', ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, 'DejaVu Sans Mono', monospace; diff --git a/resources/js/components/Display/LedCounter.tsx b/resources/js/components/Display/LedCounter.tsx index b79b497..f5c72f2 100644 --- a/resources/js/components/Display/LedCounter.tsx +++ b/resources/js/components/Display/LedCounter.tsx @@ -15,9 +15,9 @@ interface LedCounterProps { onAddMilestone?: () => void; } -export default function LedCounter({ - value, - className, +export default function LedCounter({ + value, + className, animate = true, currentPrice, onHover, @@ -45,13 +45,13 @@ export default function LedCounter({ // Milestone navigation const nextMilestone = () => { - setCurrentMilestoneIndex((prev) => + setCurrentMilestoneIndex((prev) => prev < milestones.length - 1 ? prev + 1 : 0 ); }; const prevMilestone = () => { - setCurrentMilestoneIndex((prev) => + setCurrentMilestoneIndex((prev) => prev > 0 ? prev - 1 : milestones.length - 1 ); }; @@ -72,7 +72,7 @@ export default function LedCounter({ const duration = 1000; // 1 second animation const steps = 60; // 60fps const stepValue = (value - displayValue) / steps; - + if (Math.abs(stepValue) < 0.01) { setDisplayValue(value); return; @@ -101,7 +101,7 @@ export default function LedCounter({ // Otherwise show up to 6 decimal places, removing trailing zeros return value.toFixed(6).replace(/\.?0+$/, ''); }; - + const formattedValue = formatValue(displayValue); const formatCurrency = (amount: number) => { @@ -113,7 +113,7 @@ export default function LedCounter({ }; return ( -
{/* Background glow effect */} -
+
{formattedValue}
- + {/* Main LED text */}
{/* Progress Bar */} -
@@ -213,9 +213,9 @@ export default function LedCounter({ {isCompleted && (
)} - + {/* Progress fill */} -
- + {/* Glow effect */} -
{value.toFixed(2)} / {currentMilestone.target}
- +
{currentMilestone.label}
- +
{isCompleted ? 'COMPLETED' : `${(100 - progress).toFixed(1)}% TO GO`}
@@ -287,7 +287,7 @@ export default function LedCounter({ MILE )} - + - + {/* Stats indicator */}
); -} \ No newline at end of file +} diff --git a/resources/js/components/Display/LedDisplay.tsx b/resources/js/components/Display/LedDisplay.tsx index c12f0c6..822242f 100644 --- a/resources/js/components/Display/LedDisplay.tsx +++ b/resources/js/components/Display/LedDisplay.tsx @@ -73,7 +73,7 @@ export default function LedDisplay({ >
{/* Background glow effect */} -
+
{formattedValue}
@@ -81,7 +81,7 @@ export default function LedDisplay({
+ + @routes @viteReactRefresh