Skip to content

Commit e02d797

Browse files
committed
update docs
1 parent cb87846 commit e02d797

File tree

3 files changed

+80
-42
lines changed

3 files changed

+80
-42
lines changed

docs/.vuepress/components/PluginMarket.vue

+69-42
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,10 @@
1717
<div v-else class="image-placeholder">
1818
<Icon :name="item.icon" size="3em" color="var(--vp-c-brand)" />
1919
</div>
20-
<div v-if="item.priceLabel" class="price-corner-tag">
20+
<div v-if="item.priceLabel" class="price-corner-tag" :class="{ 'paid': item.priceLabel === '付费' }">
2121
<span class="price-corner-text">{{ item.priceLabel }}</span>
2222
</div>
23-
</div>
24-
<div class="card-content">
25-
<div class="card-header">
23+
<div class="image-footer">
2624
<div class="item-developer-info">
2725
<img
2826
:src="getGithubAvatarUrl(item.githubUser)"
@@ -36,7 +34,7 @@
3634
<a
3735
v-if="item.link"
3836
:href="item.link"
39-
class="github-link no-external-icon"
37+
class="no-external-icon"
4038
target="_blank"
4139
rel="noopener noreferrer"
4240
aria-label="GitHub仓库"
@@ -46,6 +44,8 @@
4644
</a>
4745
<span v-else class="built-in-label-inline">内置</span>
4846
</div>
47+
</div>
48+
<div class="card-content">
4949
<h3 class="card-title">{{ item.title }}</h3>
5050
<p class="card-description">{{ item.description }}</p>
5151
<div class="card-tags">
@@ -135,6 +135,7 @@ const handleCardClick = (item: PluginItem) => {
135135
overflow: hidden;
136136
transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
137137
height: 100%;
138+
max-height: 360px;
138139
border: 1px solid var(--vp-c-divider);
139140
}
140141
@@ -150,7 +151,7 @@ const handleCardClick = (item: PluginItem) => {
150151
151152
.card-image {
152153
width: 100%;
153-
height: 160px;
154+
height: 180px;
154155
overflow: hidden;
155156
background: var(--vp-c-bg-soft);
156157
position: relative;
@@ -182,18 +183,17 @@ const handleCardClick = (item: PluginItem) => {
182183
background: var(--vp-c-bg-soft);
183184
}
184185
185-
.card-content {
186-
padding: 1rem;
187-
flex-grow: 1;
188-
display: flex;
189-
flex-direction: column;
190-
}
191-
192-
.card-header {
186+
.image-footer {
187+
position: absolute;
188+
bottom: 0;
189+
left: 0;
190+
right: 0;
193191
display: flex;
194192
justify-content: space-between;
195193
align-items: center;
196-
margin-bottom: 0.8rem; /* Space below the header */
194+
padding: 0.5rem;
195+
background: rgba(0, 0, 0, 0.1);
196+
color: #fff;
197197
}
198198
199199
.item-developer-info {
@@ -221,51 +221,43 @@ const handleCardClick = (item: PluginItem) => {
221221
white-space: nowrap;
222222
}
223223
224-
.github-link {
225-
color: var(--vp-c-text-2);
226-
transition: color 0.2s ease;
227-
pointer-events: auto; /* Allow clicks on the icon */
228-
flex-shrink: 0;
229-
display: inline-flex;
230-
align-items: center;
231-
margin-left: 0.5rem; /* Space between developer info and icon */
232-
}
233-
234-
.github-link:hover {
235-
color: var(--vp-c-brand);
236-
}
237-
238224
.no-external-icon::after {
239225
content: none !important;
240226
}
241227
242228
.built-in-label-inline {
243229
font-size: 0.75rem;
244-
color: var(--vp-c-text-2);
230+
color: var(--vp-c-text-3);
245231
padding: 0.1rem 0.4rem;
246232
border-radius: 4px;
247-
border: 1px solid var(--vp-c-divider);
248-
background-color: var(--vp-c-bg-soft);
233+
border: 1px solid var(--vp-c-border);
234+
background: rgba(255, 255, 255, 0.1);
249235
flex-shrink: 0;
250-
margin-left: 0.5rem; /* Space between developer info and label */
236+
margin-left: 0.5rem;
251237
white-space: nowrap;
252238
font-weight: 500;
253239
}
254240
241+
.card-content {
242+
padding: 0.75rem;
243+
flex-grow: 1;
244+
display: flex;
245+
flex-direction: column;
246+
}
255247
256248
.card-title {
257-
font-size: 1rem;
249+
font-size: 0.95rem;
258250
font-weight: 600;
259251
color: var(--vp-c-text-1);
260-
margin: 0 0 0.4rem 0;
252+
margin: 0 0 0.5rem 0;
261253
line-height: 1.4;
262254
}
263255
264256
.card-description {
265257
color: var(--vp-c-text-2);
266-
font-size: 0.85rem;
258+
font-size: 0.8rem;
267259
line-height: 1.5;
268-
margin: 0 0 0.8rem 0;
260+
margin: 0 0 0.75rem 0;
269261
flex-grow: 1;
270262
}
271263
@@ -274,7 +266,7 @@ const handleCardClick = (item: PluginItem) => {
274266
flex-wrap: wrap;
275267
align-items: center;
276268
gap: 0.4rem;
277-
margin-top: auto;
269+
margin-bottom: 0.5rem;
278270
}
279271
280272
.badge {
@@ -283,21 +275,52 @@ const handleCardClick = (item: PluginItem) => {
283275
justify-content: center;
284276
padding: 0.1rem 0.5rem;
285277
border-radius: 4px;
286-
font-size: 0.75rem;
278+
font-size: 0.7rem;
287279
line-height: 1;
288280
font-weight: 500;
289281
white-space: nowrap;
290282
border: 1px solid transparent;
291283
}
292284
285+
.price-corner-tag {
286+
position: absolute;
287+
top: 0;
288+
right: 0;
289+
background: #17bf63;
290+
color: #fff;
291+
padding: 0.3rem 0.6rem;
292+
font-size: 0.75rem;
293+
font-weight: 500;
294+
line-height: 1;
295+
border-bottom-left-radius: 4px;
296+
transform: translate(1px, -1px);
297+
z-index: 1;
298+
}
299+
300+
.price-corner-tag {
301+
background: #17bf63;
302+
}
303+
304+
.price-corner-tag.paid {
305+
background: #ff5733;
306+
}
307+
308+
.price-corner-text {
309+
text-transform: uppercase;
310+
}
311+
293312
@media (min-width: 768px) {
294313
.plugin-card-container {
295314
grid-template-columns: repeat(2, 1fr);
296315
gap: 1.2rem;
297316
}
298317
299318
.card-image {
300-
height: 160px;
319+
height: 200px;
320+
}
321+
322+
.card-content {
323+
padding: 0.75rem;
301324
}
302325
}
303326
@@ -308,7 +331,11 @@ const handleCardClick = (item: PluginItem) => {
308331
}
309332
310333
.card-image {
311-
height: 180px;
334+
height: 220px;
335+
}
336+
337+
.card-content {
338+
padding: 0.75rem;
312339
}
313340
}
314-
</style>
341+
</style>

docs/.vuepress/data/plugin.ts

+10
Original file line numberDiff line numberDiff line change
@@ -81,5 +81,15 @@ export const pluginItems: PluginItem[] = [
8181
image: "https://rescdn.qqmail.com/node/wework/images/Slice.d2258f37eb.png",
8282
githubUser: 'dividduang',
8383
priceLabel: "免费"
84+
},
85+
{
86+
icon: "ant-design:wechat-work-outlined",
87+
title: "SSO",
88+
description: "通过 Casdoor 实现 SSO 单点登录集成",
89+
tags: ["MySQL", "PostgreSQL", "fba", "extra"],
90+
link: "/fastapi_best_architecture_docs/planet.html",
91+
image: "https://casdoor.org/zh/img/casdoor.png",
92+
githubUser: 'wu-clan',
93+
priceLabel: "付费"
8494
}
8595
]

docs/plugin/market.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
title: 插件市场
33
aside: false
4+
watermark: true
45
---
56

67
::: info 标签说明

0 commit comments

Comments
 (0)