Skip to content

Commit 67a6887

Browse files
Add footer
1 parent 55c7386 commit 67a6887

File tree

5 files changed

+33
-0
lines changed

5 files changed

+33
-0
lines changed

templates/base.html

+1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
{%- block header %}{% endblock header -%}
3030

3131
{%- block body -%}{%- endblock body -%}
32+
{%- include "footer.html" -%}
3233

3334
<script type="text/javascript" nonce="{{ csp_nonce }}" src="/-/static/menu.js?{{ docsrs_version() | slugify }}"></script>
3435
<script type="text/javascript" nonce="{{ csp_nonce }}" src="/-/static/index.js?{{ docsrs_version() | slugify }}"></script>

templates/footer.html

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<div class="docs-rs-footer">
2+
Who wants some content?
3+
</div>

templates/rustdoc/body.html

+1
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,4 @@
3333

3434
{# see comment in ../../static/storage-change-detection.html for details #}
3535
<iframe src="/-/static/storage-change-detection.html" width="0" height="0" style="display: none"></iframe>
36+
{%- include "footer.html" -%}

templates/style/base.scss

+12
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ textarea,
7474
body {
7575
padding: 0;
7676
margin: 0;
77+
min-height: calc(100vh - 32px + 32px);
7778

7879
* {
7980
-webkit-box-sizing: border-box;
@@ -168,6 +169,17 @@ body {
168169
g.highcharts-grid > path {
169170
stroke: var(--chart-grid) !important;
170171
}
172+
173+
.docs-rs-footer {
174+
text-align: center;
175+
position: absolute;
176+
bottom: 0;
177+
width: 100%;
178+
color: #DDD;
179+
font-size: 14px;
180+
height: 32px;
181+
background: rgb(10,10,10);
182+
}
171183
}
172184

173185
pre {

templates/style/rustdoc.scss

+16
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,29 @@
11
// FIXME: Use modules
22
@import "vars", "navbar", "themes", "fa";
33

4+
body.rustdoc-age {
5+
min-height: 100vh;
6+
}
7+
48
// Force the navbar to be left-aligned on rustdoc pages
59
body.rustdoc-page > .nav-container > .container {
610
margin-left: 0;
711
}
812

913
div.container-rustdoc {
1014
text-align: left;
15+
16+
> .docs-rs-footer {
17+
position: absolute;
18+
bottom: -20px;
19+
right: -15px;
20+
width: calc(100vw - 200px);
21+
text-align: center;
22+
color: #DDD;
23+
font-size: 14px;
24+
height: 32px;
25+
background: rgb(10,10,10);
26+
}
1127
}
1228

1329
// this is a super nasty override for help dialog in rustdocs

0 commit comments

Comments
 (0)