mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2026-06-06 05:11:45 +08:00
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:
@@ -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;
|
||||
})
|
||||
Reference in New Issue
Block a user