Skip to content

Commit

Permalink
revert
Browse files Browse the repository at this point in the history
  • Loading branch information
Stijnus committed Jan 30, 2025
1 parent 1eae44d commit 2c991e4
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 17 deletions.
2 changes: 1 addition & 1 deletion app/components/chat/StarterTemplates.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const FrameworkLink: React.FC<FrameworkLinkProps> = ({ template }) => (
className="items-center justify-center"
>
<div
className={`inline-flex items-center justify-center ${template.icon} w-8 h-8 text-4xl transition-theme opacity-25 hover:opacity-100 hover:text-purple-500 dark:text-white dark:opacity-50 dark:hover:opacity-100 dark:hover:text-purple-400 transition-all`}
className={`inline-block ${template.icon} w-8 h-8 text-4xl transition-theme opacity-25 hover:opacity-100 hover:text-purple-500 dark:text-white dark:opacity-50 dark:hover:opacity-100 dark:hover:text-purple-400 transition-all`}
title={template.label}
/>
</a>
Expand Down
20 changes: 10 additions & 10 deletions app/utils/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,31 +31,31 @@ export const STARTER_TEMPLATES: Template[] = [
description: 'Lightweight Astro starter template for building fast static websites',
githubRepo: 'thecodacus/bolt-astro-basic-template',
tags: ['astro', 'blog', 'performance'],
icon: 'i-bolt-astro',
icon: 'i-bolt:astro',
},
{
name: 'bolt-nextjs-shadcn',
label: 'Next.js with shadcn/ui',
description: 'Next.js starter fullstack template integrated with shadcn/ui components and styling system',
githubRepo: 'thecodacus/bolt-nextjs-shadcn-template',
tags: ['nextjs', 'react', 'typescript', 'shadcn', 'tailwind'],
icon: 'i-bolt-nextjs',
icon: 'i-bolt:nextjs',
},
{
name: 'bolt-qwik-ts',
label: 'Qwik TypeScript',
description: 'Qwik framework starter with TypeScript for building resumable applications',
githubRepo: 'thecodacus/bolt-qwik-ts-template',
tags: ['qwik', 'typescript', 'performance', 'resumable'],
icon: 'i-bolt-qwik',
icon: 'i-bolt:qwik',
},
{
name: 'bolt-remix-ts',
label: 'Remix TypeScript',
description: 'Remix framework starter with TypeScript for full-stack web applications',
githubRepo: 'thecodacus/bolt-remix-ts-template',
tags: ['remix', 'typescript', 'fullstack', 'react'],
icon: 'i-bolt-remix',
icon: 'i-bolt:remix',
},
{
name: 'bolt-slidev',
Expand All @@ -71,46 +71,46 @@ export const STARTER_TEMPLATES: Template[] = [
description: 'SvelteKit starter template for building fast, efficient web applications',
githubRepo: 'bolt-sveltekit-template',
tags: ['svelte', 'sveltekit', 'typescript'],
icon: 'i-bolt-svelte',
icon: 'i-bolt:svelte',
},
{
name: 'vanilla-vite',
label: 'Vanilla + Vite',
description: 'Minimal Vite starter template for vanilla JavaScript projects',
githubRepo: 'thecodacus/vanilla-vite-template',
tags: ['vite', 'vanilla-js', 'minimal'],
icon: 'i-bolt-vite',
icon: 'i-bolt:vite',
},
{
name: 'bolt-vite-react',
label: 'React + Vite + typescript',
description: 'React starter template powered by Vite for fast development experience',
githubRepo: 'thecodacus/bolt-vite-react-ts-template',
tags: ['react', 'vite', 'frontend'],
icon: 'i-bolt-react',
icon: 'i-bolt:react',
},
{
name: 'bolt-vite-ts',
label: 'Vite + TypeScript',
description: 'Vite starter template with TypeScript configuration for type-safe development',
githubRepo: 'thecodacus/bolt-vite-ts-template',
tags: ['vite', 'typescript', 'minimal'],
icon: 'i-bolt-typescript',
icon: 'i-bolt:typescript',
},
{
name: 'bolt-vue',
label: 'Vue.js',
description: 'Vue.js starter template with modern tooling and best practices',
githubRepo: 'thecodacus/bolt-vue-template',
tags: ['vue', 'typescript', 'frontend'],
icon: 'i-bolt-vue',
icon: 'i-bolt:vue',
},
{
name: 'bolt-angular',
label: 'Angular Starter',
description: 'A modern Angular starter template with TypeScript support and best practices configuration',
githubRepo: 'thecodacus/bolt-angular-template',
tags: ['angular', 'typescript', 'frontend', 'spa'],
icon: 'i-bolt-angular',
icon: 'i-bolt:angular',
},
];
25 changes: 19 additions & 6 deletions uno.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { globSync } from 'fast-glob';
import fs from 'node:fs/promises';
import { basename, join } from 'node:path';
import { defineConfig, presetIcons, presetUno, transformerDirectives } from 'unocss';
import type { IconifyJSON } from '@iconify/types';

// Debug: Log the current working directory and icon paths
console.log('CWD:', process.cwd());
Expand All @@ -15,11 +16,13 @@ const customIconCollection = {
[collectionName]: iconPaths.reduce(
(acc, iconPath) => {
const [iconName] = basename(iconPath).split('.');
console.log(`Loading icon: ${iconName} from ${iconPath}`);
console.log(`Loading icon: ${iconName} from ${iconPath}`); // Debug log

acc[iconName] = async () => {
try {
const content = await fs.readFile(iconPath, 'utf8');

// Simplified SVG processing
return content
.replace(/fill="[^"]*"/g, 'fill="currentColor"')
.replace(/fill='[^']*'/g, "fill='currentColor'")
Expand Down Expand Up @@ -120,7 +123,7 @@ export default defineConfig({
safelist: [
// Explicitly safelist all icon combinations
...Object.keys(customIconCollection[collectionName] || {}).map((x) => `i-${collectionName}-${x}`),
...Object.keys(customIconCollection[collectionName] || {}).map((x) => `i-${collectionName}-${x.toLowerCase()}`),
...Object.keys(customIconCollection[collectionName] || {}).map((x) => `i-${collectionName}:${x}`),
],
shortcuts: {
'bolt-ease-cubic-bezier': 'ease-[cubic-bezier(0.4,0,0.2,1)]',
Expand Down Expand Up @@ -263,17 +266,27 @@ export default defineConfig({
presetIcons({
warn: true,
collections: {
[collectionName]: customIconCollection[collectionName],
bolt: customIconCollection.bolt,
ph: async () => {
const icons = await import('@iconify-json/ph/icons.json');
return icons.default as IconifyJSON;
},
},
extraProperties: {
display: 'inline-block',
'vertical-align': 'middle',
width: '24px',
height: '24px',
},
scale: 1,
unit: 'px',
cdn: '',
customizations: {
customize(props) {
return {
...props,
width: '24px',
height: '24px',
};
},
},
}),
],
});
Expand Down

0 comments on commit 2c991e4

Please sign in to comment.