Skip to content

Commit 0a332f1

Browse files
committed
feat: v0.18.0 — 官网 SEO 优化、支持页面与赞助二维码
官网 SEO 增强: - 新增 robots.ts 搜索引擎爬虫规则 - 新增 sitemap.ts 站点地图 - 新增 BingSiteAuth.xml 必应站长验证 支持页面: - 新增 website/app/support/ 用户支持页面 品牌与赞助: - 新增 sponsor-qr.png 赞助二维码(客户端 + 官网) - Footer 页脚更新 客户端: - AboutSettings 关于页面优化 - website layout 布局调整 README 版本徽章更新至 v0.18.0
1 parent 6bf18d8 commit 0a332f1

10 files changed

Lines changed: 237 additions & 4 deletions

File tree

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<p align="center"><strong>你的 AI 智能学习伙伴 — 让每一分钟学习都高效有价值</strong></p>
44
<p align="center">
55
<img src="https://img.shields.io/badge/status-beta-green.svg" alt="Status" />
6-
<img src="https://img.shields.io/badge/version-v0.17.1-blue.svg" alt="Version" />
6+
<img src="https://img.shields.io/badge/version-v0.18.0-blue.svg" alt="Version" />
77
<img src="https://img.shields.io/badge/license-Apache--2.0-blue.svg" alt="License" />
88
</p>
99
</p>

‎client/public/sponsor-qr.png‎

Lines changed: 3 additions & 0 deletions
Loading

‎client/src/pages/settings/AboutSettings.tsx‎

Lines changed: 44 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { useState, useEffect, useCallback } from 'react';
2-
import { Card, Button } from '@/components/ui';
2+
import { Card, Button, Modal } from '@/components/ui';
33
import { useToast } from '@/components/ui/Toast';
4-
import { Shield, Info, RefreshCw, Download, CheckCircle, Loader2, AlertCircle } from 'lucide-react';
4+
import { Shield, Info, RefreshCw, Download, CheckCircle, Loader2, AlertCircle, Heart } from 'lucide-react';
55
import { cn } from '@/lib/utils';
66

