-
Notifications
You must be signed in to change notification settings - Fork 14.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #47789 from sftim/20240904_docsy_friendly_footer
Use Docsy friendly footer
- Loading branch information
Showing
3 changed files
with
78 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,44 @@ | ||
{{ $links := .Site.Params.links }} | ||
<footer class="d-print-none"> | ||
<div class="footer__links"> | ||
<nav> | ||
{{ with site.GetPage "page" "docs/tutorials/stateless-application/hello-minikube" }}<a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a>{{ end }} | ||
{{ $sections := slice "docs/home" "blog" "training" "partners" "community" "case-studies" }} | ||
{{ range $sections }} | ||
{{ with site.GetPage "section" . }}<a class="text-white" href="{{ .RelPermalink }}">{{ .LinkTitle }}</a>{{ end }} | ||
{{ end }} | ||
</nav> | ||
</div> | ||
<div class="container-fluid"> | ||
<footer class="bg-dark py-5 row d-print-none"> | ||
<div class="container-fluid mx-sm-5"> | ||
<div class="row"> | ||
<div class="col-6 col-sm-2 text-xs-center order-sm-2"> | ||
{{ template "footer-main-block" . }} | ||
<div class="col col-sm-2 text-xs-center order-1"> | ||
{{ with $links }} | ||
{{ with index . "user"}} | ||
{{ template "footer-links-block" . }} | ||
{{ end }} | ||
{{ end }} | ||
</div> | ||
<div class="col-6 col-sm-2 text-right text-xs-center order-sm-3"> | ||
<div class="col col-sm-2 text-right text-xs-center order-3"> | ||
{{ with $links }} | ||
{{ with index . "developer"}} | ||
{{ template "footer-links-block" . }} | ||
{{ end }} | ||
{{ end }} | ||
</div> | ||
<div class="col-12 col-sm-8 text-center order-sm-2"> | ||
{{ with .Site.Params.copyright_k8s }}<small class="text-white">© {{ now.Year}} {{ T "main_documentation_license" | safeHTML }}</small>{{ end }} | ||
<br/> | ||
{{ with .Site.Params.copyright_linux }}<small class="text-white">Copyright © {{ now.Year }} {{ T "main_copyright_notice" | safeHTML }}</small>{{ end }} | ||
<br/> | ||
<small class="text-white">{{ T "china_icp_license" }} 京ICP备17074266号-3</small> | ||
{{ with .Site.Params.privacy_policy }}<small class="ml-1"><a href="{{ . }}" target="_blank">{{ T "footer_privacy_policy" }}</a></small>{{ end }} | ||
{{ if not .Site.Params.ui.footer_about_disable }} | ||
{{ with .Site.GetPage "about" }}<p class="mt-2"><a href="{{ .RelPermalink }}">{{ .Title }}</a></p>{{ end }} | ||
{{ end }} | ||
</div> | ||
</div> | ||
</div> | ||
</footer> | ||
{{ define "footer-links-block" }} | ||
<ul class="list-inline mb-0"> | ||
<ul class="list-inline mb-0 footer-icons"> | ||
{{ range . }} | ||
<li class="list-inline-item mx-2 h3" data-toggle="tooltip" data-placement="top" title="{{ .name }}" aria-label="{{ .name }}"> | ||
<a class="text-white" target="_blank" href="{{ .url }}"> | ||
<a class="text-white" target="_blank" rel="noopener" href="{{ .url }}" aria-label="{{ .name }}"> | ||
<i class="{{ .icon }}"></i> | ||
</a> | ||
</li> | ||
{{ end }} | ||
</ul> | ||
{{ end }} | ||
{{ define "footer-main-block" }} | ||
<div class="col-5 col-sm-7 text-center order-2 footer-main"> | ||
<p><span class="copyright-notice">© {{ now.Year}} {{ T "main_documentation_license" | safeHTML }}</span></p> | ||
<p><span class="copyright-notice">© {{ now.Year }} {{ T "main_copyright_notice" | safeHTML }}</span></p> | ||
<p><span class="certification-notice">{{ T "china_icp_license" }} 京ICP备17074266号-3</span></p> | ||
{{ with .Site.Params.privacy_policy }}<p><span class="ml-1 privacy-policy"><a href="{{ . }}" target="_blank">{{ T "footer_privacy_policy" }}</a></span></p>{{ end }} | ||
{{ if not .Site.Params.ui.footer_about_disable }} | ||
{{ with .Site.GetPage "about" }}<p class="mt-2"><a href="{{ .RelPermalink }}">{{ .Title }}</a></p>{{ end }} | ||
{{ end }} | ||
</div> | ||
{{ end }} |