diff --git a/layout/_partial/main/article/article_footer.ejs b/layout/_partial/main/article/article_footer.ejs index 99e38cb..9f09964 100644 --- a/layout/_partial/main/article/article_footer.ejs +++ b/layout/_partial/main/article/article_footer.ejs @@ -1,9 +1,21 @@ <% function layoutDiv() { - if (page.layout == 'wiki' && !page.references) { - return ''; + var el = ''; + var item = []; + if (page.references && page.references.length > 0) { + item.push('references'); + } + if (page.layout !== 'wiki') { + if (theme.article.license && theme.article.license.length > 0) { + item.push('license'); + } + if (theme.article.share && theme.article.share.length > 0) { + item.push('share'); + } + } + if (item.length === 0) { + return el; } - let el = ''; el += '
'; if (page.references && page.references.length > 0) { el += '
'; diff --git a/source/css/_layout/partial/article-footer.styl b/source/css/_layout/partial/article-footer.styl index a570c7a..ce43dec 100644 --- a/source/css/_layout/partial/article-footer.styl +++ b/source/css/_layout/partial/article-footer.styl @@ -4,6 +4,8 @@ background: var(--block) border-radius: $border-block border: 1px solid var(--block-border) + &:empty + display: none .header font-weight: 500 color: var(--text-p2)