Skip to content

Commit

Permalink
New startAt option in reading progess bar
Browse files Browse the repository at this point in the history
  • Loading branch information
PaperStrike committed Mar 11, 2021
1 parent dfcbe6e commit 0839bc8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,8 @@ back2top:
# Reading progress bar
reading_progress:
enable: false
# Available values: left | right
startAt: left
# Available values: top | bottom
position: top
reversed: false
Expand Down
7 changes: 6 additions & 1 deletion source/css/_common/components/reading-progress.styl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
--progress: 0;
background: unquote(hexo-config('reading_progress.color'));
height: unquote(hexo-config('reading_progress.height'));
left: 0;
position: fixed;
z-index: $zindex-5;

Expand All @@ -12,6 +11,12 @@
width: var(--progress);
}

if (hexo-config('reading_progress.startAt') == 'right') {
right: 0;
} else {
left: 0;
}

if (hexo-config('reading_progress.position') == 'bottom') {
bottom: 0;
} else {
Expand Down

0 comments on commit 0839bc8

Please sign in to comment.