From 10dcf050d66b3a8c416fe93685fa4c116e8fec91 Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Tue, 12 Jun 2018 17:58:38 -0700 Subject: [PATCH] Tweak docs styling, add serve-docs script --- docs/_layouts/default.html | 2 +- docs/assets/css/style.scss | 4 ++-- script/serve-docs | 4 ++++ 3 files changed, 7 insertions(+), 3 deletions(-) create mode 100755 script/serve-docs diff --git a/docs/_layouts/default.html b/docs/_layouts/default.html index 3e5c82ae..ff4cc6f3 100644 --- a/docs/_layouts/default.html +++ b/docs/_layouts/default.html @@ -113,7 +113,7 @@ ); }); - if (document.body.scrollHeight > window.innerHeight) { + if (document.body.scrollHeight > window.innerHeight + 500) { $(document.body).scrollspy({ target: '#current-page-table-of-contents', offset: 40 diff --git a/docs/assets/css/style.scss b/docs/assets/css/style.scss index 48a42816..8d15ba9d 100644 --- a/docs/assets/css/style.scss +++ b/docs/assets/css/style.scss @@ -9,8 +9,7 @@ $sidebar-transition: left 0.25s; $container-width: 1024px; body { - overflow-y: scroll; - overflow-x: hidden; + overflow: scroll; } #container { @@ -25,6 +24,7 @@ body { #sidebar { position: fixed; + background: white; top: 0; bottom: 0; width: $sidebar-width; diff --git a/script/serve-docs b/script/serve-docs new file mode 100755 index 00000000..620d5bf7 --- /dev/null +++ b/script/serve-docs @@ -0,0 +1,4 @@ +#!/bin/bash + +cd docs +bundle exec jekyll serve