mirror of
https://github.com/next-theme/hexo-theme-next.git
synced 2026-01-18 18:33:42 +00:00
Update docs
This commit is contained in:
parent
641c310554
commit
51ef7217a1
@ -18,6 +18,7 @@ hexo.extend.filter.register('template_locals', locals => {
|
||||
locals.description = __('description') !== 'description' ? __('description') : config.description;
|
||||
locals.languages = [...i18n.languages];
|
||||
locals.languages.splice(locals.languages.indexOf('default'), 1);
|
||||
// See https://github.com/hexojs/hexo/pull/4614
|
||||
page.lang = page.lang || page.language;
|
||||
// Creative Commons
|
||||
locals.ccURL = 'https://creativecommons.org/' + (theme.creative_commons.license === 'zero' ? 'publicdomain/zero/1.0/' : 'licenses/' + theme.creative_commons.license + '/4.0/') + (theme.creative_commons.language || '');
|
||||
|
||||
@ -86,6 +86,7 @@ NexT.utils = {
|
||||
const lines = element.querySelector('.code') || element.querySelector('code');
|
||||
const code = lines.innerText;
|
||||
if (navigator.clipboard) {
|
||||
// https://caniuse.com/mdn-api_clipboard_writetext
|
||||
navigator.clipboard.writeText(code).then(() => {
|
||||
button.querySelector('i').className = 'fa fa-check-circle fa-fw';
|
||||
}, () => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user