mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2026-04-08 12:07:06 +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
|
||||
- documentation
|
||||
# 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
|
||||
markComment: >
|
||||
This issue has been automatically marked as stale because it has not had
|
||||
|
||||
@@ -183,6 +183,7 @@ toc:
|
||||
post_copyright:
|
||||
enable: true
|
||||
decode: false
|
||||
author_href:
|
||||
license: CC BY-NC-SA 4.0
|
||||
license_url: https://creativecommons.org/licenses/by-nc-sa/4.0/
|
||||
|
||||
@@ -616,6 +617,7 @@ aside:
|
||||
button: true
|
||||
mobile: true # display on mobile
|
||||
position: right # left or right
|
||||
archives: true
|
||||
card_author:
|
||||
enable: true
|
||||
description:
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
- 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 pageType = is_post() ? 'post' : 'page'
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
if theme.post_copyright.enable && page.copyright !== false
|
||||
- let author = page.copyright_author ? page.copyright_author : config.author
|
||||
- let authorHref = page.copyright_author_href ? page.copyright_author_href : `mailto:${config.email}`
|
||||
- let url = page.copyright_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 author = page.copyright_author || config.author
|
||||
- let authorHref = page.copyright_author_href || theme.post_copyright.author_href || config.url
|
||||
- let url = page.copyright_url || page.permalink
|
||||
- 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__author
|
||||
span.post-copyright-meta= _p('post.copyright.author') + ": "
|
||||
|
||||
@@ -3,21 +3,16 @@
|
||||
#sidebar-menus
|
||||
.avatar-img.is-center
|
||||
img(src=url_for(theme.avatar.img) onerror=`onerror=null;src='${theme.error_img.flink}'` alt="avatar")
|
||||
.site-data.is-center
|
||||
.data-item
|
||||
a(href=url_for(config.archive_dir) + '/')
|
||||
.headline= _p('aside.articles')
|
||||
.length-num= site.posts.length
|
||||
|
||||
.data-item
|
||||
a(href=url_for(config.tag_dir) + '/' )
|
||||
.headline= _p('aside.tags')
|
||||
.length-num= site.tags.length
|
||||
|
||||
.data-item
|
||||
a(href=url_for(config.category_dir) + '/')
|
||||
.headline= _p('aside.categories')
|
||||
.length-num= site.categories.length
|
||||
.sidebar-site-data.site-data.is-center
|
||||
a(href=url_for(config.archive_dir) + '/')
|
||||
.headline= _p('aside.articles')
|
||||
.length-num= site.posts.length
|
||||
a(href=url_for(config.tag_dir) + '/' )
|
||||
.headline= _p('aside.tags')
|
||||
.length-num= site.tags.length
|
||||
a(href=url_for(config.category_dir) + '/')
|
||||
.headline= _p('aside.categories')
|
||||
.length-num= site.categories.length
|
||||
|
||||
hr
|
||||
!=partial('includes/header/menu_item', {}, {cache: true})
|
||||
|
||||
@@ -7,7 +7,7 @@ script.
|
||||
if (typeof FB === 'object') FB.XFBML.parse()
|
||||
else {
|
||||
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('defer', 'true')
|
||||
ele.setAttribute('crossorigin', 'anonymous')
|
||||
|
||||
@@ -6,21 +6,16 @@ if theme.aside.card_author.enable
|
||||
.author-info__name= config.author
|
||||
.author-info__description!= theme.aside.card_author.description || config.description
|
||||
|
||||
.card-info-data.is-center
|
||||
.card-info-data-item
|
||||
a(href=url_for(config.archive_dir) + '/')
|
||||
.headline= _p('aside.articles')
|
||||
.length-num= site.posts.length
|
||||
|
||||
.card-info-data-item
|
||||
a(href=url_for(config.tag_dir) + '/')
|
||||
.headline= _p('aside.tags')
|
||||
.length-num= site.tags.length
|
||||
|
||||
.card-info-data-item
|
||||
a(href=url_for(config.category_dir) + '/')
|
||||
.headline= _p('aside.categories')
|
||||
.length-num= site.categories.length
|
||||
.card-info-data.site-data.is-center
|
||||
a(href=url_for(config.archive_dir) + '/')
|
||||
.headline= _p('aside.articles')
|
||||
.length-num= site.posts.length
|
||||
a(href=url_for(config.tag_dir) + '/')
|
||||
.headline= _p('aside.tags')
|
||||
.length-num= site.tags.length
|
||||
a(href=url_for(config.category_dir) + '/')
|
||||
.headline= _p('aside.categories')
|
||||
.length-num= site.categories.length
|
||||
|
||||
if theme.aside.card_author.button.enable
|
||||
a#card-info-btn(href=theme.aside.card_author.button.link)
|
||||
|
||||
@@ -80,7 +80,7 @@ hexo.extend.filter.register('before_generate', () => {
|
||||
local: '/js/lib/disqusjs/disqusjs.css'
|
||||
},
|
||||
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'
|
||||
},
|
||||
waline: {
|
||||
@@ -88,7 +88,7 @@ hexo.extend.filter.register('before_generate', () => {
|
||||
local: '/js/lib/waline/Waline.min.js'
|
||||
},
|
||||
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'
|
||||
},
|
||||
sharejs_css: {
|
||||
|
||||
@@ -131,7 +131,7 @@ if hexo-config('enter_transitions')
|
||||
&.open
|
||||
for i in 1 2 3 4
|
||||
> :nth-child({i})
|
||||
animation: sidebarItem (i / 5) s
|
||||
animation: sidebarItem (i / 5)s
|
||||
|
||||
.scroll-down-effects
|
||||
animation: scroll-down-effect 1.5s infinite
|
||||
|
||||
@@ -38,24 +38,7 @@
|
||||
margin-top: -.42em
|
||||
|
||||
.card-info-data
|
||||
display: table
|
||||
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
|
||||
margin: 6px 0 -6px
|
||||
@@ -340,6 +323,30 @@
|
||||
&:hover
|
||||
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
|
||||
0%,
|
||||
100%
|
||||
|
||||
@@ -152,6 +152,11 @@ beautify()
|
||||
|
||||
#post
|
||||
.tag_share
|
||||
&:after
|
||||
display: block
|
||||
clear: both
|
||||
content: ''
|
||||
|
||||
.post-meta
|
||||
&__tag-list
|
||||
display: inline-block
|
||||
@@ -174,7 +179,7 @@ beautify()
|
||||
.post_share
|
||||
display: inline-block
|
||||
float: right
|
||||
margin: 8px 0 20px
|
||||
margin: 8px 0 0
|
||||
width: fit-content
|
||||
|
||||
.social-share
|
||||
|
||||
@@ -25,24 +25,8 @@
|
||||
& > .avatar-img
|
||||
margin: 20px auto
|
||||
|
||||
.site-data
|
||||
display: table
|
||||
.sidebar-site-data
|
||||
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
|
||||
margin: 20px auto
|
||||
|
||||
Reference in New Issue
Block a user