Commit c618f1fecb
c618f1fecb7b51118fce03394155d9374543a0db
parent: 99207c5bc6
Unsigned
Duck <57977673+woducku@users.noreply.github.com> · 2026-05-09 15:51 UTC
Update linkcard views
Layout: unified · split
docs/.vitepress/theme/components/link-card/Card.vue
+51 −7
| @@ -11,13 +11,57 @@ const props = defineProps<{ |
| 11 | role="article" |
11 | role="article" |
| 12 | :href="props.href" |
12 | :href="props.href" |
| 13 | :download="props.download ? '' : undefined" |
13 | :download="props.download ? '' : undefined" |
| 14 | class="hover:scale-[1.03] focus:scale-[1.03] active:scale-[0.98] transition-all! flex flex-col gap-1 text-neutral-600! text-sm px-4 py-3 rounded-2xl border border-neutral-200 dark:bg-neutral-800 dark:border-neutral-800 dark:text-neutral-300! interact:shadow-xl shadow-neutral-700/5 duration-300 font-normal! no-underline!" |
14 | class="vp-card" |
| 15 | > |
15 | > |
| 16 | <h3 class="text-black! dark:text-white! no-underline! font-medium! text-lg my-0!"> |
16 | <article class="vp-card-container"> |
| 17 | {{ props.title }} |
17 | <h3 class="vp-card-title">{{ props.title }}</h3> |
| 18 | </h3> |
18 | <p class="vp-card-details"><slot /></p> |
| 19 | <p class="m-0! leading-normal!"> |
19 | </article> |
| 20 | <slot /> |
| |
| 21 | </p> |
| |
| 22 | </a> |
20 | </a> |
| 23 | </template> |
21 | </template> |
| |
22 | |
| |
23 | <style scoped> |
| |
24 | .vp-card, |
| |
25 | .vp-card:hover, |
| |
26 | .vp-card:focus, |
| |
27 | .vp-card:visited { |
| |
28 | display: block; |
| |
29 | border: 1px solid var(--vp-c-bg-soft); |
| |
30 | border-radius: 12px; |
| |
31 | height: 100%; |
| |
32 | background-color: var(--vp-c-bg-soft); |
| |
33 | transition: border-color 0.25s, background-color 0.25s; |
| |
34 | text-decoration: none !important; |
| |
35 | color: inherit !important; |
| |
36 | } |
| |
37 | |
| |
38 | .vp-card:hover { |
| |
39 | border-color: var(--vp-c-brand-1, #1473e6); |
| |
40 | } |
| |
41 | |
| |
42 | .vp-card-container { |
| |
43 | display: flex; |
| |
44 | flex-direction: column; |
| |
45 | padding: 24px; |
| |
46 | height: 100%; |
| |
47 | } |
| |
48 | |
| |
49 | .vp-card-title { |
| |
50 | margin: 0 0 8px; |
| |
51 | padding: 0; |
| |
52 | line-height: 24px; |
| |
53 | font-size: 16px; |
| |
54 | font-weight: 600; |
| |
55 | color: var(--vp-c-text-1); |
| |
56 | border: none; |
| |
57 | letter-spacing: 0; |
| |
58 | } |
| |
59 | |
| |
60 | .vp-card-details { |
| |
61 | margin: 0; |
| |
62 | line-height: 24px; |
| |
63 | font-size: 14px; |
| |
64 | font-weight: 500; |
| |
65 | color: var(--vp-c-text-2); |
| |
66 | } |
| |
67 | </style>\ No newline at end of file |
docs/.vitepress/theme/components/link-card/Grid.vue
+22 −2
| @@ -1,5 +1,25 @@ |
| 1 | <template> |
1 | <template> |
| 2 | <aside class="grid grid-cols-1 sm:grid-cols-2 w-full gap-4 items-start"> |
2 | <div class="vp-grid"> |
| 3 | <slot /> |
3 | <slot /> |
| 4 | </aside> |
4 | </div> |
| 5 | </template> |
5 | </template> |
| |
6 | |
| |
7 | <style scoped> |
| |
8 | .vp-grid { |
| |
9 | display: grid; |
| |
10 | grid-template-columns: repeat(auto-fill, minmax(224px, 1fr)); |
| |
11 | gap: 8px; |
| |
12 | } |
| |
13 | |
| |
14 | @media (min-width: 640px) { |
| |
15 | .vp-grid { |
| |
16 | gap: 8px; |
| |
17 | } |
| |
18 | } |
| |
19 | |
| |
20 | @media (min-width: 768px) { |
| |
21 | .vp-grid { |
| |
22 | gap: 8px; |
| |
23 | } |
| |
24 | } |
| |
25 | </style>\ No newline at end of file |
docs/.vitepress/theme/styles/style.scss
+12
| @@ -1567,3 +1567,15 @@ table tr:nth-child(odd) { |
| 1567 | } |
1567 | } |
| 1568 | } |
1568 | } |
| 1569 | } |
1569 | } |
| |
1570 | |
| |
1571 | .vp-doc .vp-card, |
| |
1572 | .vp-doc .vp-card:hover, |
| |
1573 | .vp-doc .vp-card:focus, |
| |
1574 | .vp-doc .vp-card:visited { |
| |
1575 | text-decoration: none !important; |
| |
1576 | } |
| |
1577 | |
| |
1578 | .vp-doc .vp-card .vp-card-title { |
| |
1579 | text-decoration: none !important; |
| |
1580 | border-top: none !important; |
| |
1581 | }\ No newline at end of file |