mirror of https://gitlab.com/curben/blog
parent
43bf50dac5
commit
55f5f11c2f
|
@ -21,7 +21,7 @@
|
||||||
"hexo-renderer-marked": "^0.3.2",
|
"hexo-renderer-marked": "^0.3.2",
|
||||||
"hexo-renderer-stylus": "^0.3.3",
|
"hexo-renderer-stylus": "^0.3.3",
|
||||||
"hexo-server": "^0.3.3",
|
"hexo-server": "^0.3.3",
|
||||||
"hexo-yam": "^1.0.4"
|
"hexo-yam": "^1.2.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"renovate": "^14.42.2",
|
"renovate": "^14.42.2",
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
// Don't insert fancybox element to cloudinary's cld-responsive img class
|
// Don't insert fancybox element to cloudinary's cld-responsive img class
|
||||||
if ($(this).hasClass('cld-responsive') || $(this).parent().hasClass('fancybox')) return
|
if ($(this).hasClass('cld-responsive') || $(this).parent().hasClass('fancybox')) return
|
||||||
|
|
||||||
var alt = this.alt
|
const alt = this.alt
|
||||||
|
|
||||||
if (alt) {
|
if (alt) {
|
||||||
$(this).after('<span class="caption">' + alt + '</span>')
|
$(this).after('<span class="caption">' + alt + '</span>')
|
||||||
|
@ -24,10 +24,10 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add "Copy" button to code snippet
|
// Add "Copy" button to code snippet
|
||||||
var code = document.getElementsByClassName('code')
|
const code = document.getElementsByClassName('code')
|
||||||
|
|
||||||
for (var i = 0; i < code.length; i++) {
|
for (let i = 0; i < code.length; i++) {
|
||||||
var button = document.createElement('button')
|
const button = document.createElement('button')
|
||||||
button.className = 'copy-button'
|
button.className = 'copy-button'
|
||||||
button.textContent = 'Copy'
|
button.textContent = 'Copy'
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@
|
||||||
|
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
// Add copy to clipboard button for code snippet
|
// Add copy to clipboard button for code snippet
|
||||||
var copyCode = new ClipboardJS('.copy-button', {
|
const copyCode = new ClipboardJS('.copy-button', {
|
||||||
target: function (trigger) {
|
target: function (trigger) {
|
||||||
return trigger.previousElementSibling
|
return trigger.previousElementSibling
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue