~repos /website
git clone https://pyrossh.dev/repos/website.git
木 Personal website of pyrossh. Built with astrojs, shiki, vite.
bca7e9a6
—
pyrossh 6 months ago
fix android build
- package.json +5 -3
- src/components/Commit.astro +3 -2
- src/components/Header.astro +6 -2
- src/content.config.ts +4 -4
- src/layouts/Base.astro +5 -1
- src/layouts/Base.css +1 -11
package.json
CHANGED
|
@@ -6,8 +6,10 @@
|
|
|
6
6
|
"tauri": "tauri",
|
|
7
7
|
"dev": "astro dev",
|
|
8
8
|
"build": "astro build",
|
|
9
|
-
"android": "tauri android dev",
|
|
10
|
-
"ios": "tauri ios dev"
|
|
9
|
+
"dev:android": "tauri android dev",
|
|
10
|
+
"dev:ios": "tauri ios dev",
|
|
11
|
+
"build:android": "tauri android build --aab",
|
|
12
|
+
"sign:android": "bundletool build-apks --bundle=src-tauri/gen/android/app/build/outputs/bundle/universalRelease/app-universal-release.aab --output=./app-universal-release.apks --mode=universal --ks=../config/keystore.jks --ks-key-alias=*** --ks-pass=pass:*** --key-pass=pass:***"
|
|
11
13
|
},
|
|
12
14
|
"dependencies": {
|
|
13
15
|
"@appzic/astro-reset-css": "^1.2.0",
|
|
@@ -23,4 +25,4 @@
|
|
|
23
25
|
"@tauri-apps/cli": "^2",
|
|
24
26
|
"@types/node": "^22.15.3"
|
|
25
27
|
}
|
|
26
|
-
}
|
|
28
|
+
}
|
src/components/Commit.astro
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
import { format } from "timeago.js";
|
|
3
3
|
|
|
4
|
-
const { title, author_name, hash, date, message,
|
|
4
|
+
const { title, author_name, hash, date, message, branches, tags } = Astro.props;
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
<div class="event">
|
|
@@ -11,7 +11,8 @@ const { title, author_name, hash, date, message, refs } = Astro.props;
|
|
|
11
11
|
</a>
|
|
12
12
|
— {author_name}
|
|
13
13
|
<small class="pull-right">
|
|
14
|
+
<h3>{branches}</h3>
|
|
14
|
-
<h3>{
|
|
15
|
+
<h3>{tags}</h3>
|
|
15
16
|
<a href={`/repos/${title}/logs?from=??`} rel="nofollow">
|
|
16
17
|
<span title={date}>
|
|
17
18
|
{format(date)}
|
src/components/Header.astro
CHANGED
|
@@ -36,9 +36,13 @@ import Sun from "@/assets/icons/sun.svg";
|
|
|
36
36
|
</header>
|
|
37
37
|
<style>
|
|
38
38
|
header {
|
|
39
|
-
background: #131618;
|
|
40
|
-
min-height: 56px;
|
|
41
39
|
position: relative;
|
|
40
|
+
background: #131618;
|
|
41
|
+
width: 100%;
|
|
42
|
+
height: 56px;
|
|
43
|
+
@media (max-width: 768px) {
|
|
44
|
+
position: fixed;
|
|
45
|
+
}
|
|
42
46
|
}
|
|
43
47
|
|
|
44
48
|
.logo {
|
src/content.config.ts
CHANGED
|
@@ -39,7 +39,8 @@ export const collections = {
|
|
|
39
39
|
body: `${item.message}\n\n${item.body}`,
|
|
40
40
|
author_name: item.author_name,
|
|
41
41
|
date: item.date,
|
|
42
|
+
branches: item.refs.split(",").filter((ref: string) => ref.includes("origin/")).map((ref) => ref.replace("origin/", "")),
|
|
42
|
-
|
|
43
|
+
tags: item.refs.split(",").filter((ref: string) => ref.includes("tag: ")).map((ref) => ref.replace("tag: ", "")),
|
|
43
44
|
})),
|
|
44
45
|
},
|
|
45
46
|
rendered: readmeContent,
|
|
@@ -56,11 +57,10 @@ export const collections = {
|
|
|
56
57
|
body: z.string(),
|
|
57
58
|
author_name: z.string(),
|
|
58
59
|
date: z.string(),
|
|
60
|
+
branches: z.array(z.string()),
|
|
59
|
-
|
|
61
|
+
tags: z.array(z.string()),
|
|
60
62
|
// diff: z.string(),
|
|
61
63
|
})),
|
|
62
|
-
branches: z.array(z.string()),
|
|
63
|
-
tags: z.array(z.string()),
|
|
64
64
|
}),
|
|
65
65
|
}),
|
|
66
66
|
content: defineCollection({
|
src/layouts/Base.astro
CHANGED
|
@@ -23,7 +23,11 @@ const image = "/favicon.png";
|
|
|
23
23
|
<html lang="en">
|
|
24
24
|
<head>
|
|
25
25
|
<meta charset="utf-8" />
|
|
26
|
+
<meta
|
|
27
|
+
name="viewport"
|
|
28
|
+
content="width=device-width, initial-scale=1.0, viewport-fit=cover"
|
|
29
|
+
/>
|
|
26
|
-
<meta name="
|
|
30
|
+
<meta name="theme-color" content="#131618" />
|
|
27
31
|
<link rel="icon" type="image/svg+xml" href="/favicon.png" />
|
|
28
32
|
<link rel="sitemap" href="/sitemap-index.xml" />
|
|
29
33
|
<link
|
src/layouts/Base.css
CHANGED
|
@@ -27,16 +27,6 @@
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
body {
|
|
30
|
-
/* margin: 0;
|
|
31
|
-
padding: 0;
|
|
32
|
-
text-align: left;
|
|
33
|
-
background: linear-gradient(var(--gray-gradient)) no-repeat;
|
|
34
|
-
background-size: 100% 600px;
|
|
35
|
-
word-wrap: break-word;
|
|
36
|
-
overflow-wrap: break-word;
|
|
37
|
-
color: rgb(var(--gray-dark));
|
|
38
|
-
font-size: 20px;
|
|
39
|
-
line-height: 1.7; */
|
|
40
30
|
display: flex;
|
|
41
31
|
flex-direction: column;
|
|
42
32
|
flex: 1;
|
|
@@ -60,6 +50,6 @@ body {
|
|
|
60
50
|
|
|
61
51
|
main {
|
|
62
52
|
margin-bottom: 1rem;
|
|
63
|
-
padding-top: 1em;
|
|
53
|
+
padding-top: calc(1em + 56px);
|
|
64
54
|
padding-bottom: 1em;
|
|
65
55
|
}
|