diff --git a/src/components/ArticleSnippet.tsx b/src/components/ArticleSnippet.tsx
new file mode 100644
index 0000000..a7ac17d
--- /dev/null
+++ b/src/components/ArticleSnippet.tsx
@@ -0,0 +1,44 @@
+import React from "react";
+
+import Alipay from "@/images/donate/alipay.png";
+import WeChat from "@/images/donate/wechat.png";
+import QQ from "@/images/donate/qq.png";
+
+export const About = () => {
+ return (
+ <>
+
关于本项目
+ 保罗 API 基本上作为一只辅助角色,默默无闻的服务着其他主要项目,这便是它存在的意义。像「随机动漫壁纸」接口就是为 Single 主题量身定做的,既符合主题外观特性,又能满足其他人的快捷使用。它诞生于 2018 年 4 月,是保罗入门后端和 PHP 语言的主要项目之一。
+ 项目后端采用原生 PHP 编写,前端是原生 CSS 和 JS,也就是非前后端分离项目,不需要额外的前端 SSR 服务。它没有任何框架加持(自己写的),所以执行速度和并发还是个谜。尽管如此,它也较为稳定的跑了这么久,不是吗?
+
+ - 前端:CSS + Vanilla JS
+ - 后端:PHP
+ - 数据库:MariaDB
+ - 缓存:Redis
+
+ >
+ )
+}
+
+export const Donate = () => {
+ return (
+ <>
+ 赞助我:
+ 本服务将长期免费提供,运行至今暂无任何打赏记录,故不进行展示。如您能为本站献上微薄之力,就是对我的最大支持了~ 记得备注「支持保罗的 API」噢!
+
+
+

+
支付宝
+
+
+

+
微信支付
+
+
+

+
QQ 钱包
+
+
+ >
+ )
+}
diff --git a/src/components/Layout/ArticleHead.tsx b/src/components/Layout/ArticleHead.tsx
new file mode 100644
index 0000000..890a749
--- /dev/null
+++ b/src/components/Layout/ArticleHead.tsx
@@ -0,0 +1,17 @@
+import React from "react";
+
+interface ArticleHeadProps {
+ title: string
+ desc: string
+}
+
+function ArticleHead({ title, desc }: ArticleHeadProps) {
+ return (
+
+ )
+}
+
+export default ArticleHead;
diff --git a/src/images/donate/alipay.png b/src/images/donate/alipay.png
new file mode 100644
index 0000000..82c41d3
Binary files /dev/null and b/src/images/donate/alipay.png differ
diff --git a/src/images/donate/qq.png b/src/images/donate/qq.png
new file mode 100644
index 0000000..4a46ed1
Binary files /dev/null and b/src/images/donate/qq.png differ
diff --git a/src/images/donate/wechat.png b/src/images/donate/wechat.png
new file mode 100644
index 0000000..167f24f
Binary files /dev/null and b/src/images/donate/wechat.png differ
diff --git a/src/index.css b/src/index.css
index 8b4ee68..0865d7d 100644
--- a/src/index.css
+++ b/src/index.css
@@ -1,5 +1,3 @@
-@charset "UTF-8";
-
/* ----
# Paul API
@@ -35,6 +33,11 @@ button{
.radius-full{ border-radius: 100% }
+.notice{
+ color: #175782;
+ font-style: normal;
+}
+
/* 1 - 页眉
-------------------------------- */
.sidebar{
@@ -181,7 +184,7 @@ main .post{
margin-bottom: 3em;
}
-main .post a{
+main .post p a{
text-decoration: 1px dashed underline;
text-underline-offset: 0.1em;
}
diff --git a/src/pages/index.tsx b/src/pages/index.tsx
index baf1827..28ce0f4 100644
--- a/src/pages/index.tsx
+++ b/src/pages/index.tsx
@@ -6,63 +6,94 @@ import fetchGithubStars from '../api/star';
import { getBookByParams, getBookByQuery } from '../api/book';
import getStat from "../api/stat";
-function Index() {
+import { Link } from "react-router-dom";
+import ArticleHead from "@/components/Layout/ArticleHead";
+import { Donate, About } from "@/components/ArticleSnippet";
- const { data: date } = useRequest(() => getDate());
- // const { data: repo, loading } = useRequest(() =>
- // fetchGithubStars('midwayjs/midway')
- // );
- const { data: book } = useRequest(() =>
- getBookByParams({ params: { id: '1' } })
- );
- const { data: book2 } = useRequest(() =>
- getBookByQuery({ query: { id: '2' } })
- );
+const apiMap: Record = {
+ wallpaper: "随机动漫壁纸",
+ netease: "网易云解析",
+ acgm: "随机动漫音乐",
+ bili: "哔哩小窗",
+ bing: "必应每日壁纸"
+}
+
+function Index() {
const { data: stat } = useRequest(() => getStat());
return (
-
- Hello Midway Hooks
-
- Edit src/api/*.ts and watch it change.
-
- You can also open Devtools to see the request details.
-
-
-
- λ GET
- getDate()
- Server Date: {date}
-
-
- λ POST
- fetchStars('midwayjs/midway')
- {/* Github Stars: {loading ? 'Fetching...' : repo.stars} */}
-
-
+
+
+ 公告:API 重构了 NodeJS 版本,基于 MidwayJS 实现,速度也许会略快一点?
+
+ 说明:
+ 本网站旨在于提供我开发的简易 API,用更精简的信息为你的网站/软件提供实用的服务。如果您的项目已开始使用我提供的 API 服务,则默认视为遵守 本约定!项目维护记录详见 此页面!
+
+ 累计调用:
+ 自 2018 年 7 月初开始至今,各 API 的使用状况如下:
+
+
{
stat?.data && Object.keys(stat.data).map((item) => (
-
{item}: {stat.data[item]}
+
+
{stat.data[item]}
+
{apiMap[item]}
+
))
}
-
- λ GET
-
- {`getBookByParams({ params: { id: '1' } })`}
-
- Book title: {book?.title}
-
-
- λ GET
-
- {`getBookByQuery({ query: { id: '2' } })`}
-
- Book title: {book2?.title}
-
-
+
+
接口列表:
+
+
+
+
网易云解析
+
解析音乐并精简输出,配合 Kico Player 使用更佳
+
+
+ {/*
*/}
+
+
+
随机动漫壁纸
+
生成适合 Single 主题的白底动漫壁纸
+
+
+
+
+
随机动漫音乐
+
随机生成动漫背景音乐,基于网易云解析
+
+
+ {/*
+
+
Gravatar 解析
+
将邮箱地址转换为 MD5,并跳转到相对应的图片
+
+
*/}
+
+
+
哔哩哔哩小窗
+
更简洁的展示你在 B 站发布的视频内容
+
+
+
+
+
必应每日壁纸
+
每日更新,尽享乐趣,直接跳转,使用便捷
+
+
+
+
+
+
+
)