mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2026-04-12 22:17:06 +08:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
91bb944931 | ||
|
|
bade41acd7 | ||
|
|
da8ffda39b | ||
|
|
3bf033c9e4 | ||
|
|
bb8e98c68a |
@@ -436,3 +436,9 @@ note:
|
|||||||
lazyload:
|
lazyload:
|
||||||
enable: true
|
enable: true
|
||||||
script: https://cdn.jsdelivr.net/npm/lozad/dist/lozad.min.js
|
script: https://cdn.jsdelivr.net/npm/lozad/dist/lozad.min.js
|
||||||
|
|
||||||
|
# 美化post頁顯示
|
||||||
|
post_beautify:
|
||||||
|
enable: false
|
||||||
|
title-prefix-icon: '\f0c1'
|
||||||
|
title-prefix-icon-color: "#F47466"
|
||||||
@@ -20,7 +20,6 @@ page:
|
|||||||
sticky: Sticky
|
sticky: Sticky
|
||||||
no_title: No title
|
no_title: No title
|
||||||
archives: Archives
|
archives: Archives
|
||||||
read_more: Read more
|
|
||||||
|
|
||||||
post:
|
post:
|
||||||
created: Created
|
created: Created
|
||||||
|
|||||||
@@ -20,7 +20,6 @@ page:
|
|||||||
sticky: Sticky
|
sticky: Sticky
|
||||||
no_title: No title
|
no_title: No title
|
||||||
archives: Archives
|
archives: Archives
|
||||||
read_more: Read more
|
|
||||||
|
|
||||||
post:
|
post:
|
||||||
created: Created
|
created: Created
|
||||||
|
|||||||
@@ -20,7 +20,6 @@ page:
|
|||||||
sticky: 置顶
|
sticky: 置顶
|
||||||
no_title: 无题
|
no_title: 无题
|
||||||
archives: 时间轴
|
archives: 时间轴
|
||||||
read_more: 阅读更多
|
|
||||||
|
|
||||||
post:
|
post:
|
||||||
created: 发表于
|
created: 发表于
|
||||||
|
|||||||
@@ -20,7 +20,6 @@ page:
|
|||||||
sticky: 置頂
|
sticky: 置頂
|
||||||
no_title: 無題
|
no_title: 無題
|
||||||
archives: 時間軸
|
archives: 時間軸
|
||||||
read_more: 閲讀更多
|
|
||||||
|
|
||||||
post:
|
post:
|
||||||
created: 發表於
|
created: 發表於
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ if theme.valine && theme.valine.enable
|
|||||||
#vcomment.vcomment
|
#vcomment.vcomment
|
||||||
script(src='https://cdn.jsdelivr.net/npm/valine/dist/Valine.min.js')
|
script(src='https://cdn.jsdelivr.net/npm/valine/dist/Valine.min.js')
|
||||||
script.
|
script.
|
||||||
var notify = '#{ theme.valine.notify }' == true ? true : false;
|
var notify = #{ theme.valine.notify } == true ? true : false;
|
||||||
var verify = '#{ theme.valine.verify }' == true ? true : false;
|
var verify = #{ theme.valine.verify } == true ? true : false;
|
||||||
var GUEST_INFO = ['nick','mail','link'];
|
var GUEST_INFO = ['nick','mail','link'];
|
||||||
var guest_info = '#{ theme.valine.guest_info }'.split(',').filter(function(item){
|
var guest_info = '#{ theme.valine.guest_info }'.split(',').filter(function(item){
|
||||||
return GUEST_INFO.indexOf(item) > -1
|
return GUEST_INFO.indexOf(item) > -1
|
||||||
|
|||||||
@@ -7,10 +7,33 @@
|
|||||||
.menu-icon-second
|
.menu-icon-second
|
||||||
.menu-icon-third
|
.menu-icon-third
|
||||||
|
|
||||||
|
.menu_mask
|
||||||
|
|
||||||
span.pull-right.menus
|
span.pull-right.menus
|
||||||
.mobile_author_icon
|
.mobile_author_icon
|
||||||
img.lozad(src=theme.avatar || url_for('/img/avatar.png') onerror=`onerror=null;src='${theme.lodding_bg.flink}'`)
|
img.lozad(src=theme.avatar || url_for('/img/avatar.png') onerror=`onerror=null;src='${theme.lodding_bg.flink}'`)
|
||||||
.mobile_author-info__description= config.description
|
.mobile_post_data
|
||||||
|
if site.posts.length
|
||||||
|
.mobile_data_item.text-center
|
||||||
|
.mobile_data_link
|
||||||
|
a(href=url_for(config.archive_dir) + '/')
|
||||||
|
.headline= _p('aside.articles')
|
||||||
|
.length_num= site.posts.length
|
||||||
|
|
||||||
|
if site.tags.length
|
||||||
|
.mobile_data_item.text-center
|
||||||
|
.mobile_data_link
|
||||||
|
a(href=url_for(config.tag_dir) + '/' )
|
||||||
|
.headline= _p('aside.tags')
|
||||||
|
.length_num= site.tags.length
|
||||||
|
|
||||||
|
if site.categories.length
|
||||||
|
.mobile_data_item.text-center
|
||||||
|
.mobile_data_link
|
||||||
|
a(href=url_for(config.category_dir) + '/')
|
||||||
|
.headline= _p('aside.categories')
|
||||||
|
.length_num= site.categories.length
|
||||||
|
|
||||||
hr
|
hr
|
||||||
.menus_item
|
.menus_item
|
||||||
each value, label in theme.menu
|
each value, label in theme.menu
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#post_bottom
|
#post_bottom
|
||||||
#post_bottom_items
|
#post_bottom_items
|
||||||
a#to_comment(href="#post-comment")
|
a#mobile_to_comment(href="#post-comment")
|
||||||
i.scroll_to_comment.fa.fa-comments
|
i.mobile_scroll_to_comment.fa.fa-comments
|
||||||
i#mobile_toc.fa.fa-list
|
i#mobile_toc.fa.fa-list
|
||||||
#toc_mobile
|
#toc_mobile
|
||||||
.toc_mobile_headline= _p('sidebar.catalog')
|
.toc_mobile_headline= _p('sidebar.catalog')
|
||||||
|
|||||||
@@ -62,8 +62,6 @@ each article , index in page.posts.data
|
|||||||
- let expert = content.substring(0, theme.auto_excerpt.length)
|
- let expert = content.substring(0, theme.auto_excerpt.length)
|
||||||
- content.length > theme.auto_excerpt.length ? expert += ' ...' : ''
|
- content.length > theme.auto_excerpt.length ? expert += ' ...' : ''
|
||||||
.content!= expert
|
.content!= expert
|
||||||
.more_setting
|
|
||||||
a.more.more--border.more--primary.more--animated(href=url_for(link) + '#more' style="margin-top: 14px")= _p('read_more')
|
|
||||||
else
|
else
|
||||||
.content!= article.description
|
.content!= article.description
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,7 @@
|
|||||||
section#rightside.rightside
|
section#rightside.rightside
|
||||||
|
if is_post()
|
||||||
|
a#to_comment(href="#post-comment")
|
||||||
|
i.scroll_to_comment.fa.fa-comments
|
||||||
if theme.readmode.enable && is_post()
|
if theme.readmode.enable && is_post()
|
||||||
i#readmode.fa.fa-book(title=_p('rightside.readmode_title'))
|
i#readmode.fa.fa-book(title=_p('rightside.readmode_title'))
|
||||||
i#font_plus.fa.fa-plus(title=_p('rightside.font_plus_title'))
|
i#font_plus.fa.fa-plus(title=_p('rightside.font_plus_title'))
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ block top_img
|
|||||||
block content
|
block content
|
||||||
article#post(class="")
|
article#post(class="")
|
||||||
#post-content.article-container!= page.content
|
#post-content.article-container!= page.content
|
||||||
if (theme.post_copyright && theme.post_copyright.enable)
|
if (theme.post_copyright && theme.post_copyright.enable && page.copyright != false)
|
||||||
.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') + ": "
|
||||||
|
|||||||
6
package.json
Normal file
6
package.json
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"name": "hexo-theme-butterfly",
|
||||||
|
"version": "1.1.0",
|
||||||
|
"description": "A Hexo Theme: Butterfly"
|
||||||
|
|
||||||
|
}
|
||||||
@@ -17,4 +17,4 @@ hexo.extend.filter.register('after_post_render', data => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
data.content = $.html();
|
data.content = $.html();
|
||||||
}, 0);
|
}, 100);
|
||||||
@@ -160,6 +160,10 @@ table
|
|||||||
color: #fff
|
color: #fff
|
||||||
border-color: #fff
|
border-color: #fff
|
||||||
|
|
||||||
|
&:hover
|
||||||
|
background-color: darken($light-blue, 40)
|
||||||
|
|
||||||
|
|
||||||
textarea
|
textarea
|
||||||
font-size: 0.7rem
|
font-size: 0.7rem
|
||||||
background: url(/img/comment_bg.png) 100% 100% no-repeat
|
background: url(/img/comment_bg.png) 100% 100% no-repeat
|
||||||
@@ -181,11 +185,8 @@ table
|
|||||||
.vnum
|
.vnum
|
||||||
font-size: 1.1rem
|
font-size: 1.1rem
|
||||||
|
|
||||||
.vnick
|
|
||||||
font-size: 100%
|
|
||||||
|
|
||||||
.vsys
|
.vsys
|
||||||
font-size: 70%
|
font-size: 80%
|
||||||
|
|
||||||
.vtime
|
.vtime
|
||||||
font-size: .65rem
|
font-size: .65rem
|
||||||
@@ -194,12 +195,18 @@ table
|
|||||||
font-size: 100%
|
font-size: 100%
|
||||||
|
|
||||||
.vat
|
.vat
|
||||||
font-size: .7125rem;
|
font-size: .7125rem
|
||||||
color: $cyan;
|
color: $cyan
|
||||||
border: 1px solid $cyan;
|
border: 1px solid $cyan
|
||||||
padding: 0 .8rem;
|
padding: 0 .8rem
|
||||||
border-radius: 5px;
|
border-radius: 5px
|
||||||
|
|
||||||
|
&:hover
|
||||||
|
background-color: alpha($cyan,0.5)
|
||||||
|
|
||||||
|
code, pre
|
||||||
|
font-size: 98%
|
||||||
|
font-family: $code-font
|
||||||
|
|
||||||
#site-title, #site-sub-title,
|
#site-title, #site-sub-title,
|
||||||
#site-name,
|
#site-name,
|
||||||
@@ -212,12 +219,12 @@ table
|
|||||||
#rightside
|
#rightside
|
||||||
right: -38px
|
right: -38px
|
||||||
position: fixed
|
position: fixed
|
||||||
bottom: 30px
|
bottom: 60px
|
||||||
padding-bottom: 32px
|
|
||||||
opacity: 0
|
opacity: 0
|
||||||
transition: all .2s
|
transition: all .2s
|
||||||
|
|
||||||
#readmode,#font_plus,#font_minus
|
|
||||||
|
#readmode,#font_plus,#font_minus,#to_comment
|
||||||
width: 30px
|
width: 30px
|
||||||
height: 30px
|
height: 30px
|
||||||
background-color: $light-blue
|
background-color: $light-blue
|
||||||
@@ -230,6 +237,9 @@ table
|
|||||||
cursor: pointer
|
cursor: pointer
|
||||||
text-decoration: none
|
text-decoration: none
|
||||||
|
|
||||||
|
#to_comment
|
||||||
|
display: none
|
||||||
|
|
||||||
#font_minus,#font_plus
|
#font_minus,#font_plus
|
||||||
display: none
|
display: none
|
||||||
|
|
||||||
@@ -345,6 +355,9 @@ table
|
|||||||
.is_visible
|
.is_visible
|
||||||
display: block !important
|
display: block !important
|
||||||
|
|
||||||
|
.is_invisible
|
||||||
|
display: none !important
|
||||||
|
|
||||||
.fireworks
|
.fireworks
|
||||||
position: fixed
|
position: fixed
|
||||||
z-index: -1
|
z-index: -1
|
||||||
|
|||||||
@@ -54,7 +54,7 @@
|
|||||||
.headline
|
.headline
|
||||||
display: block
|
display: block
|
||||||
font-size: 0.7rem
|
font-size: 0.7rem
|
||||||
letter-spacing: 1px
|
// letter-spacing: 1px
|
||||||
margin-bottom: -21px
|
margin-bottom: -21px
|
||||||
text-transform: uppercase
|
text-transform: uppercase
|
||||||
color:#4c4948
|
color:#4c4948
|
||||||
|
|||||||
@@ -2,11 +2,8 @@ footer
|
|||||||
margin-top: 1rem
|
margin-top: 1rem
|
||||||
background: $light-blue
|
background: $light-blue
|
||||||
background-attachment: local
|
background-attachment: local
|
||||||
|
background-position: bottom
|
||||||
&.footer-bg
|
background-size: cover
|
||||||
background-position: bottom
|
|
||||||
background-size: cover
|
|
||||||
|
|
||||||
|
|
||||||
#footer
|
#footer
|
||||||
padding: 1.2rem 1rem 1rem
|
padding: 1.2rem 1rem 1rem
|
||||||
|
|||||||
@@ -103,37 +103,60 @@
|
|||||||
-webkit-transform: rotate(-45deg) translate(4px, -4px)
|
-webkit-transform: rotate(-45deg) translate(4px, -4px)
|
||||||
transform: rotate(-45deg) translate(4px, -4px)
|
transform: rotate(-45deg) translate(4px, -4px)
|
||||||
|
|
||||||
|
.menu_mask
|
||||||
|
position: fixed
|
||||||
|
top: 0
|
||||||
|
bottom: 0
|
||||||
|
width: 100%
|
||||||
|
height: 110vh
|
||||||
|
left: 0
|
||||||
|
right: 0
|
||||||
|
background: alpha($black,0.7)
|
||||||
|
display: none
|
||||||
|
|
||||||
.menus
|
.menus
|
||||||
.mobile_author_icon
|
.mobile_author_icon
|
||||||
display: none
|
display: none
|
||||||
padding: 3rem 1.5rem 0
|
padding: 1.3rem 1.5rem 0
|
||||||
text-align: center
|
text-align: center
|
||||||
|
|
||||||
|
|
||||||
img
|
img
|
||||||
height: 120px
|
height: 120px
|
||||||
width: 120px
|
width: 120px
|
||||||
display: inline-block
|
display: inline-block
|
||||||
vertical-align: top
|
vertical-align: top
|
||||||
border-radius: 70px
|
border-radius: 70px
|
||||||
-webkit-transition: all .3s
|
|
||||||
-moz-transition: all .3s
|
|
||||||
-o-transition: all .3s
|
|
||||||
-ms-transition: all .3s
|
|
||||||
transition: all .3s
|
transition: all .3s
|
||||||
|
|
||||||
|
.mobile_post_data
|
||||||
|
display: flex
|
||||||
|
justify-content: center
|
||||||
|
padding: .6rem .5rem 0
|
||||||
|
display: none
|
||||||
|
|
||||||
|
.mobile_data_item
|
||||||
|
flex: 1
|
||||||
|
|
||||||
|
.mobile_data_link
|
||||||
|
a
|
||||||
|
text-decoration: none
|
||||||
|
|
||||||
|
.length_num
|
||||||
|
font-size: .9rem
|
||||||
|
color: #000
|
||||||
|
|
||||||
|
.headline
|
||||||
|
display: block
|
||||||
|
font-size: 0.7rem
|
||||||
|
// letter-spacing: .5px
|
||||||
|
text-transform: uppercase
|
||||||
|
color:#4c4948
|
||||||
|
|
||||||
hr
|
hr
|
||||||
margin: 1rem auto
|
margin: 1rem auto
|
||||||
display: none
|
display: none
|
||||||
|
|
||||||
&.menu_open
|
|
||||||
display: block
|
|
||||||
animation: menu_open .3s
|
|
||||||
|
|
||||||
&.menu_close
|
|
||||||
animation: menu_close .3s
|
|
||||||
display: block
|
|
||||||
|
|
||||||
|
|
||||||
a
|
a
|
||||||
color: $light-grey
|
color: $light-grey
|
||||||
text-decoration: none
|
text-decoration: none
|
||||||
@@ -210,7 +233,6 @@
|
|||||||
font-size: 1.2rem
|
font-size: 1.2rem
|
||||||
|
|
||||||
@media screen and (max-width: $sm)
|
@media screen and (max-width: $sm)
|
||||||
|
|
||||||
#page-header
|
#page-header
|
||||||
padding: 10px 0.8rem
|
padding: 10px 0.8rem
|
||||||
|
|
||||||
@@ -220,41 +242,49 @@
|
|||||||
.menus
|
.menus
|
||||||
position: fixed
|
position: fixed
|
||||||
top: 0
|
top: 0
|
||||||
right: 0
|
right: -250px
|
||||||
width: 100%
|
width: 250px
|
||||||
height 101vh
|
height 101vh
|
||||||
background: $white
|
background: $white
|
||||||
cursor: pointer
|
cursor: pointer
|
||||||
box-shadow: 0 0 4px rgba(0, 0, 0, 0.27)
|
box-shadow: 0 0 4px rgba(0, 0, 0, 0.27)
|
||||||
z-index: -1
|
z-index: 1
|
||||||
overflow: auto
|
overflow-y: scroll
|
||||||
display: none
|
display: none
|
||||||
|
|
||||||
a
|
.mobile_post_data
|
||||||
display: inline-block !important
|
display: flex
|
||||||
opacity: 1 !important
|
|
||||||
// margin-left: 0
|
|
||||||
// padding-top: 0.3rem
|
|
||||||
// padding-bottom: 0.3rem
|
|
||||||
// padding-left: 0.6rem
|
|
||||||
margin: 0
|
|
||||||
padding: .5rem 1rem
|
|
||||||
color: $font-black
|
|
||||||
text-shadow: none
|
|
||||||
font-size: 0.8rem
|
|
||||||
z-index: 0
|
|
||||||
|
|
||||||
|
.menus_item
|
||||||
|
a
|
||||||
|
display: block !important
|
||||||
|
opacity: 1 !important
|
||||||
|
margin: 0
|
||||||
|
padding: .3rem 1.5rem
|
||||||
|
color: $font-black
|
||||||
|
text-shadow: none
|
||||||
|
font-size: 0.8rem
|
||||||
|
z-index: 0
|
||||||
|
text-overflow: ellipsis
|
||||||
|
overflow: hidden
|
||||||
|
white-space: nowrap
|
||||||
|
|
||||||
&:hover
|
i
|
||||||
color: $light-blue
|
width: 30%
|
||||||
|
text-align: left
|
||||||
|
|
||||||
|
span
|
||||||
|
width 70%
|
||||||
|
|
||||||
|
&:hover
|
||||||
|
color: $light-blue
|
||||||
|
|
||||||
.mobile_author_icon
|
.mobile_author_icon
|
||||||
display: block
|
display: block
|
||||||
|
|
||||||
.menus_item
|
.menus_item
|
||||||
padding: 0 .5rem
|
padding: 0 .5rem
|
||||||
margin-bottom: 4rem
|
margin-bottom: 5rem
|
||||||
text-align: center
|
|
||||||
|
|
||||||
hr
|
hr
|
||||||
display: block
|
display: block
|
||||||
@@ -267,5 +297,5 @@
|
|||||||
|
|
||||||
&.fixed.open-sidebar
|
&.fixed.open-sidebar
|
||||||
.search
|
.search
|
||||||
display: inline-block;
|
display: inline-block
|
||||||
opacity: 1;
|
opacity: 1
|
||||||
@@ -39,7 +39,7 @@ if hexo-config("nightshift") && hexo-config("nightshift.enable")
|
|||||||
|
|
||||||
// 評論
|
// 評論
|
||||||
#vcomment
|
#vcomment
|
||||||
*
|
p,a,textarea,.vemoji-btn,.vpreview-btn,input,path,.vcount,.vnum,.vtime,.vsys,.vsys,.vnick
|
||||||
color: #99a9bf !important
|
color: #99a9bf !important
|
||||||
|
|
||||||
.vsys
|
.vsys
|
||||||
@@ -48,6 +48,26 @@ if hexo-config("nightshift") && hexo-config("nightshift.enable")
|
|||||||
.vbtn
|
.vbtn
|
||||||
background: rgb(45, 48, 53) !important
|
background: rgb(45, 48, 53) !important
|
||||||
color: #99a9bf !important
|
color: #99a9bf !important
|
||||||
|
border: 1px solid #99a9bf
|
||||||
|
|
||||||
|
.vwrap
|
||||||
|
border: 1px solid #99a9bf
|
||||||
|
|
||||||
|
input
|
||||||
|
border-bottom: 1px dashed #616a6b
|
||||||
|
|
||||||
|
.vh
|
||||||
|
border-bottom: 1px dashed #616a6b
|
||||||
|
|
||||||
|
pre
|
||||||
|
background-color: #2d3035
|
||||||
|
border: 1px solid #99a9bf
|
||||||
|
|
||||||
|
.vcontent.expand:before
|
||||||
|
background: linear-gradient(180deg,hsla(0, 0%, 0%, 0),hsl(218, 8%, 19%))
|
||||||
|
|
||||||
|
.vcontent.expand:after
|
||||||
|
background: hsla(204, 5%, 22%, 1)
|
||||||
|
|
||||||
.recent-post-item .article-title
|
.recent-post-item .article-title
|
||||||
color: #99a9bf
|
color: #99a9bf
|
||||||
@@ -126,7 +146,8 @@ if hexo-config("nightshift") && hexo-config("nightshift.enable")
|
|||||||
|
|
||||||
.translate_chn_to_cht,
|
.translate_chn_to_cht,
|
||||||
.nightshift,
|
.nightshift,
|
||||||
#readmode
|
#readmode,
|
||||||
|
#to_comment
|
||||||
background-color: #2d3035 !important
|
background-color: #2d3035 !important
|
||||||
|
|
||||||
img
|
img
|
||||||
@@ -199,8 +220,6 @@ if hexo-config("nightshift") && hexo-config("nightshift.enable")
|
|||||||
&::-webkit-scrollbar-thumb
|
&::-webkit-scrollbar-thumb
|
||||||
background: lighten(#2d3035,5)
|
background: lighten(#2d3035,5)
|
||||||
|
|
||||||
.more
|
|
||||||
background-color: #616a6b
|
|
||||||
|
|
||||||
#post_bottom
|
#post_bottom
|
||||||
background: #2d3035
|
background: #2d3035
|
||||||
@@ -223,6 +242,12 @@ if hexo-config("nightshift") && hexo-config("nightshift.enable")
|
|||||||
#page-header
|
#page-header
|
||||||
.menus
|
.menus
|
||||||
background: #2d3035
|
background: #2d3035
|
||||||
|
|
||||||
|
.headline
|
||||||
|
color: #99a9bf !important
|
||||||
|
|
||||||
|
.length_num
|
||||||
|
color: darken(#99a9bf,10) !important
|
||||||
a
|
a
|
||||||
color: #99a9bf !important
|
color: #99a9bf !important
|
||||||
.menu-icon-first,
|
.menu-icon-first,
|
||||||
|
|||||||
@@ -105,24 +105,6 @@ galleryItemStyle(w, h)
|
|||||||
time
|
time
|
||||||
color: $grey
|
color: $grey
|
||||||
|
|
||||||
.more_setting
|
|
||||||
display: none
|
|
||||||
|
|
||||||
.more
|
|
||||||
display: inline-block
|
|
||||||
padding: 0 1rem
|
|
||||||
height: h = 1.6rem
|
|
||||||
// background: $light-blue
|
|
||||||
// color: $white
|
|
||||||
text-align: center
|
|
||||||
text-decoration: none
|
|
||||||
line-height: h
|
|
||||||
cursor: pointer
|
|
||||||
// transition: all 0.2s ease-in-out
|
|
||||||
|
|
||||||
// &:hover
|
|
||||||
// background: $ruby
|
|
||||||
|
|
||||||
.article-title
|
.article-title
|
||||||
margin-bottom: 0.3rem
|
margin-bottom: 0.3rem
|
||||||
color: $black
|
color: $black
|
||||||
|
|||||||
@@ -1,3 +1,18 @@
|
|||||||
|
if hexo-config("post_beautify.enable")
|
||||||
|
headStyle(fontsize)
|
||||||
|
padding-left: unit(fontsize + 0.3, "rem")
|
||||||
|
|
||||||
|
code
|
||||||
|
font-size: unit(fontsize, "rem")
|
||||||
|
|
||||||
|
&:before
|
||||||
|
top: calc(50% - unit(fontsize / 2 - 0.05, "rem"))
|
||||||
|
font-size: unit(fontsize, "rem")
|
||||||
|
|
||||||
|
&:hover
|
||||||
|
padding-left: unit(fontsize + 0.2, "rem")
|
||||||
|
|
||||||
|
|
||||||
#post-title
|
#post-title
|
||||||
font-size: 1.4rem
|
font-size: 1.4rem
|
||||||
|
|
||||||
@@ -100,22 +115,130 @@
|
|||||||
#post-content
|
#post-content
|
||||||
margin-bottom: 1rem
|
margin-bottom: 1rem
|
||||||
|
|
||||||
ol,
|
if hexo-config("post_beautify.enable")
|
||||||
ul
|
h1,
|
||||||
margin-top: 0.4rem
|
h2,
|
||||||
counter-reset: li
|
h3,
|
||||||
|
h4,
|
||||||
|
h5,
|
||||||
|
h6
|
||||||
|
cursor: pointer
|
||||||
|
transition: all 0.2s ease-out
|
||||||
|
|
||||||
p
|
&:before
|
||||||
margin: 0
|
position: absolute
|
||||||
|
top: calc(50% - 0.35rem)
|
||||||
|
left: 0
|
||||||
|
color: $title-prefix-icon-color
|
||||||
|
content: $title-prefix-icon
|
||||||
|
font: normal normal normal 14px / 1 FontAwesome
|
||||||
|
font-size: 0.8rem
|
||||||
|
transition: all 0.2s ease-out
|
||||||
|
|
||||||
|
&:hover
|
||||||
|
padding-left: 1.1rem
|
||||||
|
|
||||||
|
&:before
|
||||||
|
color: $light-blue
|
||||||
|
|
||||||
|
h1
|
||||||
|
headStyle(1)
|
||||||
|
|
||||||
|
h2
|
||||||
|
headStyle(0.9)
|
||||||
|
|
||||||
|
h3
|
||||||
|
headStyle(0.8)
|
||||||
|
|
||||||
|
h4
|
||||||
|
headStyle(0.7)
|
||||||
|
|
||||||
|
h5
|
||||||
|
headStyle(0.6)
|
||||||
|
|
||||||
|
h6
|
||||||
|
headStyle(0.6)
|
||||||
|
|
||||||
ol,
|
ol,
|
||||||
ul
|
ul
|
||||||
padding-left: 0.5rem
|
margin-top: 0.4rem
|
||||||
|
padding: 0 0 0 0.8rem
|
||||||
|
list-style: none
|
||||||
|
counter-reset: li
|
||||||
|
|
||||||
li
|
p
|
||||||
position: relative
|
margin: 0
|
||||||
margin: 0.3rem 0
|
|
||||||
padding-left: 0.3rem
|
ol,
|
||||||
|
ul
|
||||||
|
padding-left: 0.5rem
|
||||||
|
|
||||||
|
li
|
||||||
|
position: relative
|
||||||
|
margin: 0.2rem 0
|
||||||
|
padding: 0.1rem 0.5rem 0.1rem 1.5rem
|
||||||
|
|
||||||
|
&:hover
|
||||||
|
&:before
|
||||||
|
transform: rotate(360deg)
|
||||||
|
|
||||||
|
&:before
|
||||||
|
position: absolute
|
||||||
|
top: 0
|
||||||
|
left: 0
|
||||||
|
background: $light-blue
|
||||||
|
color: $white
|
||||||
|
cursor: pointer
|
||||||
|
transition: all 0.3s ease-out
|
||||||
|
|
||||||
|
ol
|
||||||
|
> li
|
||||||
|
&:before
|
||||||
|
margin-top: 0.2rem
|
||||||
|
width: w = 1.2rem
|
||||||
|
height: h = w
|
||||||
|
border-radius: 0.5 * w
|
||||||
|
content: counter(li)
|
||||||
|
counter-increment: li
|
||||||
|
text-align: center
|
||||||
|
font-size: 0.6rem
|
||||||
|
line-height: h
|
||||||
|
|
||||||
|
ul
|
||||||
|
> li
|
||||||
|
&:hover
|
||||||
|
&:before
|
||||||
|
border-color: $ruby
|
||||||
|
|
||||||
|
&:before
|
||||||
|
$w = 0.3rem
|
||||||
|
top: 10px
|
||||||
|
margin-left: 0.45rem
|
||||||
|
width: w = $w
|
||||||
|
height: h = w
|
||||||
|
border: 0.5 * w solid $light-blue
|
||||||
|
border-radius: w
|
||||||
|
background: $white
|
||||||
|
content: ""
|
||||||
|
line-height: h
|
||||||
|
|
||||||
|
else
|
||||||
|
ol,
|
||||||
|
ul
|
||||||
|
margin-top: 0.4rem
|
||||||
|
counter-reset: li
|
||||||
|
|
||||||
|
p
|
||||||
|
margin: 0
|
||||||
|
|
||||||
|
ol,
|
||||||
|
ul
|
||||||
|
padding-left: 0.5rem
|
||||||
|
|
||||||
|
li
|
||||||
|
position: relative
|
||||||
|
margin: 0.3rem 0
|
||||||
|
padding-left: 0.3rem
|
||||||
|
|
||||||
a
|
a
|
||||||
color: $a-link-color
|
color: $a-link-color
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
&.toc_mobile_show
|
&.toc_mobile_show
|
||||||
bottom: 0
|
bottom: 0
|
||||||
|
|
||||||
#to_comment,#mobile_toc
|
#mobile_to_comment,#mobile_toc
|
||||||
width: 50%
|
width: 50%
|
||||||
text-align: center
|
text-align: center
|
||||||
font-size: 18px
|
font-size: 18px
|
||||||
|
|||||||
@@ -71,53 +71,6 @@ a.article-meta__categories
|
|||||||
overflow: hidden
|
overflow: hidden
|
||||||
height: 90px
|
height: 90px
|
||||||
|
|
||||||
.more {
|
|
||||||
position: relative
|
|
||||||
letter-spacing: 1.2px
|
|
||||||
text-transform: uppercase
|
|
||||||
overflow: hidden
|
|
||||||
z-index: 1
|
|
||||||
background-color: $light-blue
|
|
||||||
|
|
||||||
&:focus {
|
|
||||||
outline: none
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.more--primary {
|
|
||||||
color: $white
|
|
||||||
}
|
|
||||||
|
|
||||||
.more--animated {
|
|
||||||
transition-property: color
|
|
||||||
transition-duration: 0.5s
|
|
||||||
|
|
||||||
&:before {
|
|
||||||
content: ""
|
|
||||||
position: absolute
|
|
||||||
top: 0
|
|
||||||
left: 0
|
|
||||||
right: 0
|
|
||||||
bottom: 0
|
|
||||||
background: $ruby
|
|
||||||
transform: scaleX(0)
|
|
||||||
transform-origin: 0 50%
|
|
||||||
transition-property: transform
|
|
||||||
transition-duration: 0.5s
|
|
||||||
transition-timing-function: ease-out
|
|
||||||
z-index: -1
|
|
||||||
}
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
color: white
|
|
||||||
|
|
||||||
&:before {
|
|
||||||
transform: scaleX(1)
|
|
||||||
transition-timing-function: cubic-bezier(0.45, 1.64, 0.47, 0.66)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.layout_page
|
.layout_page
|
||||||
display: flex
|
display: flex
|
||||||
margin: 0 auto
|
margin: 0 auto
|
||||||
@@ -221,9 +174,6 @@ a.article-meta__categories
|
|||||||
#recent-posts #pagination
|
#recent-posts #pagination
|
||||||
margin-bottom: 0
|
margin-bottom: 0
|
||||||
|
|
||||||
.more_setting
|
|
||||||
display: block !important
|
|
||||||
|
|
||||||
#nav #site-social-icons
|
#nav #site-social-icons
|
||||||
display: block
|
display: block
|
||||||
|
|
||||||
@@ -337,25 +287,3 @@ footer
|
|||||||
50%{transform:scale(1)}
|
50%{transform:scale(1)}
|
||||||
80%{transform:scale(.98)}
|
80%{transform:scale(.98)}
|
||||||
100%{transform:scale(1)}}
|
100%{transform:scale(1)}}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@keyframes menu_open{
|
|
||||||
0% {
|
|
||||||
transform: scale(0)
|
|
||||||
}
|
|
||||||
100% {
|
|
||||||
transform: scale(1)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes menu_close{
|
|
||||||
0% {
|
|
||||||
transform: scale(1)
|
|
||||||
display: block
|
|
||||||
}
|
|
||||||
100% {
|
|
||||||
transform: scale(0)
|
|
||||||
display: none
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -13,6 +13,8 @@ $site-name-font = "Titillium Web", Lato,PingFang SC, Hiragino Sans GB, "Microsof
|
|||||||
//hr icon
|
//hr icon
|
||||||
$hr-icon = '\f0c4'
|
$hr-icon = '\f0c4'
|
||||||
$hr-icon-top = -10px
|
$hr-icon-top = -10px
|
||||||
|
$title-prefix-icon = '\f0c1'
|
||||||
|
$title-prefix-icon-color = #F47466
|
||||||
|
|
||||||
if hexo-config("theme_color") && hexo-config("theme_color.enable")
|
if hexo-config("theme_color") && hexo-config("theme_color.enable")
|
||||||
$theme-color = convert(hexo-config("theme_color.main")) || #49B1F5
|
$theme-color = convert(hexo-config("theme_color.main")) || #49B1F5
|
||||||
@@ -36,6 +38,10 @@ if hexo-config("hr") && hexo-config("hr.enable")
|
|||||||
$hr-icon = hexo-config("hr.icon") || '\f0c4'
|
$hr-icon = hexo-config("hr.icon") || '\f0c4'
|
||||||
$hr-icon-top = convert(hexo-config("hr.icon-top")) || -10px
|
$hr-icon-top = convert(hexo-config("hr.icon-top")) || -10px
|
||||||
|
|
||||||
|
if hexo-config("post_beautify.enable")
|
||||||
|
$title-prefix-icon = hexo-config("post_beautify.title-prefix-icon") || '\f0c1'
|
||||||
|
$title-prefix-icon-color= convert(hexo-config("post_beautify.title-prefix-icon-color")) || #F47466
|
||||||
|
|
||||||
|
|
||||||
// Global Variables
|
// Global Variables
|
||||||
$font-size = 14px
|
$font-size = 14px
|
||||||
|
|||||||
@@ -82,7 +82,8 @@ $(function () {
|
|||||||
// 首页fullpage添加
|
// 首页fullpage添加
|
||||||
// 添加class
|
// 添加class
|
||||||
if (/Android|webOS|iPhone|iPod|iPad|BlackBerry/i.test(navigator.userAgent)) { } else {
|
if (/Android|webOS|iPhone|iPod|iPad|BlackBerry/i.test(navigator.userAgent)) { } else {
|
||||||
$('.full_page').css('background-attachment', 'fixed')
|
$('.full_page').css('background-attachment', 'fixed');
|
||||||
|
$('#to_comment').css("display", "block")
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------
|
||||||
@@ -267,81 +268,42 @@ $(function () {
|
|||||||
//---------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------
|
||||||
/** head点击*/
|
/** head点击*/
|
||||||
$('.toggle-menu').on('click', function () {
|
$('.toggle-menu').on('click', function () {
|
||||||
|
|
||||||
if ($(".toggle-menu").hasClass("open")) {
|
if ($(".toggle-menu").hasClass("open")) {
|
||||||
$(".toggle-menu").removeClass("open").addClass("close");
|
$(".toggle-menu").removeClass("open").addClass("close");
|
||||||
$("#page-header #site-name,#page-header .search").css({ 'color': '#3b3a3a', 'text-shadow': 'none' })
|
|
||||||
$(".toggle-menu *").css({ 'background-color': '#3b3a3a', 'text-shadow': 'none' });
|
|
||||||
$('body').addClass("is_hidden");
|
$('body').addClass("is_hidden");
|
||||||
$('.menus').addClass("menu_open");
|
$('.menus').animate({
|
||||||
fixbg_menu();
|
right: 0
|
||||||
} else {
|
}, 300 )
|
||||||
$(".toggle-menu").removeClass("close").addClass("open");
|
$('.menu_mask,.menus').css("display","block")
|
||||||
$("#page-header #site-name,#page-header .search").css({ 'color': '', 'text-shadow': '' });
|
|
||||||
$(".toggle-menu *").css({ 'background-color': '', 'text-shadow': '' });
|
|
||||||
$('body').removeClass("is_hidden");
|
|
||||||
$('.menus').removeClass("menu_open").addClass('menu_close');
|
|
||||||
setTimeout(function () {
|
|
||||||
$('.menus').removeClass("menu_close")
|
|
||||||
|
|
||||||
}, 300)
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
function fixbg_menu() {
|
$('.menu_mask ').on('click touchstart', function () {
|
||||||
const fixScroll = (scrollEl) => {
|
$(".toggle-menu").removeClass("close").addClass("open");
|
||||||
let startY
|
$('body').removeClass("is_hidden");
|
||||||
scrollEl.addEventListener('touchstart', function (event) {
|
$('.menus').animate({
|
||||||
// 如果多於1根手指點擊屏幕,則不處理
|
right: -250
|
||||||
if (event.targetTouches.length > 1) {
|
}, 300,function () {
|
||||||
return
|
{$('.menus').css({ 'display': ''})
|
||||||
}
|
|
||||||
// 儲存手指的初始位置
|
|
||||||
startY = event.targetTouches[0].clientY
|
|
||||||
}, false)
|
|
||||||
scrollEl.addEventListener('touchmove', function (event) {
|
|
||||||
if (event.targetTouches.length > 1) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
// 判斷手指滑動方向, y大於0時向下滑動, 小於0時向上滑動
|
|
||||||
const y = event.targetTouches[0].clientY - startY
|
|
||||||
// 如果到頂時繼續向下拉
|
|
||||||
if (scrollEl.scrollTop <= 0 && y > 0) {
|
|
||||||
// 重置滾動距離為最小值
|
|
||||||
scrollEl.scrollTop = 0
|
|
||||||
// 阻止滾動
|
|
||||||
event.preventDefault()
|
|
||||||
}
|
|
||||||
// 如果到底時繼續上滑
|
|
||||||
const maxScrollTop = scrollEl.scrollHeight - scrollEl.clientHeight
|
|
||||||
if (maxScrollTop - scrollEl.scrollTop <= 0 && y < 0) {
|
|
||||||
scrollEl.scrollTop = maxScrollTop
|
|
||||||
event.preventDefault()
|
|
||||||
}
|
|
||||||
}, {
|
|
||||||
passive: false
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
const scrollEl = document.querySelector(".menus");
|
})
|
||||||
fixScroll(scrollEl)
|
$('.menu_mask').css("display","")
|
||||||
}
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$(window).on('resize', function (e) {
|
$(window).on('resize', function (e) {
|
||||||
if (!$('.toggle-menu').is(':visible')) {
|
if (!$('.toggle-menu').is(':visible')) {
|
||||||
if ($(".toggle-menu").hasClass("close")) {
|
if ($(".toggle-menu").hasClass("close")) {
|
||||||
$(".toggle-menu").removeClass("close").addClass("open");
|
$(".toggle-menu").removeClass("close").addClass("open");
|
||||||
$("#page-header #site-name,#page-header .search").css({ 'color': '', 'text-shadow': '' });
|
|
||||||
$(".toggle-menu *").css({ 'background-color': '', 'text-shadow': '' });
|
|
||||||
$('body').removeClass("is_hidden");
|
$('body').removeClass("is_hidden");
|
||||||
$('.menus').removeClass("menu_open");
|
$('.menus').animate({
|
||||||
}
|
right: -250
|
||||||
|
}, 300)
|
||||||
|
$('.menu_mask').css("display","")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} )
|
} )
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------
|
||||||
/** scroll 滚动 toc*/
|
/** scroll 滚动 toc*/
|
||||||
var initTop = 0
|
var initTop = 0
|
||||||
@@ -418,12 +380,12 @@ $(function () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ( $(window).width() <= 768 && $('#post_bottom').hasClass('toc_mobile_show') ){
|
if ( $(window).width() <= 768 && $('#post_bottom').hasClass('toc_mobile_show') ){
|
||||||
$('#rightside,#go-up').css('bottom', '80px')
|
$('#rightside').css('bottom', '110px')
|
||||||
$('#rightside,#go-up').css('bottom', '70px')
|
$('#go-up').css('bottom', '70px')
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
$('#rightside,#go-up').css('bottom', '30px')
|
$('#rightside').css('bottom', '60px')
|
||||||
$('#rightside,#go-up').css('bottom', '20px')
|
$('#go-up').css('bottom', '20px')
|
||||||
}
|
}
|
||||||
|
|
||||||
}, 50, 100))
|
}, 50, 100))
|
||||||
@@ -554,14 +516,17 @@ $(function () {
|
|||||||
//閲讀模式
|
//閲讀模式
|
||||||
$("#readmode").click(function () {
|
$("#readmode").click(function () {
|
||||||
|
|
||||||
|
|
||||||
if (Cookies.get("night-mode") == "night") {
|
if (Cookies.get("night-mode") == "night") {
|
||||||
$('body').toggleClass('night-mode');
|
$('body').toggleClass('night-mode');
|
||||||
$('body').toggleClass('read-mode');
|
$('body').toggleClass('read-mode');
|
||||||
$('#font_plus,#font_minus').toggleClass('is_visible');
|
$('#font_plus,#font_minus,#to_comment').toggleClass('is_visible');
|
||||||
|
$('#to_comment').toggleClass('is_invisible');
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
$('body').toggleClass('read-mode');
|
$('body').toggleClass('read-mode');
|
||||||
$('#font_plus,#font_minus').toggleClass('is_visible');
|
$('#font_plus,#font_minus,#to_comment').toggleClass('is_visible');
|
||||||
|
$('#to_comment').toggleClass('is_invisible');
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
@@ -570,12 +535,20 @@ $(function () {
|
|||||||
//閲讀模式下字體調整
|
//閲讀模式下字體調整
|
||||||
$("#font_plus").click(function () {
|
$("#font_plus").click(function () {
|
||||||
var font_size_record = parseFloat($('body').css('font-size'))
|
var font_size_record = parseFloat($('body').css('font-size'))
|
||||||
|
var code_size_record = parseFloat($('pre').css('font-size'))
|
||||||
|
var code_size_record = parseFloat($('code').css('font-size'))
|
||||||
$('body').css('font-size', font_size_record + 1)
|
$('body').css('font-size', font_size_record + 1)
|
||||||
|
$('pre').css('font-size', font_size_record + 1)
|
||||||
|
$('code').css('font-size', font_size_record + 1)
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#font_minus").click(function () {
|
$("#font_minus").click(function () {
|
||||||
var font_size_record = parseFloat($('body').css('font-size'))
|
var font_size_record = parseFloat($('body').css('font-size'))
|
||||||
|
var code_size_record = parseFloat($('pre').css('font-size'))
|
||||||
|
var code_size_record = parseFloat($('code').css('font-size'))
|
||||||
$('body').css('font-size', font_size_record - 1)
|
$('body').css('font-size', font_size_record - 1)
|
||||||
|
$('pre').css('font-size', font_size_record - 1)
|
||||||
|
$('code').css('font-size', font_size_record - 1)
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user