feat: note 標籤優化(可自定義icon圖標/可覆蓋配置中的style)

feat: 增加部分特效 Mobile設置(activate_power_mode/fireworks/click_heart/ClickShowText)
feat: aside 分類 收縮/展開 增加slide效果
improvement: 更改canvas_ribbon_piao 為 canvas_fluttering_ribbon
improvement: darkmode 字體顔色加深
improvement: 優化nav的進入,應該修復一些用户在本地測試中無法顯示nav的bugs
improvement: 部分css和html優化
fix: 修復鼠標點擊文字特效,文字過長導致頁面有滾動條的bugs
remove: 移除anime js, 集成在fireworks的js裏
remove: 刪除特效js,改為cdn引入
This commit is contained in:
Jerry
2020-09-12 02:44:57 +08:00
Unverified
parent 92b39ff515
commit 554d05d576
23 changed files with 144 additions and 856 deletions
+15 -1
View File
@@ -1,12 +1,26 @@
/**
* note.js
* transplant from hexo-theme-next
* Modify by Jerry
*/
'use strict'
function postNote (args, content) {
return `<div class="note ${args.join(' ')}">${hexo.render.renderSync({ text: content, engine: 'markdown' })}</div>`
const styleConfig = hexo.theme.config.note.style
const lastArgs = args[args.length - 1]
if (!(lastArgs === 'flat' || lastArgs === 'modern' || lastArgs === 'simple' || lastArgs === 'disabled')) {
args.push(styleConfig)
}
let icon = ''
const iconArray = args[args.length - 2]
if (iconArray && iconArray.startsWith('fa')) {
icon = `<i class="note-icon ${iconArray}"></i>`
args[args.length - 2] = 'icon'
}
return `<div class="note ${args.join(' ')}">${icon + hexo.render.renderSync({ text: content, engine: 'markdown' })}</div>`
}
hexo.extend.tag.register('note', postNote, { ends: true })