~repos /website

#astro#js#html#css

git clone https://pyrossh.dev/repos/website.git

木 Personal website of pyrossh. Built with astrojs, shiki, vite.


a6a85b41 pyrossh

2 weeks ago
remove badges
src/consts.ts CHANGED
@@ -14,14 +14,7 @@ export const REPOS = [
14
14
  {
15
15
  title: "rust-embed",
16
16
  description: "rust macro which loads files into the rust binary at compile time during release and loads the file from the fs during dev.",
17
- tags: ['rust', 'proc-macro', 'http'],
17
+ tags: ['rust', 'proc-macro', 'http']
18
- badges: [
19
- {
20
- href: "https://crates.io/crates/rust-embed",
21
- img: "https://img.shields.io/crates/v/rust-embed",
22
- alt: "crates.io",
23
- }
24
- ]
25
18
  },
26
19
  {
27
20
  title: "website",
@@ -46,26 +39,12 @@ export const REPOS = [
46
39
  {
47
40
  title: "atoms-element",
48
41
  description: "A simple web component library for defining your custom elements. It works on both client and server.",
49
- tags: ['js'],
42
+ tags: ['js']
50
- badges: [
51
- {
52
- href: "https://www.npmjs.com/package/atoms-element",
53
- img: "https://img.shields.io/npm/v/atoms-element?color=ba271a",
54
- alt: "npmjs.com",
55
- }
56
- ]
57
43
  },
58
44
  {
59
45
  title: "atoms-state",
60
46
  description: "Simple State management for react",
61
- tags: ['js', 'react', 'flux'],
47
+ tags: ['js', 'react', 'flux']
62
- badges: [
63
- {
64
- href: "https://www.npmjs.com/package/atoms-state",
65
- img: "https://img.shields.io/npm/v/atoms-state?color=ba271a",
66
- alt: "npmjs.com",
67
- }
68
- ]
69
48
  },
70
49
  {
71
50
  title: "remote-monitor",
src/content.config.ts CHANGED
@@ -22,7 +22,6 @@ export const collections = {
22
22
  title: r.title,
23
23
  description: r.description,
24
24
  tags: r.tags,
25
- badges: r.badges || [],
26
25
  absolutePath: repoPath,
27
26
  },
28
27
  rendered: readmeContent,
@@ -34,11 +33,6 @@ export const collections = {
34
33
  title: z.string(),
35
34
  description: z.string().max(80),
36
35
  tags: z.array(z.string()),
37
- badges: z.array(z.object({
38
- href: z.string(),
39
- img: z.string(),
40
- alt: z.string(),
41
- })).optional(),
42
36
  absolutePath: z.string(),
43
37
  }),
44
38
  }),
src/layouts/RepoLayout.astro CHANGED
@@ -9,7 +9,7 @@ type Props = {
9
9
 
10
10
  const { repo } = Astro.props;
11
11
  const {
12
- data: { title, description, tags, badges },
12
+ data: { title, description, tags },
13
13
  } = repo;
14
14
  const { pathname } = Astro.url;
15
15
  ---
@@ -21,15 +21,6 @@ const { pathname } = Astro.url;
21
21
  <a href="/">~repos</a>
22
22
  /{title}
23
23
  </h1>
24
- <div class="badges">
25
- {
26
- badges!.map((badge) => (
27
- <a href={badge.href} target="_blank" rel="noopener noreferrer">
28
- <img src={badge.img} alt={badge.alt} />
29
- </a>
30
- ))
31
- }
32
- </div>
33
24
  <div class="tags">
34
25
  {tags.map((tag) => <span class="tag">#{tag}</span>)}
35
26
  </div>
@@ -141,6 +132,7 @@ const { pathname } = Astro.url;
141
132
  font-weight: 500;
142
133
  line-height: 1;
143
134
  margin-bottom: 0.1rem;
135
+ flex: 1;
144
136
 
145
137
  a {
146
138
  color: var(--color-link);
@@ -170,17 +162,6 @@ const { pathname } = Astro.url;
170
162
  }
171
163
  }
172
164
 
173
- .badges {
174
- flex: 1;
175
- display: flex;
176
- margin-left: 1rem;
177
- margin-right: 1rem;
178
-
179
- @media (max-width: 720px) {
180
- margin: 0.5rem 0rem;
181
- }
182
- }
183
-
184
165
  hr {
185
166
  margin-top: 0.5rem;
186
167
  border-color: var(--color-text);