~repos /website
git clone https://pyrossh.dev/repos/website.git
木 Personal website of pyrossh. Built with astrojs, shiki, vite.
7ecf83d7
—
pyrossh 2 weeks ago
update repo layout
src/layouts/RepoLayout.astro
CHANGED
|
@@ -187,6 +187,7 @@ const { pathname } = Astro.url;
|
|
|
187
187
|
|
|
188
188
|
hr {
|
|
189
189
|
margin-top: 0.5rem;
|
|
190
|
+
border-color: var(--color-text);
|
|
190
191
|
}
|
|
191
192
|
|
|
192
193
|
.nav {
|
src/pages/repos/[...repoId]/index.astro
CHANGED
|
@@ -2,8 +2,6 @@
|
|
|
2
2
|
import { type CollectionEntry, getCollection } from "astro:content";
|
|
3
3
|
import { render } from "astro:content";
|
|
4
4
|
import RepoLayout from "@/layouts/RepoLayout.astro";
|
|
5
|
-
import Commit from "@/components/Commit.astro";
|
|
6
|
-
import { getCommits } from "@/utils/commit";
|
|
7
5
|
|
|
8
6
|
export async function getStaticPaths() {
|
|
9
7
|
const repos = await getCollection("repos");
|
|
@@ -19,16 +17,10 @@ type Props = {
|
|
|
19
17
|
};
|
|
20
18
|
|
|
21
19
|
const { repo } = Astro.props;
|
|
22
|
-
const commits = await getCommits(repo.data.absolutePath);
|
|
23
|
-
const latestCommits = commits.slice(0, 3);
|
|
24
20
|
const { Content } = await render(repo);
|
|
25
21
|
---
|
|
26
22
|
|
|
27
23
|
<RepoLayout repo={repo}>
|
|
28
|
-
<div class="summary">
|
|
29
|
-
{latestCommits.map((commit) => <Commit repoId={repo.id} commit={commit} />)}
|
|
30
|
-
</div>
|
|
31
|
-
<hr />
|
|
32
24
|
<article>
|
|
33
25
|
<Content />
|
|
34
26
|
</article>
|
|
@@ -45,13 +37,13 @@ const { Content } = await render(repo);
|
|
|
45
37
|
|
|
46
38
|
article {
|
|
47
39
|
font-size: 1.1rem;
|
|
48
|
-
margin-top:
|
|
40
|
+
margin-top: 0.25rem;
|
|
49
41
|
|
|
50
42
|
h1,
|
|
51
43
|
h2 {
|
|
52
44
|
font-size: 1.5rem;
|
|
53
45
|
font-weight: 700;
|
|
54
|
-
margin-top: 0.5rem;
|
|
46
|
+
/* margin-top: 0.5rem; */
|
|
55
47
|
margin-bottom: 0.5rem;
|
|
56
48
|
}
|
|
57
49
|
|