1. Fix: random cover of prev post and next post

2. Feature: add the option to change the site name font-family
3. Feature: add the option to close instant-page
4. Fix: Display null when the sutitle not set
This commit is contained in:
hwy0127@gmail.com
2019-07-24 17:47:58 +08:00
Unverified
parent 0a1d8b0eba
commit f07405706b
11 changed files with 59 additions and 55 deletions
+16
View File
@@ -0,0 +1,16 @@
hexo.extend.helper.register('tags', function (site_tags) {
var result = "";
site_tags.sort('path').each(function (tags) {
var fontSize = Math.floor(Math.random() * 15 + 15) + "px"; //15 ~ 30
var color =
"rgb(" +
Math.floor(Math.random() * 201) +
", " +
Math.floor(Math.random() * 201) +
", " +
Math.floor(Math.random() * 201) +
")"; // 0,0,0 -> 200,200,200
result += '<a href="' + hexo.theme.config.rootConfig.root + tags.path + '" style="font-size:' + fontSize + ';color:' + color + '">' + tags.name + '</a>'
})
return result;
})