Skip to content

Commit b05cc2e

Browse files
authored
Merge pull request #4475 from github/banner-template
[CodeQL docs] Update footer in Sphinx template
2 parents ab7d28b + fb05f02 commit b05cc2e

File tree

2 files changed

+83
-28
lines changed

2 files changed

+83
-28
lines changed

docs/language/global-sphinx-files/_static/custom.css_t

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,39 +7,37 @@
77
* For the classes provided by the primer, see https://unpkg.com/@primer/css/dist/primer.css
88
*/
99

10-
/* -- FOOTER ------------------------------------------------------------------------------- */
1110

12-
div.footer {
13-
width: 100%;
14-
}
15-
16-
/* -- PRIVACY NOTICE ----------------------------------------------------------------------- */
17-
18-
div.privacy {
19-
text-align: right;
20-
padding-right: 5%;
21-
padding-bottom: 20px;
22-
}
11+
/* -- CODE SNIPPETS ----------------------------------------------------------------------- */
2312

2413
code {
2514
font-size: 0.9em !important; /* makes code snippets in headings the correct size */
2615
}
2716

2817
/* -- MAIN BODY ---------------------------------------------------------------------------- */
2918

19+
main {
20+
min-height: calc(100vh - 68px);
21+
}
22+
3023
div.body {
3124
max-width: 100%;
3225
min-width: unset;
26+
padding: 0;
3327
}
3428

3529
div.body li {
3630
margin: 0 0 0.5em 0; /* Increase spacing between list items */
3731
}
3832

33+
article {
34+
min-height: calc(100vh - 145px); /* Makes sure GitHub footer stays at bottom of viewport */
35+
}
36+
3937
/* -- SIDEBAR ------------------------------------------------------------------------------- */
4038

4139
.SideNav {
42-
height: 100vh;
40+
max-height: 100vh; /* Makes sure sidebar doesn't cover GitHub footer */
4341
}
4442

