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 1/5] 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')
};
From 8386c37f9f0519d4a5994b10d0baf5bb4ce1a904 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Flc=E3=82=9B?=
Date: Mon, 30 Jan 2023 18:38:59 +0800
Subject: [PATCH 2/5] fix: code style #1171
---
.eslintrc.json | 3 ++-
.gitignore | 1 +
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/.eslintrc.json b/.eslintrc.json
index 6cae23f4a..6b4805b3c 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -20,7 +20,8 @@
"ecmaFeatures": {
"jsx": true
},
- "sourceType": "module"
+ "sourceType": "module",
+ "ecmaVersion": "latest"
},
"plugins": [
"react"
diff --git a/.gitignore b/.gitignore
index 9d21c2998..02859db4d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -108,6 +108,7 @@ dist
_config*.yml*
yarn.lock
+package-lock.json
# Intellij Idea config file
.idea
From 0ac6a4145a2c6995af70083d7161b426c2603e07 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Flc=E3=82=9B?=
Date: Tue, 31 Jan 2023 08:40:29 +0800
Subject: [PATCH 3/5] fix: remove gitignore
---
.gitignore | 1 -
1 file changed, 1 deletion(-)
diff --git a/.gitignore b/.gitignore
index 02859db4d..9d21c2998 100644
--- a/.gitignore
+++ b/.gitignore
@@ -108,7 +108,6 @@ dist
_config*.yml*
yarn.lock
-package-lock.json
# Intellij Idea config file
.idea
From 78da4febab37e59afd3d409533e63dec7ffbcc47 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Flc=E3=82=9B?=
Date: Tue, 31 Jan 2023 08:41:40 +0800
Subject: [PATCH 4/5] remove misc(footer copyright)
---
include/schema/common/footer.json | 10 ----------
1 file changed, 10 deletions(-)
diff --git a/include/schema/common/footer.json b/include/schema/common/footer.json
index 3bd55c243..e322bc75d 100644
--- a/include/schema/common/footer.json
+++ b/include/schema/common/footer.json
@@ -4,16 +4,6 @@
"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",
From 9120e5f5fd98e6602e1afa7411c7d771816a32a2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Flc=E3=82=9B?=
Date: Tue, 31 Jan 2023 14:21:29 +0800
Subject: [PATCH 5/5] chore(footer): Added footer.json `copyright`
---
include/schema/common/footer.json | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/include/schema/common/footer.json b/include/schema/common/footer.json
index e322bc75d..4f34e47a3 100644
--- a/include/schema/common/footer.json
+++ b/include/schema/common/footer.json
@@ -4,6 +4,17 @@
"description": "Page footer configurations",
"type": "object",
"properties": {
+ "copyright": {
+ "description": "Copyright text",
+ "type": "string",
+ "examples": [
+ "© 2019",
+ "© 2019 - 2020",
+ "© 2019 - 2020, Company Name",
+ "© 2019 - 2020, Company Name. All rights reserved.",
+ "粤ICP备12345678号"
+ ]
+ },
"links": {
"$ref": "/misc/poly_links.json",
"description": "Links to be shown on the right of the footer section",