The jollywhoppers homepage ๐Ÿฌ๐Ÿ”

feat: add disabled state to Projects

also add links! yayyayayy

xan.lol d69e2058 7da9c57f

verified
Changed files
+17 -8
src
+9 -2
src/lib/components/ProjectCard.svelte
··· 1 1 <script lang="ts"> 2 2 import { ExternalLink } from '@lucide/svelte'; 3 3 4 - let { title, href = '#', avatar, handle } = $props<{ 4 + let { title, href = '#', avatar, handle, disabled } = $props<{ 5 5 title: string; 6 6 href?: string; 7 7 avatar?: string; 8 8 handle?: string; 9 + disabled?: boolean; 9 10 }>(); 10 11 </script> 11 12 12 - <a {href} class="project-card" target="_blank" rel="noopener noreferrer"> 13 + <a {href} class="project-card {disabled ? 'disabled' : ''}" target="_blank" rel="noopener noreferrer"> 13 14 {#if avatar} 14 15 <img src={avatar} alt={title} class="project-avatar" /> 15 16 {/if} ··· 197 198 .project-card:hover :global(.project-icon) { 198 199 transform: none; 199 200 } 201 + } 202 + 203 + .project-card.disabled { 204 + opacity: 0.5; 205 + cursor: not-allowed; 206 + pointer-events: none; 200 207 } 201 208 </style>
+2 -1
src/lib/components/ProjectGrid.svelte
··· 6 6 projects = [] 7 7 } = $props<{ 8 8 title?: string; 9 - projects?: Array<{ title: string; href?: string; avatar?: string; handle?: string }>; 9 + projects?: Array<{ title: string; href?: string; avatar?: string; handle?: string; disabled?: boolean}>; 10 10 }>(); 11 11 </script> 12 12 ··· 20 20 href={project.href} 21 21 avatar={project.avatar} 22 22 handle={project.handle} 23 + disabled={project.disabled} 23 24 /> 24 25 </div> 25 26 {/each}
+1
src/lib/components/index.ts
··· 9 9 export type Project = { 10 10 title: string; 11 11 href?: string; 12 + disabled?: boolean; 12 13 // Optional member-specific fields 13 14 avatar?: string; 14 15 handle?: string;
+5 -5
src/lib/constants.ts
··· 11 11 } as const; 12 12 13 13 export const PROJECTS: Project[] = [ 14 - { title: 'Social Sync', href: '#' }, 15 - { title: 'Witchsky.app', href: '#' }, 16 - { title: 'Witchsky.social', href: '#' }, 17 - { title: 'Buttons thing', href: '#' }, 18 - { title: 'Flushes client', href: '#' } 14 + { title: 'Social Sync', href: 'https://tangled.org/jollywhoppers.com/socialsync'}, 15 + { title: 'Witchsky.app', href: 'https://witchsky.app/' }, 16 + { title: 'Witchsky.social', href: '#', disabled: true }, 17 + { title: 'Buttons thing', href: '#', disabled: true }, 18 + { title: 'Flushes client', href: '#', disabled: true } 19 19 ]; 20 20 21 21 export const CONTRIBUTORS: Project[] = [