Skip to content

Commit c0f083c

Browse files
authored
Merge pull request docker#11573 from thaJeztah/mind_your_head
Fix landing-page mobile menu background color, and other fixes
2 parents 5b51e70 + a58cd77 commit c0f083c

24 files changed

+40
-29902
lines changed

_includes/body-landing.html

-4
Original file line numberDiff line numberDiff line change
@@ -468,10 +468,6 @@ <h5 class="title">Educational resources</h5>
468468
<footer class="footer">
469469
{% include footer.html %}
470470
</footer>
471-
<script src="/js/theme-switcher.js"></script>
472-
<script src="/js/jquery.js"></script>
473-
<script src="/js/bootstrap.min.js"></script>
474-
<script defer src="/js/search.js"></script>
475471

476472
<script>
477473
window.onChangeHelpTab = function (name) {

_includes/body.html

-6
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,5 @@ <h1>{{ page.title }}</h1>
7373
{% include footer.html %}
7474
</footer>
7575
<script>const pageURL = "{{ page.url }}";</script>
76-
<script src="/js/theme-switcher.js"></script>
77-
<script defer src="/js/anchorlinks.js"></script>
78-
<script src="/js/jquery.js"></script>
79-
<script src="/js/bootstrap.min.js"></script>
80-
<script defer src="/js/docs.js"></script>
81-
<script defer src="/js/search.js"></script>
8276
{%- include analytics/polldaddy.html -%}
8377
</body>

_includes/head.html

+26-6
Original file line numberDiff line numberDiff line change
@@ -44,16 +44,36 @@
4444

4545
<meta name="viewport" content="width=device-width, initial-scale=1.0">
4646

47+
{%- comment -%}
48+
We put these scripts in the head section, but use "defer" loading to allow the
49+
browser to start loading them as soon as possible. Actual execution of deferred
50+
scripts happens once the HTML is fully parsed.
51+
see https://flaviocopes.com/javascript-async-defer/#with-defer-in-the-head
52+
{%- endcomment -%}
53+
{%- if page.landing == true -%}
54+
<!-- landing page scripts -->
55+
<script defer src="/js/theme-switcher.js"></script>
56+
<script defer src="/js/jquery.js"></script>
57+
<script defer src="/js/bootstrap.min.js"></script>
58+
<script defer src="/js/search.js"></script>
59+
{%- else -%}
60+
<script defer src="/js/theme-switcher.js"></script>
61+
<script defer src="/js/anchorlinks.js"></script>
62+
<script defer src="/js/jquery.js"></script>
63+
<script defer src="/js/bootstrap.min.js"></script>
64+
<script defer src="/js/docs.js"></script>
65+
<script defer src="/js/search.js"></script>
66+
{%- endif -%}
67+
4768
{%- comment -%}
4869
preload fonts: https://www.freecodecamp.org/news/web-fonts-in-2018-f191a48367e8/
4970
we only preload the "woff2" variants, as older formats (woff, eot) are only used
50-
by older browsers, and we don't optimize for those. For fontawesome we "prefetch"
51-
to allow the browser to pre-heat the cache, but not load it if the page does not
52-
use it.
71+
by older browsers, and we don't optimize for those.
5372
{%- endcomment -%}
54-
<link rel="prefetch" as="font" href="/fonts/fontawesome-webfont.woff2?v=4.7.0" type="font/woff2" crossorigin="anonymous">
55-
<link rel="preload" as="font" href="/fonts/glyphicons-halflings-regular.woff2" type="font/woff2" crossorigin="anonymous">
56-
<link rel="preload" as="font" href="/fonts/geomanist/hinted-Geomanist-Book.woff2" type="font/woff2" crossorigin="anonymous">
73+
<link rel="preload" as="font" href="/fonts/geomanist/hinted-Geomanist-Book.woff2" type="font/woff2" crossorigin="anonymous">
74+
<link rel="preload" as="font" href="/fonts/geomanist/hinted-Geomanist-Regular.woff2" type="font/woff2" crossorigin="anonymous">
75+
<link rel="preload" as="font" href="/fonts/glyphicons-halflings-regular.woff2" type="font/woff2" crossorigin="anonymous">
76+
<link rel="preload" as="font" href="/fonts/fontawesome-webfont.woff2?v=4.7.0" type="font/woff2" crossorigin="anonymous">
5777

5878
<link rel="stylesheet" href="/css/font-awesome.min.css">
5979
<link rel="stylesheet" href="/css/bootstrap.min.css">

_includes/side-menu.html

+2-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
<div id="navbar" class="nav-sidebar">
2-
<ul class="nav jsTOCHorizontal hidden-md hidden-lg">
3-
</ul>
4-
<div class="divider hidden-md hidden-lg"></div>
5-
<ul class="nav" id="jsTOCLeftNav">
6-
</ul>
2+
<ul class="nav jsTOCHorizontal hidden-md hidden-lg"></ul>
3+
<ul class="nav" id="jsTOCLeftNav"></ul>
74
</div>

_scss/_landing.scss

+6
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@ body.landing {
1313
}
1414

1515
.header {
16+
// Container holds both the top-navigation bar (div.navbar-header), and
17+
// the "hamburger menu" (div.navbar-collapse)
18+
>.container {
19+
background-color: $bg-header;
20+
}
21+
1622
@include md-width {
1723
.navbar-collapse.collapse {
1824
display: flex !important;

_scss/_night-mode.scss

+6
Original file line numberDiff line numberDiff line change
@@ -213,3 +213,9 @@ body.night {
213213
color: $white!important;
214214
}
215215
}
216+
217+
body.landing.night {
218+
.header>.container {
219+
background-color: $bg-header-night;
220+
}
221+
}

css/jquery-ui-insightera-custom-1.8.css

-1
This file was deleted.

fonts/comfortaa/demo.html

-213
This file was deleted.
-182 KB
Binary file not shown.

0 commit comments

Comments
 (0)