Skip to content

Commit 25cdf15

Browse files
committed
update card layout
1 parent 83fded7 commit 25cdf15

File tree

3 files changed

+34
-21
lines changed

3 files changed

+34
-21
lines changed

docs/.vuepress/theme/lib/client/components/GithubRepo.vue

Lines changed: 31 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ onBeforeMount(() => {
6565
<Transition name="fade" mode="out-in" appear>
6666
<div class="github-repo-card" v-if="owner && repo">
6767
<span class="prefix">Linked Github Repo</span>
68-
<a :href="repoInfo?.html_url" class="card-main" target="_blank">
68+
<a :href="repoInfo?.data?.html_url" class="card-main" target="_blank">
6969
<span class="repo-title">
7070
<BookmarkSquareIcon class="icon" />
7171
<span class="repo-name">
@@ -76,6 +76,15 @@ onBeforeMount(() => {
7676
<span class="repo-description" v-if="repoInfo?.data?.description">{{
7777
repoInfo?.data?.description
7878
}}</span>
79+
<span class="repo-tags" v-if="repoInfo?.data?.topics?.length">
80+
<span v-for="tag in repoInfo?.data?.topics" class="repo-tag">{{
81+
tag
82+
}}</span>
83+
</span>
84+
<span class="other">
85+
<span class="license" v-html="repoInfo?.data?.license?.spdx_id" />
86+
<span class="lang" v-html="repoInfo?.data?.language" />
87+
</span>
7988
</a>
8089
</div>
8190
</Transition>
@@ -93,8 +102,11 @@ onBeforeMount(() => {
93102
.github-repo-card .card-main {
94103
@apply w-fit max-w-48 flex flex-col justify-center py-1 px-2 gap-1
95104
border-2 rounded border-sky-300 dark:border-sky-600
96-
97-
transition-all ease-in-out duration-300 cursor-pointer;
105+
bg-sky-100 dark:bg-sky-950
106+
transition-all ease-in-out duration-300;
107+
}
108+
.github-repo-card .card-main:has(a[href*="github.com"]) {
109+
@apply cursor-pointer;
98110
}
99111
100112
.card-main .repo-title {
@@ -111,7 +123,22 @@ onBeforeMount(() => {
111123
}
112124
113125
.repo-description {
114-
@apply text-sm opacity-50;
126+
@apply text-xs opacity-50;
127+
}
128+
129+
.repo-tags {
130+
@apply inline-flex flex-wrap gap-1;
131+
}
132+
133+
.repo-tag {
134+
@apply inline-flex items-center px-1 py-px
135+
rounded bg-blue-300 dark:bg-blue-800
136+
text-xs;
137+
}
138+
139+
.other {
140+
@apply inline-flex justify-center items-center gap-x-3
141+
text-xs text-gray-500 dark:text-gray-400;
115142
}
116143
117144
.card-main .icon {

docs/.vuepress/theme/lib/client/components/TimeList.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@ function getTagPath(tag: string) {
5555
>
5656
<span class="author">by {{ getAuthor(article.info.author) }}</span>
5757
</span>
58-
<span class="article-excerpt">{{
58+
<!-- <span class="article-excerpt">{{
5959
stringfyExcerpt(article.info.excerpt)
60-
}}</span>
60+
}}</span> -->
6161
<span class="article-tags">
6262
<router-link
6363
:to="getTagPath(tag)"

docs/blog/guide/markdown.md

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,28 +3,14 @@ pinned: true
33
tag:
44
- Markdown
55
- Official
6-
- test1
7-
- test2
8-
- test3
9-
- test4
10-
- test5
11-
- test6
12-
- test7
13-
- test8
14-
- test9
15-
- test10
16-
- test11
17-
- test12
18-
- test13
19-
- test14
20-
- test15
216
author: NeserCode
227
date: 2022-09-15
238
original: false
249
originalUrl: https://v2.vuepress.vuejs.org/zh/guide/markdown.html
2510
password: "12345678"
2611
hint:
2712
- "八位数密码"
13+
repo: vuepress/ecosystem
2814
---
2915

3016
# Markdown

0 commit comments

Comments
 (0)