[gimp-web-devel/pat/bootstrap] i18n, layouts: add more links to the footer.



commit 2a741de41a71bb9ce51ae8b0c1c750b6d30631a7
Author: Jehan <jehan girinstud io>
Date:   Tue Sep 6 13:10:29 2022 +0200

    i18n, layouts: add more links to the footer.
    
    First add links to other GIMP-related websites, in particular, the GIMP,
    GEGL and documentation website.
    
    Second, add all links from the footer menu (currently FAQ and About
    page).
    
    I am not fond of the render, especially in mobile view ("responsive"),
    but even in the desktop view. I'll let Patdavid handle making this
    prettier.

 i18n/en.yaml                      |  9 +++++++++
 layouts/partials/page-footer.html | 20 +++++++++++++++++---
 2 files changed, 26 insertions(+), 3 deletions(-)
---
diff --git a/i18n/en.yaml b/i18n/en.yaml
index cca3b1e..5d2da49 100644
--- a/i18n/en.yaml
+++ b/i18n/en.yaml
@@ -15,3 +15,12 @@
 
 - id: current
   translation: "(Current)"
+
+- id: GIMPWebsite
+  translation: "GIMP Website"
+
+- id: GEGLWebsite
+  translation: "GEGL Website"
+
+- id: DocsWebsite
+  translation: "User Documentation"
diff --git a/layouts/partials/page-footer.html b/layouts/partials/page-footer.html
index 246fb6c..32126b7 100644
--- a/layouts/partials/page-footer.html
+++ b/layouts/partials/page-footer.html
@@ -1,9 +1,23 @@
 <footer class='container '>
   <div class='row justify-content-center'>
-    <div class='col-lg-8 text-center'>
-      <p>
+    <div class='col-sm text-right'>
+        <a href="http://www.gimp.org/";>{{ i18n "GIMPWebsite" }}</a> |
+        <a href="http://www.gegl.org/";>{{ i18n "GEGLWebsite" }}</a> |
+        <a href="https://docs.gimp.org/";>{{ i18n "DocsWebsite" }}</a>
+    </div>
+    <div class='col-sm text-center'>
         &copy; {{ i18n "copyright" }} 2003-{{ now.Format "2006" }} {{ i18n "copyrightEntity" }}
-      </p>
+    </div>
+    <div class='col-sm text-right'>
+       {{ $currentPage := . }}
+       {{ $links := (.Site.Menus.footer) }}
+       {{ $len := (len $links) }}
+       {{ range $index, $element := $links }}
+         <a href="{{ .URL }}" title="{{ .Title }}">{{ .Name }}</a>
+         {{ if ne (add $index 1) $len }}
+           |
+         {{ end }}
+       {{ end }}
     </div>
   </div>
 </footer>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]