💥 支持雙評論系統配置/評論配置整理

✨ 增加mac light 代碼框
✨ 增加文章過期提醒配置
✨ 文章copyright 可單獨配置
✨ card-category 中category名稱和數字限制一行顯示
✨ 簡繁轉換優化,placeholder文字也會被轉換
🐛 修復配置PWA參數時,如果網站是子目錄時,會出現加載不到文件的bugs
調整當card-category有收縮按鈕時的顯示佈局
This commit is contained in:
Jerry committed 2020-06-25 23:13:55 +08:00
1 parent 67b49c01ba
commit 4d34208391
47 files changed
+1098 -817

No files matched your search

+1 -1
View File
@@ -98,7 +98,7 @@ hexo.extend.helper.register('aside_archives', function (options = {}) {
return result
})
var toMomentLocale = function (lang) {
const toMomentLocale = function (lang) {
if (lang === undefined) {
return undefined
}
+5 -5
View File
@@ -35,19 +35,19 @@ hexo.extend.helper.register('aside_categories', function (categories, options) {
const hierarchicalList = (t, level, parent, topparent = true) => {
let result = ''
var isTopParent = topparent
const isTopParent = topparent
if (t > 0) {
prepareQuery(parent).forEach((cat, i) => {
if (t > 0) {
t = t - 1
let child
if (!depth || level + 1 < depth) {
var childList = hierarchicalList(t, level + 1, cat._id, false)
const childList = hierarchicalList(t, level + 1, cat._id, false)
child = childList[0]
t = childList[1]
}
var parentClass = isExpand && isTopParent && child ? 'parent' : ''
const parentClass = isExpand && isTopParent && child ? 'parent' : ''
result += `<li class="card-category-list-item ${parentClass}">`
@@ -79,8 +79,8 @@ hexo.extend.helper.register('aside_categories', function (categories, options) {
const list = hierarchicalList(limit, 0)
var moreButton = function () {
var moreHtml = ''
const moreButton = function () {
let moreHtml = ''
if (categories.length <= limit) return ''
moreHtml += '<li class="card-category-list-item more is-center">'
moreHtml += `<a class="card-category-list-link-more" href="${categoryDir}">
+3 -3
View File
@@ -25,7 +25,7 @@ hexo.extend.helper.register('page_description', function () {
hexo.extend.helper.register('injectHtml', function (data) {
let result = ''
if (!data) return ''
for (var i = 0; i < data.length; i++) {
for (let i = 0; i < data.length; i++) {
result += data[i]
}
return result
@@ -41,8 +41,8 @@ hexo.extend.helper.register('cloudTags', function (options = {}) {
let result = ''
const tagLimit = limit === 0 ? source.length : limit
source.sort('name').limit(tagLimit).forEach(function (tags) {
var fontSize = Math.floor(Math.random() * (maxfontsize - minfontsize) + minfontsize) + 'px'
var color = 'rgb(' + Math.floor(Math.random() * 201) + ', ' + Math.floor(Math.random() * 201) + ', ' + Math.floor(Math.random() * 201) + ')' // 0,0,0 -> 200,200,200
const fontSize = Math.floor(Math.random() * (maxfontsize - minfontsize) + minfontsize) + 'px'
const 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='${env.url_for(tags.path)}' style='font-size:${fontSize}; color:${color}'>${tags.name}</a>`
})
return result
Loaded 3 of 47 files, more files were not shown because too many files have changed in this diff. Show more