fix bugs
This commit is contained in:
parent
4c4ce9a547
commit
7ffd2f6cda
|
@ -11,6 +11,9 @@ function layoutDiv() {
|
|||
} else if (utterances.theme.light) {
|
||||
utterances.theme = utterances.theme.light;
|
||||
}
|
||||
if (utterances['issue-number']) {
|
||||
utterances['issue-term'] = null;
|
||||
}
|
||||
for (let key of Object.keys(utterances)) {
|
||||
if (utterances[key]) {
|
||||
el += ' ' + key + '="' + utterances[key] + '"';
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
} catch (error) {}
|
||||
var script = document.createElement('script');
|
||||
script.src = 'https://utteranc.es/client.js';
|
||||
const keys = ['repo', 'issue-term', 'theme', 'label', 'crossorigin'];
|
||||
const keys = ['repo', 'issue-term', 'issue-number', 'theme', 'label', 'crossorigin'];
|
||||
keys.forEach((key, i) => {
|
||||
if (el.attributes[key] && el.attributes[key].value) {
|
||||
script.setAttribute(key, el.attributes[key].value);
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
const { ArgsMap } = require('./utils');
|
||||
|
||||
hexo.extend.tag.register('link', function(args) {
|
||||
args = ArgsMap(args, ['src'], ['url', 'title', 'description']);
|
||||
args = ArgsMap(args, ['img'], ['url', 'title', 'description']);
|
||||
var el = '';
|
||||
el += '<div class="tag-plugin tag link">';
|
||||
el += '<a class="link-card" title="' + args.title + '" href="' + args.url + '">';
|
||||
|
|
|
@ -19,6 +19,7 @@ hexo.extend.tag.register('swiper', function(args, content) {
|
|||
imgs = imgs.match(/<img(.*?)src="(.*?)"(.*?)>/gi);
|
||||
if (imgs && imgs.length > 0) {
|
||||
imgs.forEach((img, i) => {
|
||||
img = img.replace('<img src', '<img no-lazy src');
|
||||
el += '<div class="swiper-slide">' + img + '</div>';
|
||||
});
|
||||
}
|
||||
|
|
|
@ -264,6 +264,7 @@ if (stellar.plugins.swiper) {
|
|||
slidesPerView: 'auto',
|
||||
spaceBetween: 8,
|
||||
centeredSlides: true,
|
||||
loop: true,
|
||||
pagination: {
|
||||
el: '.swiper-pagination',
|
||||
clickable: true,
|
||||
|
|
Loading…
Reference in New Issue