Skip to content

Commit

Permalink
Fixed b2t to work on all schemes.
Browse files Browse the repository at this point in the history
  • Loading branch information
ivan-nginx committed Dec 30, 2018
1 parent 912595f commit e04ca9a
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ sidebar:

# Sidebar offset from top menubar in pixels (only for Pisces | Gemini).
offset: 12
# Back to top in sidebar (only for Pisces | Gemini).
# Back to top in sidebar.
b2t: false
# Scroll percent label in b2t button.
scrollpercent: false
Expand Down
2 changes: 1 addition & 1 deletion source/css/_common/components/back-to-top-sidebar.styl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.back-to-top {
visibility: hidden;
margin: (20px - $sidebar-offset) -10px -20px;
background: $body-bg-color;
background: $b2t-bg-color;
font-size: $b2t-font-size;
opacity: $b2t-opacity;
cursor: pointer;
Expand Down
3 changes: 3 additions & 0 deletions source/css/_variables/Gemini.styl
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,6 @@ $border-radius-inner = initial
$border-radius = initial
//$border-radius-inner = 0 0 3px 3px;
//$border-radius = 3px;

// Back to top
$b2t-bg-color = $body-bg-color
2 changes: 1 addition & 1 deletion source/css/_variables/Pisces.styl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
// --------------------------------------------------
$body-bg-color = #f5f7f9

$sidebar-offset = unit(hexo-config('sidebar.offset'), px) if hexo-config('sidebar.offset') is a 'unit'
$sidebar-width = hexo-config('sidebar.width') is a 'unit' ? hexo-config('sidebar.width') : 240
$sidebar-desktop = unit($sidebar-width, 'px')
$content-wrap = 'calc(100% - %s)' % unit($sidebar-width + $sidebar-offset, 'px')
Expand Down Expand Up @@ -77,3 +76,4 @@ $btn-default-hover-bg = $black-deep
$b2t-opacity = .6
$b2t-position-bottom = -100px
$b2t-position-bottom-on = 30px
$b2t-bg-color = $body-bg-color
1 change: 1 addition & 0 deletions source/css/_variables/base.styl
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,7 @@ $posts-collapse-left-mobile = 5px
// Sidebar
// Variables for sidebar section elements.
// --------------------------------------------------
$sidebar-offset = unit(hexo-config('sidebar.offset'), px) if hexo-config('sidebar.offset') is a 'unit'
$sidebar-nav-color = $black-light
$sidebar-nav-hover-color = $whitesmoke
$sidebar-highlight = $blue-bright
Expand Down

0 comments on commit e04ca9a

Please sign in to comment.