Better cards
This commit is contained in:
@@ -6,4 +6,4 @@
|
|||||||
{metadata.date}
|
{metadata.date}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h1>{metadata.title}</h1>
|
<h1>{@html metadata.title}</h1>
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import Navbar from "$lib/components/Navbar.svelte";
|
|||||||
</div>
|
</div>
|
||||||
</Navbar>
|
</Navbar>
|
||||||
|
|
||||||
<article class="px-2 py-8 md:px-8 max-w-[980px] mx-auto text-lg">
|
<article class="px-2 py-8 md:px-8 max-w-[800px] mx-auto text-lg">
|
||||||
<slot />
|
<slot />
|
||||||
</article>
|
</article>
|
||||||
|
|
||||||
|
|||||||
@@ -2,19 +2,26 @@
|
|||||||
export let data;
|
export let data;
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<section class="px-2 md:px-8 mb-16 max-w-[1280px] mx-auto">
|
<section class="px-2 md:px-8 mb-16 mx-auto">
|
||||||
<h2 class="text-4xl mb-10 md:text-5xl">
|
<h2 class="text-4xl mb-10 md:text-5xl">
|
||||||
Статьи
|
Статьи
|
||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
<div class="flex flex-col gap-14">
|
<div class="flex flex-col gap-8">
|
||||||
{#each data.posts as post}
|
{#each data.posts as post}
|
||||||
<a
|
<a
|
||||||
href={post.href}
|
href={post.href}
|
||||||
|
class="card bg-slate-800 p-6 rounded-xl hover:bg-slate-700"
|
||||||
>
|
>
|
||||||
<div class="text-sm">{post.date}</div>
|
<div class="text-sm">{post.date}</div>
|
||||||
<h4 class="text-2xl md:text-3xl">{post.title}</h4>
|
<h4 class="text-2xl md:text-3xl">{@html post.title}</h4>
|
||||||
</a>
|
</a>
|
||||||
{/each}
|
{/each}
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
<style lang="postcss">
|
||||||
|
.card {
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
title: "HTML in CSS: как сократить HTML-код и писать только на CSS"
|
title: "HTML in CSS: как сократить HTML-код и писать только на CSS"
|
||||||
date: "2024-08-01"
|
date: "2024-08-01"
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user