From 567f6571d3ebf5e605e66b4cf840f958e136e26a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Commaille?= Date: Mon, 18 Nov 2024 14:51:17 +0100 Subject: [PATCH] Update footer partial MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Kévin Commaille --- assets/scss/_styles_project.scss | 5 +++- config.toml | 17 +++++++------ layouts/partials/footer.html | 39 ----------------------------- layouts/partials/footer/center.html | 30 ++++++++++++++++++++++ 4 files changed, 44 insertions(+), 47 deletions(-) delete mode 100644 layouts/partials/footer.html create mode 100644 layouts/partials/footer/center.html diff --git a/assets/scss/_styles_project.scss b/assets/scss/_styles_project.scss index 5081d8e8..9b020715 100644 --- a/assets/scss/_styles_project.scss +++ b/assets/scss/_styles_project.scss @@ -122,8 +122,11 @@ Custom SCSS for the Matrix spec } /* Customise footer */ -footer { +.td-footer { box-shadow: 0px 0px 8px rgba(179, 179, 179, 0.25); + padding-top: 2rem; + color: var(--bs-body-color); + background-color: var(--bs-body-color-bg); } /* Auto numbering for headings */ diff --git a/config.toml b/config.toml index 2494ad1e..5315829c 100644 --- a/config.toml +++ b/config.toml @@ -55,7 +55,6 @@ description = "Home of the Matrix specification for decentralised communication" [params] copyright = "The Matrix.org Foundation CIC" -privacy_policy = "https://matrix.org/legal/privacy-notice" [params.version] # must be one of "unstable", "current", "historical" @@ -71,8 +70,6 @@ current_version_url = "https://spec.matrix.org/latest" # User interface configuration [params.ui] -# Set to true to disable the About link in the site footer -footer_about_disable = false # Collapse HTTP API and event
elements rendered_data_collapsed = false # Hide the search entry in the sidebar @@ -88,22 +85,28 @@ sidebar_menu_compact = true # icon = "fa fa-envelope" # desc = "Discussion and help from your fellow users" # Developer relevant links. These will show up on right side of footer and in the community page if you have one. -[[params.links.developer]] +# [[params.links.developer]] +# name = "GitHub" +# url = "https://github.com/matrix-org" +# icon = "fab fa-github" +# desc = "Matrix on GitHub" +# Custom links shown in the center of the footer. (Only supported by our fork of docsy's 'footer/central' partial.) +[[params.links.bottom]] name = "GitHub" url = "https://github.com/matrix-org" icon = "fab fa-github" desc = "Matrix on GitHub" -[[params.links.developer]] +[[params.links.bottom]] name = "GitLab" url = "https://gitlab.matrix.org/matrix-org" icon = "fab fa-gitlab" desc = "Matrix on GitLab" -[[params.links.developer]] +[[params.links.bottom]] name = "YouTube" url = "https://www.youtube.com/channel/UCVFkW-chclhuyYRbmmfwt6w" icon = "fab fa-youtube" desc = "Matrix YouTube channel" -[[params.links.developer]] +[[params.links.bottom]] name = "Twitter" url = "https://twitter.com/matrixdotorg" icon = "fab fa-twitter" diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html deleted file mode 100644 index 3506f834..00000000 --- a/layouts/partials/footer.html +++ /dev/null @@ -1,39 +0,0 @@ -{{/* - - A modified version of the footer.html partial in Docsy. - -*/}} - -{{ $links := .Site.Params.links }} -
-
-
-
- {{ with $links }} - {{ with index . "developer"}} - {{ template "footer-links-block" . }} - {{ end }} - {{ end }} -
-
-
-
- {{ with .Site.Params.copyright }}© {{ now.Year}} {{ .}}{{ end }} - {{ if not .Site.Params.ui.footer_about_disable }} - {{ with .Site.GetPage "about" }}

{{ .Title }}

{{ end }} - {{ end }} -
-
-
-
-{{ define "footer-links-block" }} -
    - {{ range . }} -
  • - - - -
  • - {{ end }} -
-{{ end }} diff --git a/layouts/partials/footer/center.html b/layouts/partials/footer/center.html new file mode 100644 index 00000000..cd3f04e0 --- /dev/null +++ b/layouts/partials/footer/center.html @@ -0,0 +1,30 @@ +{{- /* + + Modified version of the footer/center.html partial of Docsy, adding "bottom" + links on top of the copyright. + +*/ -}} + +{{ with .Site.Params.links -}} + {{ with index . "bottom" -}} + {{- partial "footer/links.html" . -}} + {{ end -}} +{{ end -}} + +
+{{ partial "footer/copyright.html" . -}} +
+ +{{ with .Site.Params.privacy_policy -}} + {{ T "footer_privacy_policy" }} +{{- end -}} + +{{ if ne .Site.Params.ui.footer_about_disable nil -}} + {{ warnf "Config parameter '.params.ui.footer_about_disable' is DEPRECATED, use '.params.ui.footer_about_enable' instead." -}} +{{ end -}} + +{{ if or .Site.Params.ui.footer_about_enable (eq .Site.Params.ui.footer_about_disable false) -}} + {{ with .Site.GetPage "about" -}} + + {{- end -}} +{{ end -}} \ No newline at end of file