mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2026-04-10 21:17:07 +08:00
feat: 可配置文章版權模塊的作者超鏈接
feat: 歸檔頁面的側邊欄支持隱藏 improvement: 更新social-share cdn 版本 improvement: 調整分享按鈕導致的間距問題 improvement: html/css 優化
This commit is contained in:
2
.github/stale.yml
vendored
2
.github/stale.yml
vendored
@@ -10,7 +10,7 @@ exemptLabels:
|
|||||||
- enhancement
|
- enhancement
|
||||||
- documentation
|
- documentation
|
||||||
# Label to use when marking an issue as stale
|
# Label to use when marking an issue as stale
|
||||||
staleLabel: wontfix
|
staleLabel: stale
|
||||||
# Comment to post when marking an issue as stale. Set to `false` to disable
|
# Comment to post when marking an issue as stale. Set to `false` to disable
|
||||||
markComment: >
|
markComment: >
|
||||||
This issue has been automatically marked as stale because it has not had
|
This issue has been automatically marked as stale because it has not had
|
||||||
|
|||||||
@@ -183,6 +183,7 @@ toc:
|
|||||||
post_copyright:
|
post_copyright:
|
||||||
enable: true
|
enable: true
|
||||||
decode: false
|
decode: false
|
||||||
|
author_href:
|
||||||
license: CC BY-NC-SA 4.0
|
license: CC BY-NC-SA 4.0
|
||||||
license_url: https://creativecommons.org/licenses/by-nc-sa/4.0/
|
license_url: https://creativecommons.org/licenses/by-nc-sa/4.0/
|
||||||
|
|
||||||
@@ -616,6 +617,7 @@ aside:
|
|||||||
button: true
|
button: true
|
||||||
mobile: true # display on mobile
|
mobile: true # display on mobile
|
||||||
position: right # left or right
|
position: right # left or right
|
||||||
|
archives: true
|
||||||
card_author:
|
card_author:
|
||||||
enable: true
|
enable: true
|
||||||
description:
|
description:
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
- var htmlClassHideAside = theme.aside.enable && theme.aside.hide ? 'hide-aside' : ''
|
- var htmlClassHideAside = theme.aside.enable && theme.aside.hide ? 'hide-aside' : ''
|
||||||
|
- page.aside = is_archive() ? theme.aside.archives : page.aside
|
||||||
- var hideAside = !theme.aside.enable || page.aside === false ? 'hide-aside' : ''
|
- var hideAside = !theme.aside.enable || page.aside === false ? 'hide-aside' : ''
|
||||||
- var pageType = is_post() ? 'post' : 'page'
|
- var pageType = is_post() ? 'post' : 'page'
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
if theme.post_copyright.enable && page.copyright !== false
|
if theme.post_copyright.enable && page.copyright !== false
|
||||||
- let author = page.copyright_author ? page.copyright_author : config.author
|
- let author = page.copyright_author || config.author
|
||||||
- let authorHref = page.copyright_author_href ? page.copyright_author_href : `mailto:${config.email}`
|
- let authorHref = page.copyright_author_href || theme.post_copyright.author_href || config.url
|
||||||
- let url = page.copyright_url ? page.copyright_url : page.permalink
|
- let url = page.copyright_url || page.permalink
|
||||||
- let info = page.copyright_info ? page.copyright_info : _p('post.copyright.copyright_content', theme.post_copyright.license_url, theme.post_copyright.license, config.url, config.title)
|
- let info = page.copyright_info || _p('post.copyright.copyright_content', theme.post_copyright.license_url, theme.post_copyright.license, config.url, config.title)
|
||||||
.post-copyright
|
.post-copyright
|
||||||
.post-copyright__author
|
.post-copyright__author
|
||||||
span.post-copyright-meta= _p('post.copyright.author') + ": "
|
span.post-copyright-meta= _p('post.copyright.author') + ": "
|
||||||
|
|||||||
@@ -3,18 +3,13 @@
|
|||||||
#sidebar-menus
|
#sidebar-menus
|
||||||
.avatar-img.is-center
|
.avatar-img.is-center
|
||||||
img(src=url_for(theme.avatar.img) onerror=`onerror=null;src='${theme.error_img.flink}'` alt="avatar")
|
img(src=url_for(theme.avatar.img) onerror=`onerror=null;src='${theme.error_img.flink}'` alt="avatar")
|
||||||
.site-data.is-center
|
.sidebar-site-data.site-data.is-center
|
||||||
.data-item
|
|
||||||
a(href=url_for(config.archive_dir) + '/')
|
a(href=url_for(config.archive_dir) + '/')
|
||||||
.headline= _p('aside.articles')
|
.headline= _p('aside.articles')
|
||||||
.length-num= site.posts.length
|
.length-num= site.posts.length
|
||||||
|
|
||||||
.data-item
|
|
||||||
a(href=url_for(config.tag_dir) + '/' )
|
a(href=url_for(config.tag_dir) + '/' )
|
||||||
.headline= _p('aside.tags')
|
.headline= _p('aside.tags')
|
||||||
.length-num= site.tags.length
|
.length-num= site.tags.length
|
||||||
|
|
||||||
.data-item
|
|
||||||
a(href=url_for(config.category_dir) + '/')
|
a(href=url_for(config.category_dir) + '/')
|
||||||
.headline= _p('aside.categories')
|
.headline= _p('aside.categories')
|
||||||
.length-num= site.categories.length
|
.length-num= site.categories.length
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ script.
|
|||||||
if (typeof FB === 'object') FB.XFBML.parse()
|
if (typeof FB === 'object') FB.XFBML.parse()
|
||||||
else {
|
else {
|
||||||
let ele = document.createElement('script')
|
let ele = document.createElement('script')
|
||||||
ele.setAttribute('src','https://connect.facebook.net/!{theme.facebook_comments.lang}/sdk.js#xfbml=1&version=v13.0&autoLogAppEvents=1')
|
ele.setAttribute('src','https://connect.facebook.net/!{theme.facebook_comments.lang}/sdk.js#xfbml=1&version=v13.0&appId=!{theme.facebook_comments.app_id}&autoLogAppEvents=1')
|
||||||
ele.setAttribute('async', 'true')
|
ele.setAttribute('async', 'true')
|
||||||
ele.setAttribute('defer', 'true')
|
ele.setAttribute('defer', 'true')
|
||||||
ele.setAttribute('crossorigin', 'anonymous')
|
ele.setAttribute('crossorigin', 'anonymous')
|
||||||
|
|||||||
@@ -6,18 +6,13 @@ if theme.aside.card_author.enable
|
|||||||
.author-info__name= config.author
|
.author-info__name= config.author
|
||||||
.author-info__description!= theme.aside.card_author.description || config.description
|
.author-info__description!= theme.aside.card_author.description || config.description
|
||||||
|
|
||||||
.card-info-data.is-center
|
.card-info-data.site-data.is-center
|
||||||
.card-info-data-item
|
|
||||||
a(href=url_for(config.archive_dir) + '/')
|
a(href=url_for(config.archive_dir) + '/')
|
||||||
.headline= _p('aside.articles')
|
.headline= _p('aside.articles')
|
||||||
.length-num= site.posts.length
|
.length-num= site.posts.length
|
||||||
|
|
||||||
.card-info-data-item
|
|
||||||
a(href=url_for(config.tag_dir) + '/')
|
a(href=url_for(config.tag_dir) + '/')
|
||||||
.headline= _p('aside.tags')
|
.headline= _p('aside.tags')
|
||||||
.length-num= site.tags.length
|
.length-num= site.tags.length
|
||||||
|
|
||||||
.card-info-data-item
|
|
||||||
a(href=url_for(config.category_dir) + '/')
|
a(href=url_for(config.category_dir) + '/')
|
||||||
.headline= _p('aside.categories')
|
.headline= _p('aside.categories')
|
||||||
.length-num= site.categories.length
|
.length-num= site.categories.length
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ hexo.extend.filter.register('before_generate', () => {
|
|||||||
local: '/js/lib/disqusjs/disqusjs.css'
|
local: '/js/lib/disqusjs/disqusjs.css'
|
||||||
},
|
},
|
||||||
twikoo: {
|
twikoo: {
|
||||||
cdn: 'https://cdn.jsdelivr.net/npm/twikoo/dist/twikoo.all.min.js',
|
cdn: 'https://cdn.jsdelivr.net/npm/twikoo@1/dist/twikoo.all.min.js',
|
||||||
local: '/js/lib/twikoo/twikoo.all.min.js'
|
local: '/js/lib/twikoo/twikoo.all.min.js'
|
||||||
},
|
},
|
||||||
waline: {
|
waline: {
|
||||||
@@ -88,7 +88,7 @@ hexo.extend.filter.register('before_generate', () => {
|
|||||||
local: '/js/lib/waline/Waline.min.js'
|
local: '/js/lib/waline/Waline.min.js'
|
||||||
},
|
},
|
||||||
sharejs: {
|
sharejs: {
|
||||||
cdn: 'https://cdn.jsdelivr.net/npm/social-share.js/dist/js/social-share.min.js',
|
cdn: 'https://cdn.jsdelivr.net/gh/overtrue/share.js@master/dist/js/social-share.min.js',
|
||||||
local: '/js/lib/social-share.js/dist/social-share.min.js'
|
local: '/js/lib/social-share.js/dist/social-share.min.js'
|
||||||
},
|
},
|
||||||
sharejs_css: {
|
sharejs_css: {
|
||||||
|
|||||||
@@ -131,7 +131,7 @@ if hexo-config('enter_transitions')
|
|||||||
&.open
|
&.open
|
||||||
for i in 1 2 3 4
|
for i in 1 2 3 4
|
||||||
> :nth-child({i})
|
> :nth-child({i})
|
||||||
animation: sidebarItem (i / 5) s
|
animation: sidebarItem (i / 5)s
|
||||||
|
|
||||||
.scroll-down-effects
|
.scroll-down-effects
|
||||||
animation: scroll-down-effect 1.5s infinite
|
animation: scroll-down-effect 1.5s infinite
|
||||||
|
|||||||
@@ -38,24 +38,7 @@
|
|||||||
margin-top: -.42em
|
margin-top: -.42em
|
||||||
|
|
||||||
.card-info-data
|
.card-info-data
|
||||||
display: table
|
|
||||||
margin: 14px 0 4px
|
margin: 14px 0 4px
|
||||||
width: 100%
|
|
||||||
table-layout: fixed
|
|
||||||
|
|
||||||
& > .card-info-data-item
|
|
||||||
display: table-cell
|
|
||||||
|
|
||||||
a
|
|
||||||
.headline
|
|
||||||
@extend .limit-one-line
|
|
||||||
color: var(--font-color)
|
|
||||||
font-size: 1em
|
|
||||||
|
|
||||||
.length-num
|
|
||||||
margin-top: -.42em
|
|
||||||
color: var(--text-highlight-color)
|
|
||||||
font-size: 1.4em
|
|
||||||
|
|
||||||
.card-info-social-icons
|
.card-info-social-icons
|
||||||
margin: 6px 0 -6px
|
margin: 6px 0 -6px
|
||||||
@@ -340,6 +323,30 @@
|
|||||||
&:hover
|
&:hover
|
||||||
transform: rotate(360deg)
|
transform: rotate(360deg)
|
||||||
|
|
||||||
|
.site-data
|
||||||
|
display: table
|
||||||
|
width: 100%
|
||||||
|
table-layout: fixed
|
||||||
|
|
||||||
|
& > a
|
||||||
|
display: table-cell
|
||||||
|
|
||||||
|
div
|
||||||
|
transition: all .3s
|
||||||
|
|
||||||
|
&:hover
|
||||||
|
div
|
||||||
|
color: $theme-color !important
|
||||||
|
|
||||||
|
.headline
|
||||||
|
@extend .limit-one-line
|
||||||
|
color: var(--font-color)
|
||||||
|
|
||||||
|
.length-num
|
||||||
|
margin-top: -.32em
|
||||||
|
color: var(--text-highlight-color)
|
||||||
|
font-size: 1.4em
|
||||||
|
|
||||||
@keyframes more-btn-move
|
@keyframes more-btn-move
|
||||||
0%,
|
0%,
|
||||||
100%
|
100%
|
||||||
|
|||||||
@@ -152,6 +152,11 @@ beautify()
|
|||||||
|
|
||||||
#post
|
#post
|
||||||
.tag_share
|
.tag_share
|
||||||
|
&:after
|
||||||
|
display: block
|
||||||
|
clear: both
|
||||||
|
content: ''
|
||||||
|
|
||||||
.post-meta
|
.post-meta
|
||||||
&__tag-list
|
&__tag-list
|
||||||
display: inline-block
|
display: inline-block
|
||||||
@@ -174,7 +179,7 @@ beautify()
|
|||||||
.post_share
|
.post_share
|
||||||
display: inline-block
|
display: inline-block
|
||||||
float: right
|
float: right
|
||||||
margin: 8px 0 20px
|
margin: 8px 0 0
|
||||||
width: fit-content
|
width: fit-content
|
||||||
|
|
||||||
.social-share
|
.social-share
|
||||||
|
|||||||
@@ -25,24 +25,8 @@
|
|||||||
& > .avatar-img
|
& > .avatar-img
|
||||||
margin: 20px auto
|
margin: 20px auto
|
||||||
|
|
||||||
.site-data
|
.sidebar-site-data
|
||||||
display: table
|
|
||||||
padding: 0 10px
|
padding: 0 10px
|
||||||
width: 100%
|
|
||||||
table-layout: fixed
|
|
||||||
|
|
||||||
.data-item
|
|
||||||
display: table-cell
|
|
||||||
|
|
||||||
& > a > div
|
|
||||||
@extend .limit-one-line
|
|
||||||
|
|
||||||
.length-num
|
|
||||||
color: var(--text-highlight-color)
|
|
||||||
font-size: 1.28em
|
|
||||||
|
|
||||||
.headline
|
|
||||||
color: var(--font-color)
|
|
||||||
|
|
||||||
hr
|
hr
|
||||||
margin: 20px auto
|
margin: 20px auto
|
||||||
|
|||||||
Reference in New Issue
Block a user