Skip to content

Commit 2e1c6a9

Browse files
flynnduismslack
authored andcommitted
doc(styles): mobile off-canvas menu
1 parent e868009 commit 2e1c6a9

2 files changed

Lines changed: 54 additions & 50 deletions

File tree

themes/deis/base.html

Lines changed: 52 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -22,62 +22,66 @@
2222
</head>
2323

2424
<body>
25-
<!--[if lt IE 7]>
26-
<p class="chromeframe">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> or <a href="http://www.google.com/chromeframe/?redirect=true">activate Google Chrome Frame</a> to improve your experience.</p>
27-
<![endif]-->
28-
29-
{%- include "topbar.html" %}
30-
{%- include "offcanvas.html" %}
31-
32-
<!-- banner at the top of the page for temporary announcements-->
33-
<div data-alert class="alert-box alert banner text-center hide-for-small">
34-
You're viewing docs for the latest release of <strong>Deis Workflow</strong>. For docs <a href="https://docs.deis.io/">relating to Deis 1.0 click here</a>.
35-
</div>
25+
<div class="off-canvas-wrap">
26+
<div class="inner-wrap">
27+
<!--[if lt IE 7]>
28+
<p class="chromeframe">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> or <a href="http://www.google.com/chromeframe/?redirect=true">activate Google Chrome Frame</a> to improve your experience.</p>
29+
<![endif]-->
30+
31+
{%- include "topbar.html" %}
32+
{%- include "offcanvas.html" %}
33+
34+
<!-- banner at the top of the page for temporary announcements-->
35+
<div data-alert class="alert-box alert banner text-center hide-for-small">
36+
You're viewing docs for the latest release of <strong>Deis Workflow</strong>. For docs <a href="http://docs.deis.io">relating to Deis 1.0 click here</a>.
37+
</div>
3638

37-
<div class="content-wrap">
39+
<div class="content-wrap">
3840

39-
<div class="content-inner">
40-
<div class="container">
41-
<div class="row">
42-
<div class="small-12">
43-
{{ content }}
41+
<div class="content-inner">
42+
<div class="container">
43+
<div class="row">
44+
<div class="small-12">
45+
{{ content }}
46+
</div>
47+
</div>
4448
</div>
4549
</div>
46-
</div>
47-
</div>
4850

49-
<nav class="sidebar hide-for-small">
50-
<div class="sidebar-inner">
51-
<h1><a href="/" class="logo"><img src="{{ base_url }}/static/img/svg/logo.svg" width="128px" height="41px" alt="Deis"></a></h1>
52-
53-
<ul class="current sidebar-main">
54-
{%- include "nav.html" %}
55-
<li class="toctree-l1">
56-
{% if READTHEDOCS %}
57-
<a class="reference internal" href="../" state="open">Versions</a>
58-
<ul class="current">
59-
{% for slug, url in versions %}
60-
<li class="toctree-l2"><a href="{{ url }}{%- for word in pagename.split('/') -%}
61-
{%- if word != 'index' -%}
62-
{%- if word != '' -%}
63-
{{ word }}/
64-
{%- endif -%}
65-
{%- endif -%}
66-
{%- endfor -%}"
67-
title="Switch to {{ slug }}">{{ slug }}</a></li>
68-
{% endfor %}
69-
</ul>
70-
{% endif %}
71-
</li>
72-
</ul>
73-
</div>
51+
<nav class="sidebar hide-for-small">
52+
<div class="sidebar-inner">
53+
<h1><a href="/" class="logo"><img src="{{ base_url }}/static/img/svg/logo.svg" width="128px" height="41px" alt="Deis"></a></h1>
54+
55+
<ul class="current sidebar-main">
56+
{%- include "nav.html" %}
57+
<li class="toctree-l1">
58+
{% if READTHEDOCS %}
59+
<a class="reference internal" href="../" state="open">Versions</a>
60+
<ul class="current">
61+
{% for slug, url in versions %}
62+
<li class="toctree-l2"><a href="{{ url }}{%- for word in pagename.split('/') -%}
63+
{%- if word != 'index' -%}
64+
{%- if word != '' -%}
65+
{{ word }}/
66+
{%- endif -%}
67+
{%- endif -%}
68+
{%- endfor -%}"
69+
title="Switch to {{ slug }}">{{ slug }}</a></li>
70+
{% endfor %}
71+
</ul>
72+
{% endif %}
73+
</li>
74+
</ul>
75+
</div>
7476

75-
<div class="sidebar-bg"></div>
76-
</nav>
77+
<div class="sidebar-bg"></div>
78+
</nav>
7779

78-
</div>
80+
</div>
7981

80-
{%- include "footer.html" %}
82+
{%- include "footer.html" %}
83+
</div>
84+
</div>
8185

8286
<!-- <script src="//ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script> -->
8387
<script>window.jQuery || document.write('<script src="{{ base_url }}/static/js/jquery-1.12.4.min.js"><\/script>')</script>

themes/deis/offcanvas.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
<aside class="right-off-canvas-menu">
1+
<aside class="right-off-canvas-menu" data-offcanvas>
22
<ul>
33
{% for nav_item in nav %}
44
<li class="toctree-l1{% if nav_item.active %} current{% endif %}">
55
<a class="reference internal{% if nav_item.active %} current{% endif %}"{% if nav_item.active %} state="open"{% endif %} href="{{ nav_item.url }}">{{ nav_item.title }}</a>
66
{% if nav_item.children %}
7-
<ul style="display: none;"{% if nav_item.active %} class="current"{% endif %}>
7+
<ul {% if nav_item.active %} class="current"{% endif %}>
88
{% for child in nav_item.children %}
99
<li class="toctree-l2{% if child.active %} current{% endif %}">
1010
<a class="reference internal{% if nav_item.active %} current{% endif %}" id="{{ child.title }}" href="{{ child.url }}">{{ child.title }}</a>

0 commit comments

Comments
 (0)