feat: changed card style and formatting to improve clarity for users #32
@@ -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;
|
||||||
|
|||||||
@@ -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}
|
||||||
|
|||||||
Reference in New Issue
Block a user