From 83fd240101b476bcf24facaea727fd0c859f4ea4 Mon Sep 17 00:00:00 2001 From: tangly1024 Date: Thu, 17 Mar 2022 13:28:35 +0800 Subject: [PATCH 01/16] =?UTF-8?q?hexo:=E5=B0=81=E8=A3=85=E7=BB=9F=E8=AE=A1?= =?UTF-8?q?=E5=8D=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- themes/hexo/LayoutBase.js | 4 ++-- themes/hexo/components/AnalyticsCard.js | 30 +++++++++++++++++++++++ themes/hexo/components/SideRight.js | 32 ++++--------------------- 3 files changed, 36 insertions(+), 30 deletions(-) create mode 100644 themes/hexo/components/AnalyticsCard.js diff --git a/themes/hexo/LayoutBase.js b/themes/hexo/LayoutBase.js index 93e5b129..d3878f7a 100644 --- a/themes/hexo/LayoutBase.js +++ b/themes/hexo/LayoutBase.js @@ -45,9 +45,9 @@ const LayoutBase = (props) => { {headerSlot} -
+
-
+
{children}
diff --git a/themes/hexo/components/AnalyticsCard.js b/themes/hexo/components/AnalyticsCard.js new file mode 100644 index 00000000..a8f224fa --- /dev/null +++ b/themes/hexo/components/AnalyticsCard.js @@ -0,0 +1,30 @@ +import Card from './Card' + +export function AnalyticsCard (props) { + const { postCount } = props + return +
+ 统计 +
+
+
+
+
文章数:
+
{postCount}
+
+
+
+
+
访问量:
+
+
+
+
+
+
访客数:
+
+
+
+
+ +} diff --git a/themes/hexo/components/SideRight.js b/themes/hexo/components/SideRight.js index 0ff07cd6..2335c054 100644 --- a/themes/hexo/components/SideRight.js +++ b/themes/hexo/components/SideRight.js @@ -4,11 +4,11 @@ import LatestPostsGroup from './LatestPostsGroup' import TagGroups from './TagGroups' import Catalog from './Catalog' import { InfoCard } from './InfoCard' +import { AnalyticsCard } from './AnalyticsCard' export default function SideRight (props) { const { post, - postCount, currentCategory, categories, latestPosts, @@ -19,33 +19,9 @@ export default function SideRight (props) { } = props return ( -