Create a list of notes

This commit is contained in:
Ivan R. 2023-10-01 11:03:35 +05:00
parent 489b258e26
commit 5e9f3437a6
No known key found for this signature in database
GPG key ID: 56C7BAAE859B302C
4 changed files with 25 additions and 2 deletions

View file

@ -1,6 +1,5 @@
<nav>
<a href="/">Главная</a>
<a href="/self-hosting">Децентрализируемся</a>
</nav>
<style>

20
src/components/Note.astro Normal file
View file

@ -0,0 +1,20 @@
---
interface Props {
date: string
title: string;
href: string;
}
const { date, title, href } = Astro.props;
---
<div class="note">
<div>{ date }</div> — <a href={href}>{ title }</a>
</div>
<style>
.note {
display: flex;
gap: 6px;
}
</style>

View file

@ -1,5 +1,6 @@
---
import Layout from '../layouts/Layout.astro';
import Note from '../components/Note.astro';
---
<Layout title="Уютный домик">
@ -11,6 +12,9 @@ import Layout from '../layouts/Layout.astro';
<p>
Я Иван. Скорее всего, я буду рассказывать что-нибудь про компьютеры и интернет, такой уж я человек.
</p>
<h2>Заметки</h2>
<Note date="2023-08-27" title="Децентрализируемся" href="/notes/self-hosting" />
</Layout>
<style>

View file

@ -1,5 +1,5 @@
---
import Layout from '../layouts/Layout.astro';
import Layout from '../../layouts/Layout.astro';
---
<Layout title="Децентрализируемся!">