Create a list of notes
This commit is contained in:
parent
489b258e26
commit
5e9f3437a6
4 changed files with 25 additions and 2 deletions
|
@ -1,6 +1,5 @@
|
|||
<nav>
|
||||
<a href="/">Главная</a>
|
||||
<a href="/self-hosting">Децентрализируемся</a>
|
||||
</nav>
|
||||
|
||||
<style>
|
||||
|
|
20
src/components/Note.astro
Normal file
20
src/components/Note.astro
Normal 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>
|
|
@ -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>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
import Layout from '../layouts/Layout.astro';
|
||||
import Layout from '../../layouts/Layout.astro';
|
||||
---
|
||||
|
||||
<Layout title="Децентрализируемся!">
|
Loading…
Reference in a new issue