Skip to content

Commit

Permalink
Merge pull request #1171 from flc1125/feature/copyright
Browse files Browse the repository at this point in the history
feat(footer): added copyright
  • Loading branch information
ppoffice authored Jan 18, 2023
2 parents d2e1805 + df99616 commit eea0f7f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
10 changes: 10 additions & 0 deletions include/schema/common/footer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
"<a href=\"https://beian.miit.gov.cn/\" target=\"_blank\">粤ICP备1234567号</a>"
]
},
"links": {
"$ref": "/misc/poly_links.json",
"description": "Links to be shown on the right of the footer section",
Expand Down
3 changes: 3 additions & 0 deletions layout/common/footer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ class Footer extends Component {
siteYear,
author,
links,
copyright,
showVisitorCounter,
visitorCounterTitle
} = this.props;
Expand Down Expand Up @@ -41,6 +42,7 @@ class Footer extends Component {
{showVisitorCounter ? <span id="busuanzi_container_site_uv"
dangerouslySetInnerHTML={{ __html: visitorCounterTitle }}></span> : null}
</p>
{copyright ? <p class="is-size-7" dangerouslySetInnerHTML={{ __html: copyright }}></p> : null}
</div>
<div class="level-end">
{Object.keys(links).length ? <div class="field has-addons">
Expand Down Expand Up @@ -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', '<span id="busuanzi_value_site_uv">0</span>')
};
Expand Down

0 comments on commit eea0f7f

Please sign in to comment.