mirror of
https://github.com/next-theme/hexo-theme-next.git
synced 2026-01-17 18:22:33 +00:00
New mixin toggle-arrow & toggle-close
This commit is contained in:
parent
1d2f0570b4
commit
6b9b175d2a
@ -610,7 +610,7 @@ valine:
|
|||||||
appKey: # Your leancloud application appkey
|
appKey: # Your leancloud application appkey
|
||||||
placeholder: Just go go # Comment box placeholder
|
placeholder: Just go go # Comment box placeholder
|
||||||
avatar: mm # Gravatar style
|
avatar: mm # Gravatar style
|
||||||
meta: [nick, mail, link] # Custom comment header
|
meta: [] # Custom comment header: [nick, mail, link]
|
||||||
pageSize: 10 # Pagination size
|
pageSize: 10 # Pagination size
|
||||||
language: # Language, available values: en, zh-cn
|
language: # Language, available values: en, zh-cn
|
||||||
visitor: false # Article reading statistic
|
visitor: false # Article reading statistic
|
||||||
@ -618,7 +618,7 @@ valine:
|
|||||||
recordIP: false # Whether to record the commenter IP
|
recordIP: false # Whether to record the commenter IP
|
||||||
serverURLs: # When the custom domain name is enabled, fill it in here (it will be detected automatically by default, no need to fill in)
|
serverURLs: # When the custom domain name is enabled, fill it in here (it will be detected automatically by default, no need to fill in)
|
||||||
enableQQ: false # Whether to enable the Nickname box to automatically get QQ Nickname and QQ Avatar
|
enableQQ: false # Whether to enable the Nickname box to automatically get QQ Nickname and QQ Avatar
|
||||||
requiredFields: [] # Set required fields: ['nick'] | ['nick','mail']
|
requiredFields: [] # Set required fields: [nick] | [nick, mail]
|
||||||
#post_meta_order: 0
|
#post_meta_order: 0
|
||||||
|
|
||||||
# LiveRe comments system
|
# LiveRe comments system
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
.posts-collapse {
|
.posts-collapse {
|
||||||
|
margin-bottom: $posts-collapse-margin;
|
||||||
margin-left: $posts-collapse-margin;
|
margin-left: $posts-collapse-margin;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
@ -40,7 +41,7 @@
|
|||||||
|
|
||||||
.collection-header {
|
.collection-header {
|
||||||
display: block;
|
display: block;
|
||||||
margin: 0 0 0 20px;
|
margin-left: 20px;
|
||||||
|
|
||||||
small {
|
small {
|
||||||
color: $grey;
|
color: $grey;
|
||||||
@ -101,6 +102,7 @@
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
margin-left: -2px;
|
margin-left: -2px;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
// 1.25em is inaccurate when .collection-title has line breaks on mobile
|
||||||
top: 1.25em;
|
top: 1.25em;
|
||||||
width: 4px;
|
width: 4px;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -10,10 +10,16 @@
|
|||||||
background: $sidebar-highlight;
|
background: $sidebar-highlight;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Fix issue #75
|
||||||
|
// @extends does not seem to work inside @media
|
||||||
|
// So we use a mixin here
|
||||||
|
// https://github.com/stylus/stylus/issues/609
|
||||||
|
@media (any-hover: hover) {
|
||||||
body:not(.sidebar-active) .sidebar-toggle:hover {
|
body:not(.sidebar-active) .sidebar-toggle:hover {
|
||||||
@extend .toggle.toggle-arrow;
|
toggle-arrow(hexo-config('sidebar.position'));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.sidebar-active .sidebar-toggle {
|
.sidebar-active .sidebar-toggle {
|
||||||
@extend .toggle.toggle-close;
|
toggle-close(hexo-config('sidebar.position'));
|
||||||
}
|
}
|
||||||
|
|||||||
@ -17,75 +17,10 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hexo-config('sidebar.position') == 'right') {
|
|
||||||
.toggle.toggle-arrow {
|
.toggle.toggle-arrow {
|
||||||
.toggle-line:first-child {
|
toggle-arrow(hexo-config('sidebar.position'));
|
||||||
top: 2px;
|
|
||||||
transform: rotate(-45deg);
|
|
||||||
width: 50%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.toggle-line:nth-child(2) {
|
|
||||||
width: 90%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.toggle-line:last-child {
|
|
||||||
top: -2px;
|
|
||||||
transform: rotate(45deg);
|
|
||||||
width: 50%;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.toggle.toggle-close {
|
.toggle.toggle-close {
|
||||||
.toggle-line:first-child {
|
toggle-close(hexo-config('sidebar.position'));
|
||||||
top: 5px;
|
|
||||||
transform: rotate(-45deg);
|
|
||||||
}
|
|
||||||
|
|
||||||
.toggle-line:nth-child(2) {
|
|
||||||
opacity: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.toggle-line:last-child {
|
|
||||||
top: -5px;
|
|
||||||
transform: rotate(45deg);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
.toggle.toggle-arrow {
|
|
||||||
.toggle-line:first-child {
|
|
||||||
left: 50%;
|
|
||||||
top: 2px;
|
|
||||||
transform: rotate(45deg);
|
|
||||||
width: 50%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.toggle-line:nth-child(2) {
|
|
||||||
left: 2px;
|
|
||||||
width: 90%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.toggle-line:last-child {
|
|
||||||
left: 50%;
|
|
||||||
top: -2px;
|
|
||||||
transform: rotate(-45deg);
|
|
||||||
width: 50%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.toggle.toggle-close {
|
|
||||||
.toggle-line:first-child {
|
|
||||||
transform: rotate(-45deg);
|
|
||||||
top: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.toggle-line:nth-child(2) {
|
|
||||||
opacity: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.toggle-line:last-child {
|
|
||||||
transform: rotate(45deg);
|
|
||||||
top: -5px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -149,3 +149,61 @@ round-icon($diameter) {
|
|||||||
height: $diameter;
|
height: $diameter;
|
||||||
width: $diameter;
|
width: $diameter;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
toggle-arrow($position) {
|
||||||
|
if ($position == 'right') {
|
||||||
|
.toggle-line:first-child {
|
||||||
|
top: 2px;
|
||||||
|
transform: rotate(-45deg);
|
||||||
|
width: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.toggle-line:last-child {
|
||||||
|
top: -2px;
|
||||||
|
transform: rotate(45deg);
|
||||||
|
width: 50%;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
.toggle-line:first-child {
|
||||||
|
left: 50%;
|
||||||
|
top: 2px;
|
||||||
|
transform: rotate(45deg);
|
||||||
|
width: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.toggle-line:last-child {
|
||||||
|
left: 50%;
|
||||||
|
top: -2px;
|
||||||
|
transform: rotate(-45deg);
|
||||||
|
width: 50%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
toggle-close($position) {
|
||||||
|
.toggle-line:nth-child(2) {
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($position == 'right') {
|
||||||
|
.toggle-line:first-child {
|
||||||
|
top: 5px;
|
||||||
|
transform: rotate(-45deg);
|
||||||
|
}
|
||||||
|
|
||||||
|
.toggle-line:last-child {
|
||||||
|
top: -5px;
|
||||||
|
transform: rotate(45deg);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
.toggle-line:first-child {
|
||||||
|
top: 5px;
|
||||||
|
transform: rotate(45deg);
|
||||||
|
}
|
||||||
|
|
||||||
|
.toggle-line:last-child {
|
||||||
|
top: -5px;
|
||||||
|
transform: rotate(-45deg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user