pages terminal scripts
This commit is contained in:
@@ -1,74 +1,11 @@
|
||||
<script lang="ts">
|
||||
import TerminalTUI from '$lib/components/TerminalTUI.svelte';
|
||||
import type { TerminalLine } from '$lib/components/tui/types';
|
||||
import { user, sortedCards, projects } from '$lib/config';
|
||||
import { user } from '$lib/config';
|
||||
import { getPageSpeedMultiplier, getPageAutoscroll } from '$lib';
|
||||
import { lines } from '$lib/pages/projects';
|
||||
|
||||
const speed = getPageSpeedMultiplier('projects');
|
||||
const autoscroll = getPageAutoscroll('projects');
|
||||
|
||||
// Count stats
|
||||
const totalHackathons = sortedCards.length;
|
||||
const totalAwards = sortedCards.filter(c => c.awards && c.awards.length > 0).length;
|
||||
const featuredCount = sortedCards.filter(c => c.featured).length;
|
||||
|
||||
// Build the terminal lines with card grid
|
||||
const lines: TerminalLine[] = [
|
||||
{ type: 'divider', content: 'PROJECTS' },
|
||||
{ type: 'command', content: 'ls ~/projects --grid' },
|
||||
{ type: 'blank', content: '' },
|
||||
...projects.filter(p => p.featured).flatMap(project => [
|
||||
{ type: 'header' as const, content: `(&primary,bold)${project.name}(&)` },
|
||||
{ type: 'output' as const, content: `(&muted)${project.description}(&)` },
|
||||
{ type: 'info' as const, content: `(&info)Tech: (&primary)${project.tech.join(', ')}(&)` },
|
||||
...(project.github ? [{
|
||||
type: 'button' as const,
|
||||
content: 'View on GitHub',
|
||||
icon: 'mdi:github',
|
||||
style: 'accent' as const,
|
||||
href: project.github
|
||||
}] : []),
|
||||
...(project.live ? [{
|
||||
type: 'button' as const,
|
||||
content: 'View Live Demo',
|
||||
icon: 'mdi:open-in-new',
|
||||
style: 'accent' as const,
|
||||
href: project.live
|
||||
}] : []),
|
||||
{ type: 'blank' as const, content: '' }
|
||||
]),
|
||||
...projects.filter(p => !p.featured).flatMap(project => [
|
||||
{ type: 'success' as const, content: `(&success)${project.name}(&)` },
|
||||
{ type: 'output' as const, content: `(&muted)${project.description}(&)` },
|
||||
{ type: 'info' as const, content: `(&info)Tech:(&) (&primary)${project.tech.join(', ')}(&)` },
|
||||
...(project.github ? [{
|
||||
type: 'button' as const,
|
||||
content: 'View on GitHub',
|
||||
icon: 'mdi:github',
|
||||
style: 'accent' as const,
|
||||
href: project.github
|
||||
}] : []),
|
||||
...(project.live ? [{
|
||||
type: 'button' as const,
|
||||
content: 'View Live',
|
||||
icon: 'mdi:open-in-new',
|
||||
style: 'accent' as const,
|
||||
href: project.live
|
||||
}] : []),
|
||||
{ type: 'blank' as const, content: '' }
|
||||
]),
|
||||
{ type: 'blank', content: '' },
|
||||
{ type: 'divider', content: 'HACKATHONS' },
|
||||
{ type: 'command', content: 'ls ~/hackathons --grid' },
|
||||
{ type: 'blank', content: '' },
|
||||
{ type: 'header', content: `Hackathon Journey` },
|
||||
{ type: 'output', content: `(&muted)Total:(&) (&primary)${totalHackathons}(&) (&muted)| Awards:(&) (&yellow)${totalAwards}(&) (&muted)| Featured:(&) (&accent)${featuredCount}(&)` },
|
||||
{ type: 'blank', content: '' },
|
||||
{ type: 'blank', content: '' },
|
||||
{ type: 'cardgrid', content: '', cards: sortedCards },
|
||||
{ type: 'blank', content: '' },
|
||||
{ type: 'success', content: `(&success)Ready for the next hackathon! 🚀(&)` },
|
||||
];
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
|
||||
Reference in New Issue
Block a user