Skip to content

Commit

Permalink
feature: 版本声明和相关推荐
Browse files Browse the repository at this point in the history
  • Loading branch information
tangly1024 committed Jan 6, 2022
1 parent bf4dd19 commit b2f0613
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions blog.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 // 右侧边栏显示标签分类列表
Expand Down
4 changes: 2 additions & 2 deletions components/ArticleCopyright.js
Original file line number Diff line number Diff line change
Expand Up @@ -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">
Expand All @@ -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>
Expand Down
6 changes: 3 additions & 3 deletions components/ArticleDetail.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 && (
Expand Down
8 changes: 4 additions & 4 deletions components/RecommendPosts.js
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
4 changes: 2 additions & 2 deletions lib/lang/zh-CN.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: '上一页',
Expand Down

0 comments on commit b2f0613

Please sign in to comment.