feat: implement Figlet, Pastel, and Unit tools with a unified layout

- Add Figlet text converter with font selection and history
- Add Pastel color palette generator and manipulation suite
- Add comprehensive Units converter with category-based logic
- Introduce AppShell with Sidebar and Header for navigation
- Modernize theme system with CSS variables and new animations
- Update project configuration and dependencies
This commit is contained in:
2026-02-22 21:35:53 +01:00
parent ff6bb873eb
commit 2000623c67
540 changed files with 338653 additions and 809 deletions

29
app/api/fonts/route.ts Normal file
View File

@@ -0,0 +1,29 @@
import { NextResponse } from 'next/server';
import fs from 'fs';
import path from 'path';
export const dynamic = 'force-static';
export async function GET() {
try {
const fontsDir = path.join(process.cwd(), 'public/fonts/figlet-fonts');
const files = fs.readdirSync(fontsDir);
const fonts = files
.filter(file => file.endsWith('.flf'))
.map(file => {
const name = file.replace('.flf', '');
return {
name,
fileName: file,
path: `/fonts/figlet-fonts/${file}`,
};
})
.sort((a, b) => a.name.localeCompare(b.name));
return NextResponse.json(fonts);
} catch (error) {
console.error('Error reading fonts directory:', error);
return NextResponse.json({ error: 'Failed to load fonts' }, { status: 500 });
}
}