feat: changed card style and formatting to improve clarity for users #32

Merged
ca422 merged 1 commits from feat/space-card-style-change into master 2025-06-05 00:33:55 +00:00
2 changed files with 8 additions and 2 deletions

View File

@@ -4,16 +4,18 @@
interface Props { interface Props {
alt: string; alt: string;
imgSrc: string; imgSrc: string;
title?: Snippet;
description?: Snippet; description?: Snippet;
href?: string; href?: string;
} }
const { alt, imgSrc, description, href }: Props = $props(); const { alt, imgSrc, title, description, href }: Props = $props();
</script> </script>
<a class="card" {href}> <a class="card" {href}>
<img src={imgSrc} {alt} /> <img src={imgSrc} {alt} />
<div class="description"> <div class="description">
{@render title?.()}
{@render description?.()} {@render description?.()}
</div> </div>
</a> </a>
@@ -22,7 +24,7 @@
.card { .card {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
background-color: #38353f; background-color: #49bd85;
} }
.description { .description {
padding: 0.5rem; padding: 0.5rem;

View File

@@ -27,6 +27,10 @@
href="/space/{studySpace.id}" href="/space/{studySpace.id}"
imgSrc={imgUrl} imgSrc={imgUrl}
> >
{#snippet title()}
<h1>{studySpace.location}</h1>
{/snippet}
{#snippet description()} {#snippet description()}
<p>{studySpace.description}</p> <p>{studySpace.description}</p>
{/snippet} {/snippet}