mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2026-04-10 21:17:07 +08:00
feature: 增加 tags 標簽外掛 - label
improvement: 優化 pjax 下 404 頁面
This commit is contained in:
@@ -91,6 +91,7 @@ if hexo-config('darkmode.enable') || hexo-config('display_mode') == 'dark'
|
||||
.hide-button,
|
||||
.btn-beautify,
|
||||
.mermaid,
|
||||
.hl-label,
|
||||
.post-outdate-notice,
|
||||
.error-img,
|
||||
#article-container iframe,
|
||||
|
||||
@@ -173,24 +173,15 @@ if hexo-config('readmode')
|
||||
border: 1px solid var(--gray) !important
|
||||
|
||||
.hide-button,
|
||||
.btn-beautify
|
||||
.btn-beautify,
|
||||
.hl-label
|
||||
border: 1px solid var(--gray) !important
|
||||
background: var(--readmode-light-color) !important
|
||||
color: var(--font-color) !important
|
||||
|
||||
.btn-beautify
|
||||
border: 1px solid var(--gray) !important
|
||||
|
||||
.button--animated:before
|
||||
background: var(--readmode-light-color) !important
|
||||
|
||||
.hide-inline,
|
||||
.hide-block
|
||||
& >.hide-button
|
||||
border: 1px solid var(--gray)
|
||||
|
||||
& > .button--animated:before
|
||||
background: var(--readmode-light-color)
|
||||
|
||||
.note
|
||||
border: 2px solid var(--gray)
|
||||
border-left-color: var(--gray) !important
|
||||
|
||||
11
source/css/_tags/label.styl
Normal file
11
source/css/_tags/label.styl
Normal file
@@ -0,0 +1,11 @@
|
||||
.hl-label
|
||||
padding: 2px 4px
|
||||
border-radius: 3px
|
||||
color: $btn-color
|
||||
|
||||
&.default
|
||||
background-color: $btn-default-color
|
||||
|
||||
for $type in $tagsP-types
|
||||
&.{$type}
|
||||
background-color: lookup('$tagsP-' + $type + '-color')
|
||||
@@ -413,7 +413,11 @@ document.addEventListener('DOMContentLoaded', function () {
|
||||
const updateAnchor = function (anchor) {
|
||||
if (window.history.replaceState && anchor !== window.location.hash) {
|
||||
if (!anchor) anchor = location.pathname
|
||||
window.history.replaceState({}, '', anchor)
|
||||
const title = GLOBAL_CONFIG_SITE.title
|
||||
window.history.replaceState({
|
||||
url: location.href,
|
||||
title: title
|
||||
}, title, anchor)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user