🏷️ 2.3.0發佈

This commit is contained in:
Jerry
2020-04-26 23:29:38 +08:00
Unverified
parent 796b8e6df4
commit 0d56db50e4
16 changed files with 127 additions and 87 deletions

View File

@@ -362,6 +362,21 @@ $(function () {
}
}
/**
* PhotoFigcaption
*/
function addPhotoFigcaption () {
var images = $('#article-container img')
images.each(function (i, o) {
var $this = $(o)
if ($this.attr('alt')) {
var t = $('<div class="img-alt is-center">' + $this.attr('alt') + '</div>')
$this.after(t)
}
})
}
if (GLOBAL_CONFIG.isPhotoFigcaption) addPhotoFigcaption()
/**
* justified-gallery 圖庫排版
*/
@@ -518,8 +533,8 @@ $(function () {
}
var updateAnchor = function (anchor) {
if (window.history.replaceState && anchor !== window.location.hash) {
window.history.replaceState(undefined, undefined, anchor)
if (anchor !== window.location.hash) {
location.replace(window.location.href.split('#')[0] + anchor)
}
}
@@ -758,19 +773,4 @@ $(function () {
}
})
}
/**
* PhotoFigcaption
*/
function addPhotoFigcaption () {
var images = $('#article-container img')
images.each(function (i, o) {
var $this = $(o)
if ($this.attr('alt')) {
var t = $('<div class="img-alt is-center">' + $this.attr('alt') + '</div>')
$this.after(t)
}
})
}
if (GLOBAL_CONFIG.isPhotoFigcaption) addPhotoFigcaption()
})