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

Co-Authored-By: Tadios Temesgen <tt2022@ic.ac.uk>
This commit is contained in:
Caspar Jojo Asaam
2025-06-05 01:26:45 +01:00
parent b49f937dcb
commit 55d9646b07
2 changed files with 8 additions and 2 deletions

View File

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

View File

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