~repos /website
git clone https://pyrossh.dev/repos/website.git
木 Personal website of pyrossh. Built with astrojs, shiki, vite.
3c132d87
—
pyrossh 7 months ago
update README
- README.md +3 -9
- src/layouts/Post.astro +0 -73
README.md
CHANGED
|
@@ -1,17 +1,11 @@
|
|
|
1
|
+
# Website
|
|
2
|
+
|
|
1
|
-
|
|
3
|
+
Built with Astro Starter Kit: Blog,
|
|
2
4
|
|
|
3
5
|
```sh
|
|
4
6
|
bun create astro@latest -- --template blog
|
|
5
7
|
```
|
|
6
8
|
|
|
7
|
-
[](https://stackblitz.com/github/withastro/astro/tree/latest/examples/blog)
|
|
8
|
-
[](https://codesandbox.io/p/sandbox/github/withastro/astro/tree/latest/examples/blog)
|
|
9
|
-
[](https://codespaces.new/withastro/astro?devcontainer_path=.devcontainer/blog/devcontainer.json)
|
|
10
|
-
|
|
11
|
-
> 🧑🚀 **Seasoned astronaut?** Delete this file. Have fun!
|
|
12
|
-
|
|
13
|
-

|
|
14
|
-
|
|
15
9
|
Features:
|
|
16
10
|
|
|
17
11
|
- ✅ Minimal styling (make it your own!)
|
src/layouts/Post.astro
DELETED
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
import type { CollectionEntry } from 'astro:content';
|
|
3
|
-
import FormattedDate from '../components/FormattedDate.astro';
|
|
4
|
-
import Layout from './Base.astro';
|
|
5
|
-
|
|
6
|
-
type Props = CollectionEntry<'blog'>['data'];
|
|
7
|
-
|
|
8
|
-
const { title, description, pubDate, updatedDate, heroImage } = Astro.props;
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
<Layout>
|
|
12
|
-
<article>
|
|
13
|
-
<div class="hero-image">
|
|
14
|
-
{heroImage && <img width={1020} height={510} src={heroImage} alt="" />}
|
|
15
|
-
</div>
|
|
16
|
-
<div class="prose">
|
|
17
|
-
<div class="title">
|
|
18
|
-
<div class="date">
|
|
19
|
-
<FormattedDate date={pubDate} />
|
|
20
|
-
{
|
|
21
|
-
updatedDate && (
|
|
22
|
-
<div class="last-updated-on">
|
|
23
|
-
Last updated on <FormattedDate date={updatedDate} />
|
|
24
|
-
</div>
|
|
25
|
-
)
|
|
26
|
-
}
|
|
27
|
-
</div>
|
|
28
|
-
<h1>{title}</h1>
|
|
29
|
-
<hr />
|
|
30
|
-
</div>
|
|
31
|
-
<slot />
|
|
32
|
-
</div>
|
|
33
|
-
</article>
|
|
34
|
-
</Layout>
|
|
35
|
-
<style>
|
|
36
|
-
main {
|
|
37
|
-
width: calc(100% - 2em);
|
|
38
|
-
max-width: 100%;
|
|
39
|
-
margin: 0;
|
|
40
|
-
}
|
|
41
|
-
.hero-image {
|
|
42
|
-
width: 100%;
|
|
43
|
-
}
|
|
44
|
-
.hero-image img {
|
|
45
|
-
display: block;
|
|
46
|
-
margin: 0 auto;
|
|
47
|
-
border-radius: 12px;
|
|
48
|
-
box-shadow: var(--box-shadow);
|
|
49
|
-
}
|
|
50
|
-
.prose {
|
|
51
|
-
width: 720px;
|
|
52
|
-
max-width: calc(100% - 2em);
|
|
53
|
-
margin: auto;
|
|
54
|
-
padding: 1em;
|
|
55
|
-
color: rgb(var(--gray-dark));
|
|
56
|
-
}
|
|
57
|
-
.title {
|
|
58
|
-
margin-bottom: 1em;
|
|
59
|
-
padding: 1em 0;
|
|
60
|
-
text-align: center;
|
|
61
|
-
line-height: 1;
|
|
62
|
-
}
|
|
63
|
-
.title h1 {
|
|
64
|
-
margin: 0 0 0.5em 0;
|
|
65
|
-
}
|
|
66
|
-
.date {
|
|
67
|
-
margin-bottom: 0.5em;
|
|
68
|
-
color: rgb(var(--gray));
|
|
69
|
-
}
|
|
70
|
-
.last-updated-on {
|
|
71
|
-
font-style: italic;
|
|
72
|
-
}
|
|
73
|
-
</style>
|