Skip to content

Commit

Permalink
Makes the page width configrable.
Browse files Browse the repository at this point in the history
Resolves sighingnow#30.

Signed-off-by: Tao He <sighingnow@gmail.com>
  • Loading branch information
sighingnow committed May 14, 2022
1 parent 9484194 commit 3685e76
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
2 changes: 2 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ collections:
output: true
permalink: /:collection/:path/

page_width: 800px

destination: ./_site
incremental: false
regenerate: true
Expand Down
11 changes: 11 additions & 0 deletions gitbook/custom.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
---
---

.book-body {
overflow-y: scroll;
}
Expand Down Expand Up @@ -45,6 +48,14 @@
background: #1c1f2b;
}

.page-inner {
max-width: {{ site.page_width }};
}

.back-to-top {
right: calc((100% - 300px - min(100% - 300px, {{ site.page_width }})) / 2 + 25px);
}

/* scrollbar */
::-webkit-scrollbar {
width: 5px;
Expand Down

0 comments on commit 3685e76

Please sign in to comment.