Commit 50c7b69c4d84d87447878625d9a687ade2e911a2

Authored by Jordan Cheney
1 parent 4a25f0a0

Final changes to RTD theme before merge

docs/mkdocs.yml
... ... @@ -4,8 +4,8 @@ site_favicon: docs/img/openbr.ico
4 4 copyright: 2012 The MITRE Corporation
5 5  
6 6 theme: readthedocs
7   -#theme_dir: themes/readthedocs/
8   -theme_dir: themes/materialize
  7 +theme_dir: themes/readthedocs/
  8 +#theme_dir: themes/materialize
9 9  
10 10 include_next_prev: False
11 11  
... ...
docs/themes/readthedocs/base.html
... ... @@ -46,70 +46,71 @@
46 46 </head>
47 47  
48 48 <body class="wy-body-for-nav" role="document">
  49 + <div class="wy-grid-for-nav">
  50 + {# SIDE NAV, TOGGLES ON MOBILE #}
  51 + <nav data-toggle="wy-nav-shift" class="wy-nav-side stickynav">
  52 + <div class="wy-side-nav-search">
  53 + <a href="{{ homepage_url }}" class="icon icon-home"> {{ site_name }}</a>
  54 + {% include "searchbox.html" %}
  55 + </div>
49 56  
50   - <div class="wy-grid-for-nav">
51   -
52   - {# SIDE NAV, TOGGLES ON MOBILE #}
53   - <nav data-toggle="wy-nav-shift" class="wy-nav-side stickynav">
54   - <div class="wy-side-nav-search">
55   - <a href="{{ homepage_url }}" class="icon icon-home"> {{ site_name }}</a>
56   - {% include "searchbox.html" %}
57   - </div>
58   -
59   - <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
60   - <ul class="current">
61   - {% for nav_item in nav %}
62   - <li>{% include "toc.html" %}<li>
63   - {% endfor %}
64   - </ul>
65   - </div>
66   - &nbsp;
67   - </nav>
68   -
69   - <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
70   -
71   - {# MOBILE NAV, TRIGGLES SIDE NAV ON TOGGLE #}
72   - <nav class="wy-nav-top" role="navigation" aria-label="top navigation">
73   - <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
74   - <a href="{{ homepage_url }}">{{ site_name }}</a>
75   - </nav>
76   -
77   - {# PAGE CONTENT #}
78   - <div class="wy-nav-content">
79   - <div class="rst-content">
80   - {% include "breadcrumbs.html" %}
81   - <div role="main">
82   - <div class="section">
83   - {% block content %}
84   - {{ content }}
85   - {% endblock %}
  57 + <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
  58 + <ul class="current">
  59 + {% for nav_item in nav %}
  60 + <li>{% include "nav.html" %}<li>
  61 + {% endfor %}
  62 + </ul>
  63 + </div>
  64 + &nbsp;
  65 + </nav>
  66 +
  67 + <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
  68 + {# MOBILE NAV, TRIGGLES SIDE NAV ON TOGGLE #}
  69 + <nav class="wy-nav-top" role="navigation" aria-label="top navigation">
  70 + <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
  71 + <a href="{{ homepage_url }}">{{ site_name }}</a>
  72 + </nav>
  73 +
  74 + {# PAGE CONTENT #}
  75 + <div class="wy-nav-content">
  76 + <div class="rst-content">
  77 + {% include "breadcrumbs.html" %}
  78 +
  79 + <div role="main">
  80 + <div class="section">
  81 + {% block content %}
  82 + <div class="toc" data-spy="affix" role="navigation" aria-label="main navigation">
  83 + <ul class="current">
  84 + <span>Table of Contents</span>
  85 + <ul>
  86 + {% for toc_item in toc %}
  87 + <li><a href="{{ toc_item.url }}"><span>{{ toc_item.title }}</span></a></li>
  88 + {% endfor %}
  89 + </ul>
  90 + </ul>
  91 + </div>
  92 + {{ content }}
  93 + {% endblock %}
  94 + </div>
  95 + </div>
  96 + {%- block footer %}
  97 + {% include "footer.html" %}
  98 + {% endblock %}
  99 + </div>
86 100 </div>
87   - </div>
88   - {%- block footer %}
89   - {% include "footer.html" %}
90   - {% endblock %}
91   - </div>
92   - </div>
93   -
94   - </section>
95   -
96   - </div>
97   -
98   -<div class="rst-versions" role="note" style="cursor: pointer">
99   - <span class="rst-current-version" data-toggle="rst-current-version">
100   - {% if repo_name == 'GitHub' %}
101   - <a class="icon icon-github" style="float: left; color: #fcfcfc"> GitHub</a>
102   - {% elif repo_name == 'Bitbucket' %}
103   - <a class="icon icon-bitbucket" style="float: left; color: #fcfcfc"> BitBucket</a>
104   - {% endif %}
105   - {% if previous_page %}
106   - <span><a href="{{ previous_page.url }}" style="color: #fcfcfc;">&laquo; Previous</a></span>
107   - {% endif %}
108   - {% if next_page %}
109   - <span style="margin-left: 15px"><a href="{{ next_page.url }}" style="color: #fcfcfc">Next &raquo;</a></span>
110   - {% endif %}
111   - </span>
112   -</div>
  101 +
  102 + </section>
  103 + </div>
  104 +
  105 + <div class="rst-versions" role="note" style="cursor: pointer">
  106 + <span class="rst-current-version" data-toggle="rst-current-version">
  107 + {% if repo_name == 'GitHub' %}
  108 + <a class="icon icon-github" style="float: left; color: #fcfcfc"> GitHub</a>
  109 + {% elif repo_name == 'Bitbucket' %}
  110 + <a class="icon icon-bitbucket" style="float: left; color: #fcfcfc"> BitBucket</a>
  111 + {% endif %}
  112 + </span>
  113 + </div>
113 114  
114 115 </body>
115 116 </html>
... ...
docs/themes/readthedocs/css/theme_extra.css
... ... @@ -37,10 +37,34 @@ h3, h4, h5, h6 {
37 37 */
38 38 .wy-nav-side {
39 39 height: 100%;
  40 + width: 25%;
40 41 overflow-y: auto;
41 42 }
42 43  
43   -/*
  44 +.wy-nav-content-wrap {
  45 + padding-left: 25%;
  46 + margin-left: 0px;
  47 + background-color: #FFF;
  48 +}
  49 +
  50 +.toc {
  51 + position: fixed;
  52 + margin-top: -50px;
  53 + padding-left: 750px;
  54 +}
  55 +
  56 +@media (max-width:767px) {
  57 + .wy-nav-content-wrap {
  58 + padding-left: 0%;
  59 + }
  60 +}
  61 +
  62 +@media (max-width: 1300px) {
  63 + .toc {
  64 + visibility: hidden;
  65 + }
  66 +}
  67 +
44 68 * readthedocs theme hides nav items when the window height is
45 69 * too small to contain them.
46 70 *
... ...
docs/themes/readthedocs/toc.html renamed to docs/themes/readthedocs/nav.html
1   -{% if nav_item.children %}
2   - <li class="toctree-l1 {% if nav_item.active%}current{%endif%}">
3   - <a class="{% if nav_item.active%}current{%endif%}" href="{{ nav_item.children[0].url }}">{{ nav_item.title }}</a>
4   - <ul class="subnav">
5   - {% if nav_item.active %}
6   - {% for nav_item in nav_item.children[1:] %}
7   - {% include 'toc.html' %}
  1 +<ul class="subnav">
  2 + {% if nav_item.children %}
  3 + {% if nav_item.children[0].title == "Overview" %}
  4 + <li class="l1 {% if nav_item.active%}current{%endif%}">
  5 + <a href="{{ nav_item.children[0].url }}">{{ nav_item.title }}</a>
  6 + </li>
  7 + {% if nav_item.active %}
  8 + {% for nav_item in nav_item.children[1:] %}
  9 + {% include 'nav.html' %}
  10 + {% endfor %}
  11 + {% endif %}
  12 + {% else %}
  13 + <li><span>{{ nav_item.title }}</span></li>
  14 + {% for nav_item in nav_item.children %}
  15 + {% include 'nav.html' %}
8 16 {% endfor %}
9 17 {% endif %}
10   - </ul>
11   -{% else %}
12   - <li class="toctree-l1 {% if nav_item.active%}current{%endif%}">
13   - <a class="{% if nav_item.active%}current{%endif%}" href="{{ nav_item.url }}">{{ nav_item.title }}</a>
14   - {% if nav_item == current_page %}
15   - <ul class="subnav">
16   - {% for toc_item in toc %}
17   - <li class="toctree-l3"><a href="{{ toc_item.url }}">{{ toc_item.title }}</a></li>
18   - {% endfor %}
19   - </ul>
20   - {% endif %}
21   - </li>
22   -{% endif %}
  18 + {% else %}
  19 + <li class="l1 {% if nav_item.active%}current{%endif%}">
  20 + <a class="{% if nav_item.active%}current{%endif%}" href="{{ nav_item.url }}">{{ nav_item.title }}</a>
  21 + </li>
  22 + {% endif %}
  23 +</ul>
... ...