Skip to content

Commit

Permalink
1. 修復當valine background 是絕對地址時無法顯示的bug
Browse files Browse the repository at this point in the history
  • Loading branch information
jerryc127 committed Dec 21, 2019
1 parent e77ab81 commit 995fc7c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 12 deletions.
12 changes: 6 additions & 6 deletions layout/includes/additional-js.pug
Original file line number Diff line number Diff line change
@@ -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)
script(src=url_for(theme.CDN.medium_zoom))

Expand Down Expand Up @@ -31,12 +34,6 @@ if theme.activate_power_mode.enable
POWERMODE.shake = !{shake};
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
script(async src=url_for(theme.CDN.busuanzi))

Expand All @@ -52,3 +49,6 @@ if theme.click_heart && theme.click_heart.enable

if theme.ClickShowText && theme.ClickShowText.enable
script(src=url_for(theme.CDN.ClickShowText))

if is_home()
include index-js.pug
4 changes: 0 additions & 4 deletions scripts/photo.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@ hexo.extend.filter.register('after_post_render', data => {

}
if (theme.medium_zoom.enable) {
images.each((i, o) => {
$(o).addClass('mediumZoom')
})

var imgList = $(".justified-gallery img")
if (imgList.length) {
imgList.each((i, o) => {
Expand Down
2 changes: 1 addition & 1 deletion source/css/_layout/comments.styl
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
font-size: .7rem

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
display: none
Expand Down
2 changes: 1 addition & 1 deletion source/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ $(function () {
buttons: ['slideShow', 'fullScreen', 'thumbs', 'close']
})
} else if (isMediumZoom) {
const zoom = mediumZoom(document.querySelectorAll('.mediumZoom'))
const zoom = mediumZoom(document.querySelectorAll(':not(a)>img'))
zoom.on('open', event => {
const photoBg = $(document.documentElement).attr('data-theme') === 'dark' ? '#121212' : '#fff'
zoom.update({
Expand Down

0 comments on commit 995fc7c

Please sign in to comment.