feature: 版本声明和相关推荐

This commit is contained in:
tangly1024
2022-01-06 17:28:50 +08:00
parent bf4dd19aaa
commit b2f0613191
5 changed files with 13 additions and 13 deletions

View File

@@ -39,8 +39,8 @@ const BLOG = {
showDarkMode: true, // 显示日间/夜间模式切换
showToc: true, // 移动端显示悬浮目录
showShareBar: false, // 文章分享功能
showRelatePosts: false, // 关文章推荐
showCopyRight: false, // 显示版权声明
showRelatePosts: true, // 关文章推荐
showCopyRight: true, // 文章版权声明
showLatestPost: false, // 右侧边栏显示最近更新
showCategoryList: false, // 右侧边栏显示文章分类列表
showTagList: false // 右侧边栏显示标签分类列表

View File

@@ -8,8 +8,7 @@ export default function ArticleCopyright ({ author, url }) {
}
const { locale } = useGlobal()
return <section className="dark:text-gray-300 mt-6">
<div className="text-2xl mb-2">{locale.COMMON.COPYRIGHT}</div>
<ul className="text-sm dark:bg-gray-900 bg-gray-100 p-5 leading-8 border-l-4 border-red-500">
<ul className="text-sm dark:bg-gray-700 bg-gray-100 p-5 leading-8 border-l-2 border-blue-500">
<li>
<strong className='mr-2'>{locale.COMMON.AUTHOR}:</strong>
<Link href="/about">
@@ -23,6 +22,7 @@ export default function ArticleCopyright ({ author, url }) {
</a>
</li>
<li>
<strong className='mr-2'>{locale.COMMON.COPYRIGHT}:</strong>
{locale.COMMON.COPYRIGHT_NOTICE}
</li>
</ul>

View File

@@ -150,12 +150,12 @@ export default function ArticleDetail ({ post, blockMap, recommendPosts, prev, n
data-ad-slot="3806269138"></ins>
</section>
{/* 推荐文章 */}
<RecommendPosts currentPost={post} recommendPosts={recommendPosts} />
{/* 版权声明 */}
<ArticleCopyright author={BLOG.author} url={url} />
{/* 推荐文章 */}
<RecommendPosts currentPost={post} recommendPosts={recommendPosts} />
{/* 标签列表 */}
<section className="md:flex md:justify-between">
{post.tagItems && (

View File

@@ -13,13 +13,13 @@ const RecommendPosts = ({ recommendPosts }) => {
const { locale } = useGlobal()
return (
<div className="dark:text-gray-300 pt-2">
<div className="mb-2 text-2xl">{locale.COMMON.RELATE_POSTS}</div>
<ul className="list-disc pl-6 text-sm dark:bg-gray-900 bg-gray-100 p-2 my-2 border-l-4 border-yellow-500">
<div className="pt-2 border pl-4 py-2 my-4 dark:text-gray-300 ">
<div className="mb-2 font-bold text-lg">{locale.COMMON.RELATE_POSTS} :</div>
<ul className="font-light text-sm">
{recommendPosts.map(post => (
<li className="py-1" key={post.id}>
<Link href={`/article/${post.slug}`}>
<a className="cursor-pointer hover:text-blue-500 hover:underline">
<a className="cursor-pointer hover:underline">
{post.title}
</a>
</Link>

View File

@@ -21,14 +21,14 @@ export default {
URL_COPIED: '链接已复制!',
TABLE_OF_CONTENTS: '目录',
RELATE_POSTS: '相关文章',
COPYRIGHT: '版权声明',
COPYRIGHT: '声明',
AUTHOR: '作者',
URL: '链接',
ANALYTICS: '统计',
POSTS: '篇文章',
VISITORS: '位访客',
VIEWS: '次查看',
COPYRIGHT_NOTICE: '本博客所有文章除特别声明外,均采用 BY-NC-SA 许可协议转载请注明出处'
COPYRIGHT_NOTICE: '本文采用 CC BY-NC-SA 4.0 许可协议转载请注明出处'
},
PAGINATION: {
PREV: '上一页',