77
interface UpdateStatus {
@@ -25,6 +25,7 @@ export default function AboutSettings() {
2525
const [autoUpdate, setAutoUpdate] = useState<boolean>(
2626
() => localStorage.getItem(AUTO_UPDATE_KEY) !== 'false',
2727
);
28+
const [sponsorOpen, setSponsorOpen] = useState(false);
2829

2930
const isElectron = !!window.electronAPI;
3031

@@ -277,6 +278,47 @@ export default function AboutSettings() {
277278
帮助你建立科学高效的学习习惯。
278279
</p>
279280
</div>
281+
282+
{/* 支持开发者 */}
283+
<div className={cn(
284+
'flex items-center gap-3 p-3 rounded-kb-md',
285+
'bg-brand-500/5 border border-brand-500/20',
286+
)}>
287+
<Heart className="w-icon-sm h-icon-sm text-brand-500 flex-shrink-0" strokeWidth={1.5} />
288+
<p className="text-b3 text-text-secondary leading-relaxed flex-1">
289+
<span className="font-medium text-brand-600">喜欢熵减?</span>
290+
你的赞赏会变成服务器电费,支撑它继续对抗宇宙的无序。
291+
</p>
292+
<Button
293+
variant="secondary"
294+
size="sm"
295+
onClick={() => setSponsorOpen(true)}
296+
>
297+
请作者喝杯蜜雪
298+
</Button>
299+
</div>
300+
301+
{/* 赞赏码弹窗 */}
302+
<Modal
303+
open={sponsorOpen}
304+
onClose={() => setSponsorOpen(false)}
305+
title="支持开发者"
306+
description="微信扫一扫,请作者喝杯蜜雪 ☕"
307+
size="sm"
308+
>
309+
<div className="flex flex-col items-center gap-kb-sm">
310+
<img
311+
src="/sponsor-qr.png"
312+
alt="微信赞赏码"
313+
className="w-full max-w-[260px] rounded-kb-lg bg-white p-2"
314+
/>
315+
<p className="text-c1 text-text-tertiary text-center leading-relaxed">
316+
赞赏是纯粹的心意支持,不与任何功能挂钩。
317+
<br />
318+
无论是否赞赏,熵减的本地功能永远免费。
319+
</p>
320+
</div>
321+
</Modal>
280322
</Card>
281323
);
282324
}

‎website/app/layout.tsx‎

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,30 @@ const notoSerif = Noto_Serif_SC({
2020
});
2121

2222
export const metadata: Metadata = {
23-
title: "课伴 KeBan · 熵减 — 潜入深海,拾起认知的微光",
23+
metadataBase: new URL("https://entropydecrease.com"),
24+
title: {
25+
default: "课伴 KeBan · 熵减 — 潜入深海,拾起认知的微光",
26+
template: "%s | 课伴 KeBan",
27+
},
2428
description:
2529
"课伴(熵减)是一款基于认知科学的学习伴侣应用。番茄钟、智能笔记、闪卡复习、费曼学习法——在无序的时光里,陪你慢慢生长。",
2630
keywords: ["课伴", "KeBan", "熵减", "学习工具", "番茄钟", "闪卡", "费曼学习法", "认知科学"],
31+
alternates: {
32+
canonical: "/",
33+
},
34+
openGraph: {
35+
type: "website",
36+
locale: "zh_CN",
37+
url: "https://entropydecrease.com",
38+
siteName: "课伴 KeBan · 熵减",
39+
title: "课伴 KeBan · 熵减 — 潜入深海,拾起认知的微光",
40+
description:
41+
"基于认知科学的本地优先学习工具:番茄钟、智能笔记、闪卡复习、费曼学习法。",
42+
},
43+
robots: {
44+
index: true,
45+
follow: true,
46+
},
2747
};
2848

2949
export default function RootLayout({

‎website/app/robots.ts‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import type { MetadataRoute } from "next";
2+
3+
export const dynamic = "force-static";
4+
5+
/**
6+
* robots.txt — 允许所有搜索引擎抓取,并指向站点地图
7+
*/
8+
export default function robots(): MetadataRoute.Robots {
9+
return {
10+
rules: {
11+
userAgent: "*",
12+
allow: "/",
13+
},
14+
sitemap: "https://entropydecrease.com/sitemap.xml",
15+
};
16+
}

‎website/app/sitemap.ts‎

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
import type { MetadataRoute } from "next";
2+
3+
export const dynamic = "force-static";
4+
5+
const BASE_URL = "https://entropydecrease.com";
6+
7+
/**
8+
* sitemap.xml — 站点地图,帮助搜索引擎发现所有页面
9+
*/
10+
export default function sitemap(): MetadataRoute.Sitemap {
11+
return [
12+
{
13+
url: BASE_URL,
14+
lastModified: new Date(),
15+
changeFrequency: "weekly",
16+
priority: 1,
17+
},
18+
{
19+
url: `${BASE_URL}/download`,
20+
lastModified: new Date(),
21+
changeFrequency: "weekly",
22+
priority: 0.9,
23+
},
24+
{
25+
url: `${BASE_URL}/story`,
26+
lastModified: new Date(),
27+
changeFrequency: "monthly",
28+
priority: 0.7,
29+
},
30+
{
31+
url: `${BASE_URL}/support`,
32+
lastModified: new Date(),
33+
changeFrequency: "monthly",
34+
priority: 0.5,
35+
},
36+
];
37+
}

‎website/app/support/page.tsx‎

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
"use client";
2+
3+
import { motion } from "framer-motion";
4+
import { GlowOrb } from "@/components/GlowOrb";
5+
import { SectionReveal } from "@/components/SectionReveal";
6+
7+
/**
8+
* 支持我们 — 赞赏页
9+
* 赞赏是无偿的心意支持,不与任何功能挂钩
10+
*/
11+
export default function SupportPage() {
12+
return (
13+
<main className="relative min-h-screen overflow-hidden">
14+
<GlowOrb count={14} seed={7} />
15+
16+
<div className="relative max-w-3xl mx-auto px-6 pt-36 pb-24">
17+
{/* 标题 */}
18+
<motion.div
19+
className="text-center mb-14"
20+
initial={{ opacity: 0, y: 24 }}
21+
animate={{ opacity: 1, y: 0 }}
22+
transition={{ duration: 0.8, ease: [0.22, 1, 0.36, 1] }}
23+
>
24+
<span
25+
className="inline-block text-xs tracking-widest uppercase px-3 py-1 rounded-full mb-6"
26+
style={{
27+
color: "var(--kb-amber)",
28+
border: "1px solid var(--kb-border-default)",
29+
background: "var(--kb-bg-secondary)",
30+
}}
31+
>
32+
Support · 注入负熵
33+
</span>
34+
<h1 className="font-serif text-3xl sm:text-4xl font-semibold text-kb-text mb-4">
35+
请作者喝杯蜜雪
36+
</h1>
37+
<p className="text-kb-text2 leading-relaxed max-w-md mx-auto">
38+
课伴由一位独立开发者维护。
39+
<br />
40+
你的每一份赞赏,都会变成服务器的电费与深夜的咖啡,
41+
<br />
42+
支撑这个小小的生命体继续对抗宇宙的无序。
43+
</p>
44+
</motion.div>
45+
46+
{/* 赞赏码卡片 */}
47+
<SectionReveal>
48+
<div
49+
className="relative rounded-2xl border p-8 sm:p-10 max-w-sm mx-auto text-center"
50+
style={{
51+
borderColor: "var(--kb-border-default)",
52+
background: "var(--kb-bg-secondary)",
53+
}}
54+
>
55+
<div className="rounded-xl overflow-hidden bg-white p-3 mb-6">
56+
{/* eslint-disable-next-line @next/next/no-img-element */}
57+
<img
58+
src="/sponsor-qr.png"
59+
alt="微信赞赏码"
60+
className="w-full h-auto"
61+
/>
62+
</div>
63+
<p className="text-sm text-kb-text2 mb-1.5">微信扫一扫 · 赞赏支持</p>
64+
<p className="text-xs text-kb-text3 leading-relaxed">
65+
赞赏是纯粹的心意支持,不与任何功能挂钩。
66+
<br />
67+
无论是否赞赏,课伴的本地功能永远免费。
68+
</p>
69+
</div>
70+
</SectionReveal>
71+
72+
{/* 其他支持方式 */}
73+
<SectionReveal>
74+
<div className="mt-14 text-center">
75+
<p className="text-sm text-kb-text3 mb-4">不方便赞赏?这些方式同样珍贵:</p>
76+
<div className="flex flex-wrap items-center justify-center gap-3 text-sm">
77+
<a
78+
href="https://github.com/Aparencia/KeBan"
79+
target="_blank"
80+
rel="noopener noreferrer"
81+
className="px-4 py-2 rounded-full text-kb-text2 hover:text-kb-text transition-colors duration-300"
82+
style={{ border: "1px solid var(--kb-border-default)" }}
83+
>
84+
⭐ 在 GitHub 点个 Star
85+
</a>
86+
<span
87+
className="px-4 py-2 rounded-full text-kb-text2"
88+
style={{ border: "1px solid var(--kb-border-default)" }}
89+
>
90+
📣 推荐给身边的同学
91+
</span>
92+
<a
93+
href="https://github.com/Aparencia/KeBan/issues"
94+
target="_blank"
95+
rel="noopener noreferrer"
96+
className="px-4 py-2 rounded-full text-kb-text2 hover:text-kb-text transition-colors duration-300"
97+
style={{ border: "1px solid var(--kb-border-default)" }}
98+
>
99+
💬 提出你的建议
100+
</a>
101+
</div>
102+
</div>
103+
</SectionReveal>
104+
</div>
105+
</main>
106+
);
107+
}

‎website/components/Footer.tsx‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ export function Footer() {
3434
<Link href="/" className="text-kb-text2 hover:text-kb-text transition-colors duration-300">首页</Link>
3535
<Link href="/story" className="text-kb-text2 hover:text-kb-text transition-colors duration-300">品牌故事</Link>
3636
<Link href="/download" className="text-kb-text2 hover:text-kb-text transition-colors duration-300">下载</Link>
37+
<Link href="/support" className="text-kb-text2 hover:text-kb-text transition-colors duration-300">支持我们</Link>
3738
</div>
3839
<div className="flex flex-col gap-2.5">
3940
<span className="text-kb-text3 text-xs uppercase tracking-widest mb-1">开源</span>

‎website/public/BingSiteAuth.xml‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0"?>
2+
<users>
3+
<user>A4C987D521792D63326AFF8D0C210A0D</user>
4+
</users>

‎website/public/sponsor-qr.png‎

Lines changed: 3 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)