From eca411fcf1b0dcc4a0f76299bc25746bfe6aa2f7 Mon Sep 17 00:00:00 2001 From: Sir Blob Date: Tue, 4 Nov 2025 03:36:20 +0000 Subject: [PATCH] Hackathon Page --- src/lib/components/HackCard.svelte | 161 ++++++++++++++++++----------- src/routes/+page.svelte | 10 +- src/routes/hackathons/+page.svelte | 127 +++++++++++++++++++---- static/hacks/carbin.png | Bin 0 -> 67815 bytes static/hacks/drinkhappy.png | Bin 0 -> 484978 bytes static/hacks/fooddecisive.png | Bin 0 -> 97771 bytes static/hacks/patsafe.png | Bin 0 -> 15380 bytes static/hacks/roadcast.png | Bin 0 -> 1414181 bytes 8 files changed, 216 insertions(+), 82 deletions(-) create mode 100644 static/hacks/carbin.png create mode 100644 static/hacks/drinkhappy.png create mode 100644 static/hacks/fooddecisive.png create mode 100644 static/hacks/patsafe.png create mode 100644 static/hacks/roadcast.png diff --git a/src/lib/components/HackCard.svelte b/src/lib/components/HackCard.svelte index dc72f18..6167493 100644 --- a/src/lib/components/HackCard.svelte +++ b/src/lib/components/HackCard.svelte @@ -2,75 +2,133 @@ export let title: string = "Project Title"; export let description: string = "Short project description that explains what the project does in one or two lines."; - export let image: string = "/src/lib/images/project.png"; + export let image: string = ""; export let link: string = ""; export let repo: string = ""; - export let date: string = ""; + export let devpost: string = ""; + export let hackathonName: string = ""; + export let university: string = ""; + export let location: string = ""; + export let year: string = ""; export let tags: string[] = []; export let featured: boolean = false; + export let awards: { track: string; place: string }[] = []; + export let liveWarning: boolean = false; + $: placeholderImage = `https://placehold.co/800x400/334155/94a3b8?text=${encodeURIComponent(title)}`; + $: displayImage = image || placeholderImage;
- -
+ +
{title}
-
-
-
-

- {title} -

- {#if date} -

{date}

- {/if} -
- + +
+ +
+

+ {title} +

{#if featured} Featured {/if}
-

{description}

+ +
+ {#if hackathonName} + {hackathonName} + {/if} + {#if university} + {university} + {/if} + {#if location} + {location} + {/if} + {#if year} + {year} + {/if} +
-
-
- {#each tags as tag} - {tag} + + {#if awards && awards.length > 0} +
+ {#each awards as award} +
+ 🏆 + {award.place} + + {award.track} +
{/each}
+ {/if} +
-
- {#if repo} - Repo - {/if} - {#if link} - Live - {/if} + +
+

{description}

+ + {#if liveWarning && link} +
+ ⚠️ + Live site may not include all features from the original project.
+ {/if} +
+ + +
+ + {#if tags && tags.length > 0} +
+ {#each tags as tag} + {tag} + {/each} +
+ {/if} + + +
+ {#if devpost} + + + + {/if} + {#if repo} + Repo + {/if} + {#if link} + Live + {/if}
@@ -80,21 +138,8 @@ @apply w-full; } - /* note: using project surface tokens (bg-surface-300 / dark:bg-surface-700) - removed the old .bg-card-alt fallback to avoid unused selector warnings */ - - /* fit text helper (copied from ProjectCard) */ - .fit-text-in-div { - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - display: block; - max-width: 14rem; - margin: 0; - } - - /* ensure image badge doesn't collapse */ - .ring-4 { - box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.08); + h3 { + word-break: break-word; + hyphens: auto; } diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 1b902e4..75ac113 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -10,7 +10,7 @@

Sir Blob


-

Projects, Games, API, and More

+

Projects, Games, API, and More!

- +