better cards
This commit is contained in:
@@ -5,11 +5,15 @@
|
||||
path: string;
|
||||
date?: string;
|
||||
tags?: string[];
|
||||
image?: string;
|
||||
};
|
||||
</script>
|
||||
|
||||
<a href={data.path}>
|
||||
<div class="card">
|
||||
{#if data.image}
|
||||
<img src=/img/net7.png class="image" alt={""} />
|
||||
{/if}
|
||||
<h2>{data.title}</h2>
|
||||
{#if data.description}
|
||||
<p>{data.description}</p>
|
||||
@@ -44,7 +48,6 @@
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
padding: 1rem;
|
||||
margin-top: 1rem;
|
||||
}
|
||||
|
||||
@@ -54,6 +57,7 @@
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.tag {
|
||||
@@ -62,4 +66,10 @@
|
||||
padding: 0.25rem 0.5rem;
|
||||
border-radius: 0.25rem;
|
||||
}
|
||||
|
||||
.image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
}
|
||||
</style>
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -6,6 +6,7 @@ export type Mdsvex = {
|
||||
description?: string;
|
||||
date?: string;
|
||||
tags?: string[];
|
||||
image?: string;
|
||||
};
|
||||
default: ReturnType<typeof create_ssr_component>;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user