1. 修復當valine background 是絕對地址時無法顯示的bug

This commit is contained in:
Jerry 2019-12-22 00:50:59 +08:00
parent e77ab81941
commit 995fc7cf9d
4 changed files with 8 additions and 12 deletions

View File

@ -1,3 +1,6 @@
if theme.translate && theme.translate.enable
script(src=url_for(theme.CDN.translate))
if (theme.medium_zoom && theme.medium_zoom.enable) if (theme.medium_zoom && theme.medium_zoom.enable)
script(src=url_for(theme.CDN.medium_zoom)) script(src=url_for(theme.CDN.medium_zoom))
@ -31,12 +34,6 @@ if theme.activate_power_mode.enable
POWERMODE.shake = !{shake}; POWERMODE.shake = !{shake};
document.body.addEventListener('input', POWERMODE); document.body.addEventListener('input', POWERMODE);
if theme.translate && theme.translate.enable
script(src=url_for(theme.CDN.translate))
if is_home()
include index-js.pug
if theme.busuanzi.site_uv || theme.busuanzi.site_pv || theme.busuanzi.page_pv if theme.busuanzi.site_uv || theme.busuanzi.site_pv || theme.busuanzi.page_pv
script(async src=url_for(theme.CDN.busuanzi)) script(async src=url_for(theme.CDN.busuanzi))
@ -52,3 +49,6 @@ if theme.click_heart && theme.click_heart.enable
if theme.ClickShowText && theme.ClickShowText.enable if theme.ClickShowText && theme.ClickShowText.enable
script(src=url_for(theme.CDN.ClickShowText)) script(src=url_for(theme.CDN.ClickShowText))
if is_home()
include index-js.pug

View File

@ -27,10 +27,6 @@ hexo.extend.filter.register('after_post_render', data => {
} }
if (theme.medium_zoom.enable) { if (theme.medium_zoom.enable) {
images.each((i, o) => {
$(o).addClass('mediumZoom')
})
var imgList = $(".justified-gallery img") var imgList = $(".justified-gallery img")
if (imgList.length) { if (imgList.length) {
imgList.each((i, o) => { imgList.each((i, o) => {

View File

@ -27,7 +27,7 @@
font-size: .7rem font-size: .7rem
if hexo-config('valine.bg') if hexo-config('valine.bg')
background: url(convert(hexo-config('valine.bg'))) 100% 100% no-repeat background: url(hexo-config('valine.bg')) 100% 100% no-repeat
.info .info
display: none display: none

View File

@ -258,7 +258,7 @@ $(function () {
buttons: ['slideShow', 'fullScreen', 'thumbs', 'close'] buttons: ['slideShow', 'fullScreen', 'thumbs', 'close']
}) })
} else if (isMediumZoom) { } else if (isMediumZoom) {
const zoom = mediumZoom(document.querySelectorAll('.mediumZoom')) const zoom = mediumZoom(document.querySelectorAll(':not(a)>img'))
zoom.on('open', event => { zoom.on('open', event => {
const photoBg = $(document.documentElement).attr('data-theme') === 'dark' ? '#121212' : '#fff' const photoBg = $(document.documentElement).attr('data-theme') === 'dark' ? '#121212' : '#fff'
zoom.update({ zoom.update({