custom footer
This commit is contained in:
parent
ddd4c28c6b
commit
0d9ebb54c5
|
@ -157,6 +157,7 @@ footer:
|
|||
# - '[GitLab](/)'
|
||||
license: '[CC BY-NC-SA 4.0](https://creativecommons.org/licenses/by-nc-sa/4.0/)'
|
||||
source: #'[GitHub](https://github.com/xaoxuu/hexo-theme-stellar)'
|
||||
more: # string or array (support markdown)
|
||||
|
||||
|
||||
######## Tag Plugins ########
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
const author = '[@' + config.author + '](' + config.url + config.root + ')';
|
||||
const using = '[' + stellar_info('name') + '](' + stellar_info('tree') + ' "v' + stellar_info('version') + '")';
|
||||
const source = theme.footer.source;
|
||||
const more = theme.footer.more;
|
||||
function layoutDiv() {
|
||||
var el = '';
|
||||
el += '<footer class="page-footer reveal fs12">';
|
||||
|
@ -35,6 +36,15 @@ function layoutDiv() {
|
|||
} else {
|
||||
el += markdown(__('footer.info_not_open_source', author, using));
|
||||
}
|
||||
if (more) {
|
||||
if ((typeof more == 'string') && more.constructor == String) {
|
||||
el += markdown(more);
|
||||
} else if ((typeof more == 'object') && more.constructor == Array) {
|
||||
more.forEach((item, i) => {
|
||||
el += markdown(item);
|
||||
});
|
||||
}
|
||||
}
|
||||
el += '</div></footer>';
|
||||
return el;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue