diff options
author | Timothy Hunter <timhunter@databricks.com> | 2015-12-16 10:12:33 -0800 |
---|---|---|
committer | Joseph K. Bradley <joseph@databricks.com> | 2015-12-16 10:12:33 -0800 |
commit | a6325fc401f68d9fa30cc947c44acc9d64ebda7b (patch) | |
tree | 5e7a79d1335666490850ed281587340344c32bda /docs/_layouts/global.html | |
parent | 1a3d0cd9f013aee1f03b1c632c91ae0951bccbb0 (diff) | |
download | spark-a6325fc401f68d9fa30cc947c44acc9d64ebda7b.tar.gz spark-a6325fc401f68d9fa30cc947c44acc9d64ebda7b.tar.bz2 spark-a6325fc401f68d9fa30cc947c44acc9d64ebda7b.zip |
[SPARK-12324][MLLIB][DOC] Fixes the sidebar in the ML documentation
This fixes the sidebar, using a pure CSS mechanism to hide it when the browser's viewport is too narrow.
Credit goes to the original author Titan-C (mentioned in the NOTICE).
Note that I am not a CSS expert, so I can only address comments up to some extent.
Default view:
<img width="936" alt="screen shot 2015-12-14 at 12 46 39 pm" src="https://cloud.githubusercontent.com/assets/7594753/11793597/6d1d6eda-a261-11e5-836b-6eb2054e9054.png">
When collapsed manually by the user:
<img width="1004" alt="screen shot 2015-12-14 at 12 54 02 pm" src="https://cloud.githubusercontent.com/assets/7594753/11793669/c991989e-a261-11e5-8bf6-aecf3bdb6319.png">
Disappears when column is too narrow:
<img width="697" alt="screen shot 2015-12-14 at 12 47 22 pm" src="https://cloud.githubusercontent.com/assets/7594753/11793607/7754dbcc-a261-11e5-8b15-e0d074b0e47c.png">
Can still be opened by the user if necessary:
<img width="651" alt="screen shot 2015-12-14 at 12 51 15 pm" src="https://cloud.githubusercontent.com/assets/7594753/11793612/7bf82968-a261-11e5-9cc3-e827a7a6b2b0.png">
Author: Timothy Hunter <timhunter@databricks.com>
Closes #10297 from thunterdb/12324.
Diffstat (limited to 'docs/_layouts/global.html')
-rwxr-xr-x | docs/_layouts/global.html | 35 |
1 files changed, 24 insertions, 11 deletions
diff --git a/docs/_layouts/global.html b/docs/_layouts/global.html index 0b5b0cd48a..3089474c13 100755 --- a/docs/_layouts/global.html +++ b/docs/_layouts/global.html @@ -1,3 +1,4 @@ + <!DOCTYPE html> <!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]--> <!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]--> @@ -127,20 +128,32 @@ <div class="container-wrapper"> {% if page.url contains "/ml" %} - {% include nav-left-wrapper-ml.html nav-mllib=site.data.menu-mllib nav-ml=site.data.menu-ml %} - {% endif %} - + {% include nav-left-wrapper-ml.html nav-mllib=site.data.menu-mllib nav-ml=site.data.menu-ml %} + <input id="nav-trigger" class="nav-trigger" checked type="checkbox"> + <label for="nav-trigger"></label> + <div class="content-with-sidebar" id="content"> + {% if page.displayTitle %} + <h1 class="title">{{ page.displayTitle }}</h1> + {% else %} + <h1 class="title">{{ page.title }}</h1> + {% endif %} + + {{ content }} - <div class="container" id="content"> - {% if page.displayTitle %} - <h1 class="title">{{ page.displayTitle }}</h1> - {% else %} - <h1 class="title">{{ page.title }}</h1> - {% endif %} + </div> + {% else %} + <div class="content" id="content"> + {% if page.displayTitle %} + <h1 class="title">{{ page.displayTitle }}</h1> + {% else %} + <h1 class="title">{{ page.title }}</h1> + {% endif %} - {{ content }} + {{ content }} - </div> <!-- /container --> + </div> + {% endif %} + <!-- /container --> </div> <script src="js/vendor/jquery-1.8.0.min.js"></script> |