Skip to content

Commit b48101d

Browse files
authored
Merge pull request #494 from flynnduism/styles
docs(styles) sticky footer to avoid overlap with sidebar
2 parents 7088f27 + c54c2ec commit b48101d

9 files changed

Lines changed: 104 additions & 42 deletions

File tree

themes/deis/base.html

Lines changed: 1 addition & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -48,35 +48,7 @@
4848
</div>
4949
</div>
5050

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>
76-
77-
<div class="sidebar-bg"></div>
78-
</nav>
79-
51+
{%- include "sidebar.html" %}
8052
</div>
8153

8254
{%- include "footer.html" %}

themes/deis/footer.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,20 +39,20 @@
3939
</section>
4040
<section class="panel panel-links">
4141
<div class="row fullwidth">
42-
<div class="small-4 medium-4 large-4 small-only-text-center columns logo-and-copyright">
42+
<div class="small-4 medium-2 large-4 small-only-text-center columns logo-and-copyright">
4343
<div class="logo">
4444
<a id="footer-return" href="//deis.com"><img src="{{ base_url }}/static/img/svg/footer-logo.svg" alt="Deis"></a>
4545
</div>
46-
<p class="copyright show-for-medium-up">
46+
<p class="copyright show-for-large-up">
4747
<a id="footer-privacy" href="//deis.com/policies/privacy">Privacy Policy</a>
4848
</p>
49-
<p class="copyright show-for-medium-up">Deis.com and the Deis project are maintained by <a href="https://engineyard.com/"><img src="{{ base_url }}/static/img/svg/footer-engine-yard.svg" alt="Engine Yard"></p>
49+
<p class="copyright show-for-large-up">Deis.com and the Deis project are maintained by <a href="https://engineyard.com/"><img src="{{ base_url }}/static/img/svg/footer-engine-yard.svg" alt="Engine Yard"></p>
5050
</div>
51-
<div class="small-8 medium-8 large-8 columns">
51+
<div class="small-8 medium-10 large-8 columns">
5252
<div class="row">
5353
<div class="small-6 medium-3 columns">
5454
<dl>
55-
<dt><a id="footer-gh-community" href="//deis.com/community"><span class="hide-for-medium-down">Deis</span> Community</a></dt>
55+
<dt><a id="footer-gh-community" href="//deis.com/community">Community</a></dt>
5656
<dd><a id="footer-get-involved" href="//deis.com/community">Get Involved</a></dd>
5757
<dd><a id="footer-videos-events" href="//deis.com/community#videos-events">Videos &amp; Events</a></dd>
5858
<dd><a id="footer-roadmap" href="https://docs-v2.readthedocs.io/en/latest/roadmap/roadmap/">Project Roadmap</a></dd>

themes/deis/sidebar.html

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<nav class="sidebar hide-for-small">
2+
<div class="sidebar-inner">
3+
<h1><a href="/" class="logo"><img src="{{ base_url }}/static/img/svg/logo.svg" width="128px" height="41px" alt="Deis"></a></h1>
4+
5+
<ul class="current sidebar-main">
6+
{%- include "nav.html" %}
7+
<li class="toctree-l1">
8+
{% if READTHEDOCS %}
9+
<a class="reference internal" href="../" state="open">Versions</a>
10+
<ul class="current">
11+
{% for slug, url in versions %}
12+
<li class="toctree-l2"><a href="{{ url }}{%- for word in pagename.split('/') -%}
13+
{%- if word != 'index' -%}
14+
{%- if word != '' -%}
15+
{{ word }}/
16+
{%- endif -%}
17+
{%- endif -%}
18+
{%- endfor -%}"
19+
title="Switch to {{ slug }}">{{ slug }}</a></li>
20+
{% endfor %}
21+
</ul>
22+
{% endif %}
23+
</li>
24+
</ul>
25+
</div>
26+
27+
<div class="sidebar-bg"></div>
28+
</nav>

themes/deis/static/css/styles.css

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

themes/deis/static/css/styles.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

themes/deis/static/scss/_doc-layout.scss

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
1-
html, body{
1+
html,
2+
body {
23
height:100%;
34
}
45

6+
.off-canvas-wrap,
7+
.inner-wrap {
8+
min-height: 100%;
9+
}
10+
511
body {
612
@include helvetica;
713
overflow-x: hidden;
@@ -20,7 +26,14 @@ body {
2026
.content-wrap {
2127
position: relative;
2228
padding-left: 320px;
23-
padding-bottom: 10em;
29+
min-height: 100%;
30+
margin-bottom: -335px;
31+
32+
&:after {
33+
content: "";
34+
display: block;
35+
height: 390px;
36+
}
2437
}
2538

2639
.content-inner {
@@ -29,6 +42,7 @@ body {
2942
margin-left: auto;
3043
margin-right: auto;
3144
padding-top: 128px;
45+
padding-bottom: 128px;
3246
}
3347

3448
.sidebar {

themes/deis/static/scss/_doc-sidebar.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
.sidebar-inner {
44
padding: 120px 0 40px;
5-
65
max-width: 320px;
76
position: relative;
87
z-index: 50;

themes/deis/static/scss/_footer.scss

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@ footer {
22
padding: 0;
33
z-index: 1020;
44
position: relative;
5+
height: 335px;
6+
background: white;
7+
margin-left: 290px;
8+
9+
@include mobile {
10+
margin-left: 0;
11+
}
512

613
.logo {
714
margin: 0 0 2em;
@@ -142,15 +149,16 @@ footer {
142149

143150
.panel-links {
144151
padding-top: 2.5em;
152+
background: white;
153+
145154
@include tablet {
146155
padding-bottom: 0;
156+
font-size: 1.25rem;
147157
}
148-
background: white;
149158

150159
dl {
151160
font-size: 0.925em;
152161
float: left;
153-
// min-width: 20%;
154162
margin: 0.75em 0 2em 7.5%;
155163

156164
@include mobile {

themes/deis/static/scss/_media.scss

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,53 @@
2020
}
2121
}
2222

23+
.content-wrap {
24+
margin-bottom: -225px !important;
25+
}
26+
27+
footer {
28+
height: 225px !important;
29+
}
30+
2331
.shape-position.shape-position-bottom {
2432
bottom: -3.5em;
2533
width: 117.5%;
2634
z-index: 150;
2735
}
2836

37+
.off-canvas-wrap.move-right,
38+
.off-canvas-wrap.move-left {
39+
height: 100%;
40+
41+
.inner-wrap,
42+
.content-wrap {
43+
height: 100%;
44+
45+
& + footer {
46+
display: none;
47+
}
48+
}
49+
}
50+
51+
aside.right-off-canvas-menu {
52+
53+
ul:first-child {
54+
height: 100%;
55+
max-height: 100%;
56+
overflow-y: scroll;
57+
58+
ul {
59+
height: auto;
60+
margin: 0 0 1.25em 0;
61+
}
62+
63+
ul li a {
64+
font-size: 0.875em;
65+
padding-left: 2.75rem;
66+
opacity: 0.75;
67+
}
68+
}
69+
}
2970
}
3071

3172
@media only screen and (max-width: 64.063em) {

0 commit comments

Comments
 (0)