4543
.SideNav li {

docs/language/global-sphinx-files/_templates/layout.html

Lines changed: 72 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
{% endblock %}
3737

3838
{%- block content %}
39-
<div class="Header">
39+
<header class="Header">
4040
<div class="Header-item--full">
4141
<a href="{{ pathto(master_doc) }}" class="Header-link f2 d-flex flex-items-center">
4242
<!-- <%= octicon "mark-github", class: "mr-2", height: 32 %> -->
@@ -93,32 +93,89 @@
9393

9494
</div>
9595

96-
</div>
97-
98-
<nav
99-
class="SideNav position-sticky top-0 col-lg-3 col-md-3 float-left border p-4 hide-sm hide-md overflow-y-auto">
96+
</header>
97+
<main class="bg-gray-light clearfix">
98+
<nav class="SideNav position-sticky top-0 col-lg-3 col-md-3 float-left p-4 hide-sm hide-md overflow-y-auto">
10099

101100
{{ toctree(includehidden=true, maxdepth=2, collapse=true) }}
102101

103102
</nav>
104103

105-
<div class="body p-4 col-sm-12 col-md-9 col-lg-9 float-left">
106-
<div class="hide-lg hide-xl">
104+
105+
<div class="body col-sm-12 col-md-9 col-lg-9 float-left border-left">
106+
107+
<div class="hide-lg hide-xl px-4 pt-4">
107108
{{customrelbar()}}
108109
</div>
109110

110-
{% block body %} {% endblock %}
111+
<article class="p-4 col-lg-10 col-md-10 col-sm-12">
112+
{% block body %} {% endblock %}
113+
</article>
114+
115+
<!-- GitHub footer, with links to terms and privacy statement -->
116+
<div class="px-3 px-md-6 f6 py-4 d-sm-flex flex-justify-between flex-row-reverse flex-items-center border-top">
117+
<ul class="list-style-none d-flex flex-items-center mb-3 mb-sm-0 lh-condensed-ultra">
118+
<li class="mr-3">
119+
<a href="https://twitter.com/github" title="GitHub on Twitter" style="color: #959da5;">
120+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 273.5 222.3" class="d-block" height="18">
121+
<path
122+
d="M273.5 26.3a109.77 109.77 0 0 1-32.2 8.8 56.07 56.07 0 0 0 24.7-31 113.39 113.39 0 0 1-35.7 13.6 56.1 56.1 0 0 0-97 38.4 54 54 0 0 0 1.5 12.8A159.68 159.68 0 0 1 19.1 10.3a56.12 56.12 0 0 0 17.4 74.9 56.06 56.06 0 0 1-25.4-7v.7a56.11 56.11 0 0 0 45 55 55.65 55.65 0 0 1-14.8 2 62.39 62.39 0 0 1-10.6-1 56.24 56.24 0 0 0 52.4 39 112.87 112.87 0 0 1-69.7 24 119 119 0 0 1-13.4-.8 158.83 158.83 0 0 0 86 25.2c103.2 0 159.6-85.5 159.6-159.6 0-2.4-.1-4.9-.2-7.3a114.25 114.25 0 0 0 28.1-29.1"
123+
fill="currentColor"></path>
124+
</svg>
125+
</a>
126+
</li>
127+
<li class="mr-3">
128+
<a href="https://www.facebook.com/GitHub" title="GitHub on Facebook" style="color: #959da5;">
129+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.3 15.4" class="d-block" height="18">
130+
<path
131+
d="M14.5 0H.8a.88.88 0 0 0-.8.9v13.6a.88.88 0 0 0 .8.9h7.3v-6h-2V7.1h2V5.4a2.87 2.87 0 0 1 2.5-3.1h.5a10.87 10.87 0 0 1 1.8.1v2.1h-1.3c-1 0-1.1.5-1.1 1.1v1.5h2.3l-.3 2.3h-2v5.9h3.9a.88.88 0 0 0 .9-.8V.8a.86.86 0 0 0-.8-.8z"
132+
fill="currentColor"></path>
133+
</svg>
134+
</a>
135+
</li>
136+
<li class="mr-3">
137+
<a href="https://www.youtube.com/github" title="GitHub on YouTube" style="color: #959da5;">
138+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 19.17 13.6" class="d-block" height="16">
139+
<path
140+
d="M18.77 2.13A2.4 2.4 0 0 0 17.09.42C15.59 0 9.58 0 9.58 0a57.55 57.55 0 0 0-7.5.4A2.49 2.49 0 0 0 .39 2.13 26.27 26.27 0 0 0 0 6.8a26.15 26.15 0 0 0 .39 4.67 2.43 2.43 0 0 0 1.69 1.71c1.52.42 7.5.42 7.5.42a57.69 57.69 0 0 0 7.51-.4 2.4 2.4 0 0 0 1.68-1.71 25.63 25.63 0 0 0 .4-4.67 24 24 0 0 0-.4-4.69zM7.67 9.71V3.89l5 2.91z"
141+
fill="currentColor"></path>
142+
</svg>
143+
</a>
144+
</li>
145+
<li class="mr-3 flex-self-start">
146+
<a href="https://www.linkedin.com/company/github" title="GitHub on Linkedin" style="color: #959da5;">
147+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 19 18" class="d-block" height="18">
148+
<path
149+
d="M3.94 2A2 2 0 1 1 2 0a2 2 0 0 1 1.94 2zM4 5.48H0V18h4zm6.32 0H6.34V18h3.94v-6.57c0-3.66 4.77-4 4.77 0V18H19v-7.93c0-6.17-7.06-5.94-8.72-2.91z"
150+
fill="currentColor"></path>
151+
</svg>
152+
</a>
153+
</li>
154+
<li>
155+
<a href="https://github.com/github" title="GitHub's organization" style="color: #959da5;">
156+
<svg version="1.1" width="20" height="20" viewBox="0 0 16 16" class="octicon octicon-mark-github"
157+
aria-hidden="true">
158+
<path fill-rule="evenodd"
159+
d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z">
160+
</path>
161+
</svg>
162+
</a>
163+
</li>
164+
</ul>
165+
<ul class="list-style-none d-flex text-gray">
166+
<li class="mr-3">&copy; 2020 GitHub, Inc.</li>
167+
<li class="mr-3"><a
168+
href="https://docs.github.com/github/site-policy/github-terms-of-service"
169+
class="link-gray">Terms </a></li>
170+
<li><a href="https://docs.github.com/github/site-policy/github-privacy-statement"
171+
class="link-gray">Privacy </a></li>
172+
</ul>
173+
</div>
111174
</div>
112-
175+
</main>
113176
{% endblock %}
114177

115178
{% block footer %}
116-
<div class="privacy">
117-
<a class="p5" target="_blank" href="https://help.semmle.com/privacy-policy.html"
118-
alt="Privacy policy and tracking preferences" title="Privacy policy and tracking preferences">Privacy
119-
policy</a>
120-
</div>
121-
122179
<script type="text/javascript">
123180
$(document).ready(function () {
124181
$(".toggle > *").hide();

0 commit comments

Comments
 (0)