Add final layer of advanced features for spectacular UX: ⌨️ Command Palette (CommandPalette.tsx): - Trigger with Ctrl/Cmd+K keyboard shortcut - Search and execute commands instantly - Quick access to all 23 measurement categories - Theme switching commands (light/dark/system) - Keyboard navigation (↑/↓ arrows, Enter to select) - Escape to close - Color-coded category commands - Backdrop blur overlay - Animated scale-in entrance - Footer with keyboard hints - Smart filtering by keywords 📊 Visual Comparison (VisualComparison.tsx): - Toggle between grid and chart view - Horizontal bar chart showing magnitude differences - Animated bars with 500ms transitions - Auto-calculated percentages relative to max value - Color-coded bars matching category colors - Tabular number formatting - Clean, minimal design 🔄 Unit Swap Functionality: - Swap button between From/To units - ArrowLeftRight icon - Automatically converts value on swap - Two-unit quick converter mode - Large result display with color accent - Responsive layout 📱 Footer Component (Footer.tsx): - Three-column grid layout (About, Features, Links) - GitHub repository link - convert-units library attribution - Keyboard shortcuts reference - Feature highlights - Made with ❤️ message - Responsive design (stacks on mobile) - Copyright notice with current year - Smooth hover transitions 🎨 Enhanced MainConverter: - From/To unit selector with swap button - Quick result display between selectors - Toggle between grid and chart views - BarChart3 icon for view switcher - Integrated command palette - Better spacing and layout - Target unit state management - Auto-update target unit on measure change ✨ Enhanced Page Layout: - Sticky header with backdrop blur - Flexbox layout for footer at bottom - Keyboard shortcuts hint (/ and Ctrl+K) - Improved header spacing - Better visual hierarchy Features Now Complete: ✅ Command palette with Ctrl+K ✅ Visual comparison bar charts ✅ Unit swap functionality ✅ Professional footer ✅ From/To quick converter ✅ Chart/Grid view toggle ✅ Sticky navigation header ✅ Full keyboard navigation The app is now feature-complete with: - 23 measurement categories - 187 individual units - Real-time conversion - Fuzzy search (/) - Command palette (Ctrl+K) - Dark mode - Conversion history - Favorites & copy - Visual comparisons - Unit swapping - Complete footer 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
95 lines
3.5 KiB
TypeScript
95 lines
3.5 KiB
TypeScript
import { Heart, Github, Code2 } from 'lucide-react';
|
|
|
|
export default function Footer() {
|
|
const currentYear = new Date().getFullYear();
|
|
|
|
return (
|
|
<footer className="border-t mt-16 bg-background">
|
|
<div className="container mx-auto px-4 py-8">
|
|
<div className="grid grid-cols-1 md:grid-cols-3 gap-8">
|
|
{/* About */}
|
|
<div>
|
|
<h3 className="font-semibold mb-3">Units UI</h3>
|
|
<p className="text-sm text-muted-foreground">
|
|
A spectacular unit conversion app supporting 23 measurement categories
|
|
with 187 units. Built with Next.js 16, TypeScript, and Tailwind CSS 4.
|
|
</p>
|
|
</div>
|
|
|
|
{/* Features */}
|
|
<div>
|
|
<h3 className="font-semibold mb-3">Features</h3>
|
|
<ul className="space-y-2 text-sm text-muted-foreground">
|
|
<li>• Real-time bidirectional conversion</li>
|
|
<li>• Fuzzy search across all units</li>
|
|
<li>• Dark mode support</li>
|
|
<li>• Conversion history</li>
|
|
<li>• Keyboard shortcuts</li>
|
|
<li>• Copy & favorite units</li>
|
|
</ul>
|
|
</div>
|
|
|
|
{/* Links */}
|
|
<div>
|
|
<h3 className="font-semibold mb-3">Quick Links</h3>
|
|
<ul className="space-y-2 text-sm">
|
|
<li>
|
|
<a
|
|
href="https://github.com/valknarness/units-ui"
|
|
target="_blank"
|
|
rel="noopener noreferrer"
|
|
className="text-muted-foreground hover:text-foreground transition-colors flex items-center gap-2"
|
|
>
|
|
<Github className="h-4 w-4" />
|
|
GitHub Repository
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<a
|
|
href="https://github.com/convert-units/convert-units"
|
|
target="_blank"
|
|
rel="noopener noreferrer"
|
|
className="text-muted-foreground hover:text-foreground transition-colors flex items-center gap-2"
|
|
>
|
|
<Code2 className="h-4 w-4" />
|
|
convert-units Library
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
|
|
{/* Keyboard Shortcuts */}
|
|
<div className="mt-4">
|
|
<h4 className="font-semibold text-sm mb-2">Keyboard Shortcuts</h4>
|
|
<ul className="space-y-1 text-xs text-muted-foreground">
|
|
<li>
|
|
<kbd className="px-1.5 py-0.5 bg-muted rounded">/</kbd> Focus search
|
|
</li>
|
|
<li>
|
|
<kbd className="px-1.5 py-0.5 bg-muted rounded">Ctrl</kbd>
|
|
{' + '}
|
|
<kbd className="px-1.5 py-0.5 bg-muted rounded">K</kbd> Command palette
|
|
</li>
|
|
<li>
|
|
<kbd className="px-1.5 py-0.5 bg-muted rounded">ESC</kbd> Close dialogs
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
{/* Bottom Bar */}
|
|
<div className="mt-8 pt-8 border-t flex flex-col sm:flex-row justify-between items-center gap-4 text-sm text-muted-foreground">
|
|
<div className="flex items-center gap-1">
|
|
Made with{' '}
|
|
<Heart className="h-4 w-4 text-red-500 fill-red-500" />{' '}
|
|
using Next.js 16 & Tailwind CSS 4
|
|
</div>
|
|
<div>
|
|
© {currentYear} Units UI. All rights reserved.
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</footer>
|
|
);
|
|
}
|