From fc1e6441305a5cd77d34389a32e14a6b799e1f61 Mon Sep 17 00:00:00 2001 From: anime Date: Sun, 6 Jul 2025 02:51:21 +0800 Subject: [PATCH] feat(ArticleCopyright): initially implement the "not by AI" function --- components/NotByAI.js | 17 +++++ ...Written-By-Human-Not-By-AI-Badge-black.svg | 56 +++++++++++++++ ...Written-By-Human-Not-By-AI-Badge-white.svg | 56 +++++++++++++++ ...Written-By-Human-Not-By-AI-Badge-black.svg | 71 +++++++++++++++++++ ...Written-By-Human-Not-By-AI-Badge-white.svg | 71 +++++++++++++++++++ ...Written-By-Human-Not-By-AI-Badge-black.svg | 71 +++++++++++++++++++ ...Written-By-Human-Not-By-AI-Badge-white.svg | 71 +++++++++++++++++++ ...Written-By-Human-Not-By-AI-Badge-black.svg | 52 ++++++++++++++ ...Written-By-Human-Not-By-AI-Badge-white.svg | 52 ++++++++++++++ ...Written-By-Human-Not-By-AI-Badge-black.svg | 52 ++++++++++++++ ...Written-By-Human-Not-By-AI-Badge-white.svg | 52 ++++++++++++++ ...Written-By-Human-Not-By-AI-Badge-black.svg | 61 ++++++++++++++++ ...Written-By-Human-Not-By-AI-Badge-white.svg | 61 ++++++++++++++++ ...Written-By-Human-Not-By-AI-Badge-black.svg | 61 ++++++++++++++++ ...Written-By-Human-Not-By-AI-Badge-white.svg | 61 ++++++++++++++++ .../commerce/components/ArticleCopyright.js | 20 ++++-- themes/heo/components/PostCopyright.js | 4 ++ themes/hexo/components/ArticleCopyright.js | 20 ++++-- themes/matery/components/ArticleCopyright.js | 16 +++-- themes/next/components/ArticleCopyright.js | 16 +++-- 20 files changed, 915 insertions(+), 26 deletions(-) create mode 100644 components/NotByAI.js create mode 100644 public/svg/not-by-ai/en-US/Written-By-Human-Not-By-AI-Badge-black.svg create mode 100644 public/svg/not-by-ai/en-US/Written-By-Human-Not-By-AI-Badge-white.svg create mode 100644 public/svg/not-by-ai/fr-FR/Written-By-Human-Not-By-AI-Badge-black.svg create mode 100644 public/svg/not-by-ai/fr-FR/Written-By-Human-Not-By-AI-Badge-white.svg create mode 100644 public/svg/not-by-ai/ja-JP/Written-By-Human-Not-By-AI-Badge-black.svg create mode 100644 public/svg/not-by-ai/ja-JP/Written-By-Human-Not-By-AI-Badge-white.svg create mode 100644 public/svg/not-by-ai/tr-TR/Written-By-Human-Not-By-AI-Badge-black.svg create mode 100644 public/svg/not-by-ai/tr-TR/Written-By-Human-Not-By-AI-Badge-white.svg create mode 100644 public/svg/not-by-ai/zh-CN/Written-By-Human-Not-By-AI-Badge-black.svg create mode 100644 public/svg/not-by-ai/zh-CN/Written-By-Human-Not-By-AI-Badge-white.svg create mode 100644 public/svg/not-by-ai/zh-HK/Written-By-Human-Not-By-AI-Badge-black.svg create mode 100644 public/svg/not-by-ai/zh-HK/Written-By-Human-Not-By-AI-Badge-white.svg create mode 100644 public/svg/not-by-ai/zh-TW/Written-By-Human-Not-By-AI-Badge-black.svg create mode 100644 public/svg/not-by-ai/zh-TW/Written-By-Human-Not-By-AI-Badge-white.svg diff --git a/components/NotByAI.js b/components/NotByAI.js new file mode 100644 index 00000000..a92921da --- /dev/null +++ b/components/NotByAI.js @@ -0,0 +1,17 @@ +import { useGlobal } from '@/lib/global' + +/** + * 版权声明 + * @returns + */ +export default function NotByAI() { + const { lang, isDarkMode } = useGlobal() + + return ( + not-by-ai + ) +} diff --git a/public/svg/not-by-ai/en-US/Written-By-Human-Not-By-AI-Badge-black.svg b/public/svg/not-by-ai/en-US/Written-By-Human-Not-By-AI-Badge-black.svg new file mode 100644 index 00000000..a9fcb382 --- /dev/null +++ b/public/svg/not-by-ai/en-US/Written-By-Human-Not-By-AI-Badge-black.svg @@ -0,0 +1,56 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/svg/not-by-ai/en-US/Written-By-Human-Not-By-AI-Badge-white.svg b/public/svg/not-by-ai/en-US/Written-By-Human-Not-By-AI-Badge-white.svg new file mode 100644 index 00000000..49cac441 --- /dev/null +++ b/public/svg/not-by-ai/en-US/Written-By-Human-Not-By-AI-Badge-white.svg @@ -0,0 +1,56 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/svg/not-by-ai/fr-FR/Written-By-Human-Not-By-AI-Badge-black.svg b/public/svg/not-by-ai/fr-FR/Written-By-Human-Not-By-AI-Badge-black.svg new file mode 100644 index 00000000..031a9abe --- /dev/null +++ b/public/svg/not-by-ai/fr-FR/Written-By-Human-Not-By-AI-Badge-black.svg @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/svg/not-by-ai/fr-FR/Written-By-Human-Not-By-AI-Badge-white.svg b/public/svg/not-by-ai/fr-FR/Written-By-Human-Not-By-AI-Badge-white.svg new file mode 100644 index 00000000..41dcd8b5 --- /dev/null +++ b/public/svg/not-by-ai/fr-FR/Written-By-Human-Not-By-AI-Badge-white.svg @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/svg/not-by-ai/ja-JP/Written-By-Human-Not-By-AI-Badge-black.svg b/public/svg/not-by-ai/ja-JP/Written-By-Human-Not-By-AI-Badge-black.svg new file mode 100644 index 00000000..0ba40b75 --- /dev/null +++ b/public/svg/not-by-ai/ja-JP/Written-By-Human-Not-By-AI-Badge-black.svg @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/svg/not-by-ai/ja-JP/Written-By-Human-Not-By-AI-Badge-white.svg b/public/svg/not-by-ai/ja-JP/Written-By-Human-Not-By-AI-Badge-white.svg new file mode 100644 index 00000000..53775d31 --- /dev/null +++ b/public/svg/not-by-ai/ja-JP/Written-By-Human-Not-By-AI-Badge-white.svg @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/svg/not-by-ai/tr-TR/Written-By-Human-Not-By-AI-Badge-black.svg b/public/svg/not-by-ai/tr-TR/Written-By-Human-Not-By-AI-Badge-black.svg new file mode 100644 index 00000000..a8fdbafe --- /dev/null +++ b/public/svg/not-by-ai/tr-TR/Written-By-Human-Not-By-AI-Badge-black.svg @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/svg/not-by-ai/tr-TR/Written-By-Human-Not-By-AI-Badge-white.svg b/public/svg/not-by-ai/tr-TR/Written-By-Human-Not-By-AI-Badge-white.svg new file mode 100644 index 00000000..4e79df1e --- /dev/null +++ b/public/svg/not-by-ai/tr-TR/Written-By-Human-Not-By-AI-Badge-white.svg @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/svg/not-by-ai/zh-CN/Written-By-Human-Not-By-AI-Badge-black.svg b/public/svg/not-by-ai/zh-CN/Written-By-Human-Not-By-AI-Badge-black.svg new file mode 100644 index 00000000..637cc2a8 --- /dev/null +++ b/public/svg/not-by-ai/zh-CN/Written-By-Human-Not-By-AI-Badge-black.svg @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/svg/not-by-ai/zh-CN/Written-By-Human-Not-By-AI-Badge-white.svg b/public/svg/not-by-ai/zh-CN/Written-By-Human-Not-By-AI-Badge-white.svg new file mode 100644 index 00000000..a0590bc8 --- /dev/null +++ b/public/svg/not-by-ai/zh-CN/Written-By-Human-Not-By-AI-Badge-white.svg @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/svg/not-by-ai/zh-HK/Written-By-Human-Not-By-AI-Badge-black.svg b/public/svg/not-by-ai/zh-HK/Written-By-Human-Not-By-AI-Badge-black.svg new file mode 100644 index 00000000..18c32c01 --- /dev/null +++ b/public/svg/not-by-ai/zh-HK/Written-By-Human-Not-By-AI-Badge-black.svg @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/svg/not-by-ai/zh-HK/Written-By-Human-Not-By-AI-Badge-white.svg b/public/svg/not-by-ai/zh-HK/Written-By-Human-Not-By-AI-Badge-white.svg new file mode 100644 index 00000000..872377df --- /dev/null +++ b/public/svg/not-by-ai/zh-HK/Written-By-Human-Not-By-AI-Badge-white.svg @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/svg/not-by-ai/zh-TW/Written-By-Human-Not-By-AI-Badge-black.svg b/public/svg/not-by-ai/zh-TW/Written-By-Human-Not-By-AI-Badge-black.svg new file mode 100644 index 00000000..18c32c01 --- /dev/null +++ b/public/svg/not-by-ai/zh-TW/Written-By-Human-Not-By-AI-Badge-black.svg @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/svg/not-by-ai/zh-TW/Written-By-Human-Not-By-AI-Badge-white.svg b/public/svg/not-by-ai/zh-TW/Written-By-Human-Not-By-AI-Badge-white.svg new file mode 100644 index 00000000..872377df --- /dev/null +++ b/public/svg/not-by-ai/zh-TW/Written-By-Human-Not-By-AI-Badge-white.svg @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/themes/commerce/components/ArticleCopyright.js b/themes/commerce/components/ArticleCopyright.js index 67c65bab..0d95536a 100644 --- a/themes/commerce/components/ArticleCopyright.js +++ b/themes/commerce/components/ArticleCopyright.js @@ -4,8 +4,9 @@ import { useRouter } from 'next/router' import { useEffect, useState } from 'react' import CONFIG from '../config' import { siteConfig } from '@/lib/config' +import NotByAI from '@/components/NotByAI' -export default function ArticleCopyright () { +export default function ArticleCopyright() { const router = useRouter() const [path, setPath] = useState(siteConfig('LINK') + router.asPath) useEffect(() => { @@ -19,17 +20,19 @@ export default function ArticleCopyright () { } return ( -
-
) diff --git a/themes/hexo/components/ArticleCopyright.js b/themes/hexo/components/ArticleCopyright.js index af3808a2..63aa69c6 100644 --- a/themes/hexo/components/ArticleCopyright.js +++ b/themes/hexo/components/ArticleCopyright.js @@ -4,8 +4,9 @@ import { useRouter } from 'next/router' import { useEffect, useState } from 'react' import CONFIG from '../config' import { siteConfig } from '@/lib/config' +import NotByAI from '@/components/NotByAI' -export default function ArticleCopyright () { +export default function ArticleCopyright() { const router = useRouter() const [path, setPath] = useState(siteConfig('LINK') + router.asPath) useEffect(() => { @@ -19,17 +20,19 @@ export default function ArticleCopyright () { } return ( -
-