Skip to content

Commit 4444539

Browse files
author
Tim Bannister
committed
Customise footer for Kubernetes
1 parent e1e2c16 commit 4444539

File tree

3 files changed

+59
-10
lines changed

3 files changed

+59
-10
lines changed

assets/scss/_base.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -893,6 +893,11 @@ section#cncf {
893893
}
894894
}
895895

896+
footer.row {
897+
margin-left: initial;
898+
margin-right: initial;
899+
}
900+
896901
/* DOCUMENTATION */
897902

898903
// nav-tabs and tab-content

assets/scss/_custom.scss

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,45 @@ footer {
328328
color: #e9e9e9;
329329
}
330330

331+
// Custom footer sizing
332+
@media (min-width: 800px) and (max-width: 1279px) {
333+
footer {
334+
ul.footer-icons {
335+
min-width: 17.5vw;
336+
display: flex;
337+
flex-wrap: nowrap;
338+
flex-direction: row;
339+
justify-content: space-evenly;
340+
}
341+
.col-sm-2 {
342+
flex: 0 0 22.5%;
343+
max-width: 22.5%;
344+
}
345+
.footer-main.text-center {
346+
flex: 0 0 50%;
347+
max-width: 50%;
348+
}
349+
350+
}
351+
}
352+
353+
354+
@media (max-width: 799px) {
355+
footer ul.footer-icons {
356+
display: flex;
357+
flex-wrap: nowrap;
358+
flex-direction: column;
359+
align-items: flex-start;
360+
row-gap: 0.5em;
361+
}
362+
footer div.order-1 ul.footer-icons {
363+
margin-left: auto;
364+
}
365+
footer div.order-3 ul.footer-icons {
366+
margin-right: auto;
367+
}
368+
}
369+
331370
/* SIDE-DRAWER MENU */
332371

333372
.pi-pushmenu .sled {

layouts/partials/footer.html

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,32 +2,26 @@
22
<footer class="bg-dark py-5 row d-print-none">
33
<div class="container-fluid mx-sm-5">
44
<div class="row">
5-
<div class="col-6 col-sm-4 text-xs-center order-sm-2">
5+
{{ template "footer-main-block" . }}
6+
<div class="col col-sm-2 text-xs-center order-1">
67
{{ with $links }}
78
{{ with index . "user"}}
89
{{ template "footer-links-block" . }}
910
{{ end }}
1011
{{ end }}
1112
</div>
12-
<div class="col-6 col-sm-4 text-right text-xs-center order-sm-3">
13+
<div class="col col-sm-2 text-right text-xs-center order-3">
1314
{{ with $links }}
1415
{{ with index . "developer"}}
1516
{{ template "footer-links-block" . }}
1617
{{ end }}
1718
{{ end }}
1819
</div>
19-
<div class="col-12 col-sm-4 text-center py-2 order-sm-2">
20-
{{ with .Site.Params.copyright }}<small class="text-white">&copy; {{ now.Year}} {{ .}} {{ T "footer_all_rights_reserved" }}</small>{{ end }}
21-
{{ with .Site.Params.privacy_policy }}<small class="ml-1"><a href="{{ . }}" target="_blank" rel="noopener">{{ T "footer_privacy_policy" }}</a></small>{{ end }}
22-
{{ if not .Site.Params.ui.footer_about_disable }}
23-
{{ with .Site.GetPage "about" }}<p class="mt-2"><a href="{{ .RelPermalink }}">{{ .Title }}</a></p>{{ end }}
24-
{{ end }}
25-
</div>
2620
</div>
2721
</div>
2822
</footer>
2923
{{ define "footer-links-block" }}
30-
<ul class="list-inline mb-0">
24+
<ul class="list-inline mb-0 footer-icons">
3125
{{ range . }}
3226
<li class="list-inline-item mx-2 h3" data-toggle="tooltip" data-placement="top" title="{{ .name }}" aria-label="{{ .name }}">
3327
<a class="text-white" target="_blank" rel="noopener" href="{{ .url }}" aria-label="{{ .name }}">
@@ -37,3 +31,14 @@
3731
{{ end }}
3832
</ul>
3933
{{ end }}
34+
{{ define "footer-main-block" }}
35+
<div class="col-5 col-sm-7 text-center order-2 footer-main">
36+
<p><span class="copyright-notice">&copy; {{ now.Year}} {{ T "main_documentation_license" | safeHTML }}</span></p>
37+
<p><span class="copyright-notice">&copy; {{ now.Year }} {{ T "main_copyright_notice" | safeHTML }}</span></p>
38+
<p><span class="certification-notice">{{ T "china_icp_license" }} 京ICP备17074266号-3</span></p>
39+
{{ with .Site.Params.privacy_policy }}<p><span class="ml-1 privacy-policy"><a href="{{ . }}" target="_blank">{{ T "footer_privacy_policy" }}</a></span></p>{{ end }}
40+
{{ if not .Site.Params.ui.footer_about_disable }}
41+
{{ with .Site.GetPage "about" }}<p class="mt-2"><a href="{{ .RelPermalink }}">{{ .Title }}</a></p>{{ end }}
42+
{{ end }}
43+
</div>
44+
{{ end }}

0 commit comments

Comments
 (0)