2026-02-01 23:42:12 +08:00
|
|
|
<script setup>
|
2026-02-20 02:10:25 +08:00
|
|
|
import { withBase } from 'vitepress'
|
|
|
|
|
|
2026-02-01 23:42:12 +08:00
|
|
|
defineProps({
|
|
|
|
|
href: {
|
|
|
|
|
type: String,
|
|
|
|
|
required: true
|
|
|
|
|
},
|
|
|
|
|
title: {
|
|
|
|
|
type: String,
|
|
|
|
|
required: true
|
|
|
|
|
},
|
|
|
|
|
description: {
|
|
|
|
|
type: String,
|
|
|
|
|
default: ''
|
|
|
|
|
},
|
|
|
|
|
icon: {
|
|
|
|
|
type: String,
|
|
|
|
|
default: ''
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<template>
|
2026-02-18 17:38:10 +08:00
|
|
|
<a
|
2026-02-20 02:10:25 +08:00
|
|
|
:href="withBase(href)"
|
2026-02-18 17:38:10 +08:00
|
|
|
class="nav-card-link"
|
|
|
|
|
>
|
2026-02-01 23:42:12 +08:00
|
|
|
<div class="nav-card">
|
2026-03-16 00:26:59 +08:00
|
|
|
<div class="card-top">
|
|
|
|
|
<div class="card-header">
|
|
|
|
|
<span
|
|
|
|
|
v-if="icon"
|
|
|
|
|
class="card-icon"
|
|
|
|
|
>{{ icon }}</span>
|
|
|
|
|
<span class="card-title">{{ title }}</span>
|
|
|
|
|
</div>
|
|
|
|
|
<span class="card-arrow">↗</span>
|
2026-02-01 23:42:12 +08:00
|
|
|
</div>
|
2026-02-18 17:38:10 +08:00
|
|
|
<div
|
|
|
|
|
v-if="description"
|
|
|
|
|
class="card-desc"
|
|
|
|
|
>{{ description }}</div>
|
2026-02-01 23:42:12 +08:00
|
|
|
</div>
|
|
|
|
|
</a>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<style scoped>
|
|
|
|
|
.nav-card-link {
|
|
|
|
|
text-decoration: none !important;
|
|
|
|
|
color: inherit !important;
|
|
|
|
|
display: block;
|
2026-03-16 00:53:29 +08:00
|
|
|
outline: none;
|
|
|
|
|
border-bottom: 0 !important;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.nav-card-link:focus,
|
|
|
|
|
.nav-card-link:focus-visible,
|
|
|
|
|
.nav-card-link:active {
|
|
|
|
|
outline: none !important;
|
|
|
|
|
box-shadow: none !important;
|
|
|
|
|
text-decoration: none !important;
|
|
|
|
|
border-bottom: 0 !important;
|
|
|
|
|
border-bottom-color: transparent !important;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.nav-card-link:hover,
|
|
|
|
|
.nav-card-link:visited {
|
|
|
|
|
text-decoration: none !important;
|
|
|
|
|
border-bottom: 0 !important;
|
|
|
|
|
border-bottom-color: transparent !important;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.nav-card-link:focus-visible .nav-card {
|
|
|
|
|
border-color: #0066cc;
|
|
|
|
|
box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.18);
|
2026-02-01 23:42:12 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.nav-card {
|
2026-03-16 00:53:29 +08:00
|
|
|
border: 1px solid rgba(0, 0, 0, 0.04);
|
|
|
|
|
border-radius: 24px;
|
2026-03-16 00:26:59 +08:00
|
|
|
padding: 20px 22px;
|
2026-03-16 00:53:29 +08:00
|
|
|
transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
|
|
|
|
|
background: #fff;
|
2026-02-01 23:42:12 +08:00
|
|
|
height: 100%;
|
2026-03-16 00:53:29 +08:00
|
|
|
min-height: 124px;
|
|
|
|
|
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
|
|
|
|
|
position: relative;
|
|
|
|
|
overflow: hidden;
|
2026-02-01 23:42:12 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.nav-card:hover {
|
2026-03-16 00:53:29 +08:00
|
|
|
transform: translateY(-4px);
|
|
|
|
|
box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
|
|
|
|
|
border-color: rgba(0, 0, 0, 0.08);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.dark .nav-card {
|
|
|
|
|
border-color: rgba(255, 255, 255, 0.08);
|
|
|
|
|
background: var(--vp-c-bg-mute);
|
|
|
|
|
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
|
2026-03-16 00:26:59 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.dark .nav-card:hover {
|
2026-03-16 00:53:29 +08:00
|
|
|
border-color: rgba(255, 255, 255, 0.14);
|
|
|
|
|
box-shadow: 0 10px 24px rgba(0, 0, 0, 0.34);
|
2026-03-16 00:26:59 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.card-top {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: flex-start;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
gap: 12px;
|
2026-02-01 23:42:12 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.card-header {
|
|
|
|
|
display: flex;
|
2026-03-16 00:53:29 +08:00
|
|
|
align-items: flex-start;
|
2026-02-01 23:42:12 +08:00
|
|
|
gap: 8px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.card-icon {
|
2026-03-16 00:26:59 +08:00
|
|
|
font-size: 22px;
|
2026-02-01 23:42:12 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.card-title {
|
2026-03-16 00:53:29 +08:00
|
|
|
font-weight: 700;
|
2026-03-16 00:26:59 +08:00
|
|
|
color: var(--vp-c-text-1);
|
|
|
|
|
font-size: 17px;
|
|
|
|
|
line-height: 1.35;
|
|
|
|
|
letter-spacing: -0.01em;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.card-arrow {
|
2026-03-16 00:53:29 +08:00
|
|
|
color: #0066cc;
|
|
|
|
|
font-size: 16px;
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
opacity: 0.9;
|
2026-03-16 00:26:59 +08:00
|
|
|
transition: transform 0.25s ease, opacity 0.25s ease;
|
2026-03-16 00:53:29 +08:00
|
|
|
margin-top: 2px;
|
2026-03-16 00:26:59 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.nav-card:hover .card-arrow {
|
|
|
|
|
transform: translate(2px, -2px);
|
|
|
|
|
opacity: 1;
|
2026-02-01 23:42:12 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.card-desc {
|
|
|
|
|
color: var(--vp-c-text-2);
|
|
|
|
|
font-size: 14px;
|
2026-03-16 00:53:29 +08:00
|
|
|
line-height: 1.6;
|
|
|
|
|
margin-top: 10px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@media (max-width: 768px) {
|
|
|
|
|
.nav-card {
|
|
|
|
|
border-radius: 18px;
|
|
|
|
|
padding: 16px 18px;
|
|
|
|
|
min-height: 108px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.card-title {
|
|
|
|
|
font-size: 16px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.card-desc {
|
|
|
|
|
font-size: 13px;
|
|
|
|
|
}
|
2026-02-01 23:42:12 +08:00
|
|
|
}
|
|
|
|
|
</style>
|