From b693c4a2de4c76b1e16f1f185a3ed1f5c80f7ca3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Flc=E3=82=9B?= Date: Mon, 30 Jan 2023 18:18:34 +0800 Subject: [PATCH] Revert "Revert "feat(footer): added copyright"" --- include/schema/common/footer.json | 10 ++++++++++ layout/common/footer.jsx | 3 +++ 2 files changed, 13 insertions(+) diff --git a/include/schema/common/footer.json b/include/schema/common/footer.json index e322bc75d..3bd55c243 100644 --- a/include/schema/common/footer.json +++ b/include/schema/common/footer.json @@ -4,6 +4,16 @@ "description": "Page footer configurations", "type": "object", "properties": { + "copyright": { + "$ref": "/misc/copyright.json", + "description": "Copyright text", + "type": "string", + "examples": [ + "© 2019", + "© 2019 - 2020", + "粤ICP备1234567号" + ] + }, "links": { "$ref": "/misc/poly_links.json", "description": "Links to be shown on the right of the footer section", diff --git a/layout/common/footer.jsx b/layout/common/footer.jsx index 902710736..fcdecd912 100644 --- a/layout/common/footer.jsx +++ b/layout/common/footer.jsx @@ -11,6 +11,7 @@ class Footer extends Component { siteYear, author, links, + copyright, showVisitorCounter, visitorCounterTitle } = this.props; @@ -41,6 +42,7 @@ class Footer extends Component { {showVisitorCounter ? : null}

+ {copyright ?

: null}
{Object.keys(links).length ?
@@ -84,6 +86,7 @@ module.exports = cacheComponent(Footer, 'common.footer', props => { siteYear: date(new Date(), 'YYYY'), author, links, + copyright: footer?.copyright ?? '', showVisitorCounter: plugins && plugins.busuanzi === true, visitorCounterTitle: _p('plugin.visitor_count', '0') };