This commit is contained in:
haoouba
2021-01-24 21:30:43 +08:00
parent 42c7807e76
commit 94050964e1
16 changed files with 79 additions and 106 deletions

View File

@@ -4,7 +4,14 @@ document.addEventListener('DOMContentLoaded', () => {
if ($('.joe_index__banner .swiper-container').length !== 0) {
let direction = 'horizontal'
if (!Joe.prototype.IS_MOBILE && $('.joe_index__banner-recommend .item').length === 2) direction = 'vertical'
new Swiper('.swiper-container', { direction, loop: true, autoplay: true, mousewheel: true, pagination: { el: '.swiper-pagination' } })
new Swiper('.swiper-container', {
keyboard: true,
direction,
loop: true,
autoplay: true,
mousewheel: true,
pagination: { el: '.swiper-pagination' }
})
}
}

View File

@@ -32,7 +32,10 @@ document.addEventListener('DOMContentLoaded', () => {
/* 设置文章内的链接为新窗口打开 */
{
$('.joe_detail__article a').each(function () {
$(this).attr('target', '_blank')
$(this).attr({
target: '_blank',
rel: 'noopener noreferrer nofollow'
})
})
}