feat: 添加留言板功能,集成 Giscus 评论系统并更新相关配置

This commit is contained in:
2025-12-17 22:16:06 +08:00
parent 6cc98acd88
commit bda4281fde
13 changed files with 276 additions and 53 deletions

View File

@@ -1,6 +1,6 @@
<template>
<div class="card panel flex flex-col gap-2.5">
<h2 class="m-0 mb-1 gradient-text">友情链接</h2>
<h2 class="m-0 mb-1 text-lg font-semibold">友情链接</h2>
<p class="text-text-muted text-sm m-0 mb-3 block">欢迎互换友链 · Friends</p>
<div class="grid grid-cols-1 gap-4 w-full max-w-[1100px] mx-auto sm:grid-cols-2">
<article v-for="f in displayedFriends" :key="f.url"

View File

@@ -33,6 +33,7 @@ const pages = [
{ name: "sites", label: "网站" },
{ name: "projects", label: "项目" },
{ name: "friends", label: "友链" },
{ name: "comments", label: "留言" },
];
const currentIndex = computed(() => pages.findIndex((item) => item.name === route.name));

View File

@@ -1,9 +1,7 @@
<template>
<section class="card panel flex flex-col gap-2.5">
<h2 class="m-0 mb-1 text-lg font-semibold">项目作品</h2>
<p class="text-sm text-white/60 mb-3">一些正在维护或已发布的项目 · Projects</p>
<div class="grid grid-cols-1 gap-4 w-full max-w-[1100px] mx-auto sm:grid-cols-2">
<article v-for="p in projects" :key="p.url"
class="rounded-[14px] border border-white/10 bg-gradient-to-br from-white/5 to-white/0 px-4 py-3.5 transition-all duration-200 hover:-translate-y-[3px] hover:border-yellow-400/50 w-[290px] h-[145px] flex flex-col">

View File

@@ -1,8 +1,8 @@
<template>
<section class="card panel flex flex-col gap-2.5">
<h2 class="m-0 mb-1 text-lg font-semibold">项目作品</h2>
<h2 class="m-0 mb-1 text-lg font-semibold">我的网站</h2>
<p class="text-sm text-white/60 mb-3">一些正在维护或已发布的项目 · Projects</p>
<p class="text-sm text-white/60 mb-3">正在运行的站点 · Websites</p>
<div class="grid grid-cols-1 gap-4 w-full max-w-[1100px] mx-auto sm:grid-cols-2">
<article v-for="site in sites" :key="site.url"

View File

@@ -1,34 +0,0 @@
<template>
<section class="card flex flex-col gap-2.5">
<h2 class="m-0 mb-1 gradient-text">我的网站</h2>
<p class="text-text-muted text-sm m-0 mb-3 block">正在运行的站点 · Websites</p>
<div class="w-full -mx-[1.125rem] -mb-[1.125rem]">
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4 px-[1.125rem] pb-[1.125rem]">
<article
v-for="site in sites"
:key="site.url"
class="bg-gradient-to-br from-white/5 to-white/1 border border-white/10 rounded-2xl p-3.5 shadow-md-dark transition-all duration-300 hover:-translate-y-1 hover:border-blue-400/60 hover:shadow-lg-dark hover:bg-gradient-to-br hover:from-yellow-500/6"
>
<div class="flex items-center justify-between mb-1.5">
<h3 class="m-0 font-semibold text-base">{{ site.name }}</h3>
<span class="px-2.5 py-1 rounded-full bg-green-500/14 text-green-300 text-xs font-medium"
>在线</span
>
</div>
<p class="text-text-muted text-sm m-0 mb-2.5">{{ site.desc }}</p>
<a
:href="site.url"
target="_blank"
rel="noreferrer"
class="inline-flex items-center gap-1.5 mt-2.5 text-blue-400 font-semibold text-sm hover:text-blue-300 transition-all duration-200 hover:gap-2"
>查看 </a
>
</article>
</div>
</div>
</section>
</template>
<script setup>
defineProps({ sites: Array });
</script>

View File

@@ -1,7 +1,7 @@
<template>
<section class="card flex flex-col gap-2.5">
<div>
<h2 class="m-0 mb-1">技能专长</h2>
<h2 class="m-0 mb-1 font-semibold">技能专长</h2>
<p class="text-text-muted text-sm m-0 mb-3">我常用的工具与技术 · Skills & Technologies</p>
</div>
<div class="grid grid-cols-1 sm:grid-cols-2 gap-3">

View File

@@ -1,6 +1,6 @@
<template>
<section class="card flex flex-col gap-2.5">
<h2 class="m-0 mb-1">社交链接</h2>
<h2 class="m-0 mb-1 text-lg font-semibold">社交链接</h2>
<p class="text-text-muted text-sm m-0 mb-3 block">社交账号 · Links</p>
<div class="flex flex-wrap gap-2.5">
<a v-for="link in links" :key="link.url" :href="link.url" target="_blank" rel="noreferrer"

View File

@@ -1,7 +1,7 @@
<template>
<section class="card">
<div class="header">
<h2>开发统计</h2>
<h2 class="m-0 mb-1 font-semibold">开发统计</h2>
<div class="tabs">
<button class="tab-button" :class="{ active: activeTab === 'github' }" @click="activeTab = 'github'">
GitHub