[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: templates: Add javascript licenses page.
From: |
Mathieu Othacehe |
Subject: |
branch master updated: templates: Add javascript licenses page. |
Date: |
Thu, 02 Dec 2021 04:55:19 -0500 |
This is an automated email from the git hooks/post-receive script.
mothacehe pushed a commit to branch master
in repository guix-cuirass.
The following commit(s) were added to refs/heads/master by this push:
new 8726ef9 templates: Add javascript licenses page.
8726ef9 is described below
commit 8726ef9c6572cd07eafd96fce76fd329e9faf469
Author: Mathieu Othacehe <othacehe@gnu.org>
AuthorDate: Thu Dec 2 10:53:52 2021 +0100
templates: Add javascript licenses page.
Fixes: <https://issues.guix.gnu.org/51145>.
* src/cuirass/templates.scm (javascript-licenses): New procedure.
* src/cuirass/http.scm (url-handler): New /static/about/javascript route.
---
src/cuirass/http.scm | 4 ++++
src/cuirass/templates.scm | 47 ++++++++++++++++++++++++++++++++++++++++++++++-
2 files changed, 50 insertions(+), 1 deletion(-)
diff --git a/src/cuirass/http.scm b/src/cuirass/http.scm
index 251498d..3eaf0fb 100644
--- a/src/cuirass/http.scm
+++ b/src/cuirass/http.scm
@@ -1140,6 +1140,10 @@ passed, only display JOBS targeting this SYSTEM."
(respond-html
(machine-page name)))
+ (('GET "static" "about" "javascript")
+ (respond-html
+ (javascript-licenses)))
+
(('GET "static" path ...)
(respond-static-file path))
(_
diff --git a/src/cuirass/templates.scm b/src/cuirass/templates.scm
index d8e1392..91d9a4d 100644
--- a/src/cuirass/templates.scm
+++ b/src/cuirass/templates.scm
@@ -54,7 +54,8 @@
workers-status
machine-status
evaluation-dashboard
- badge-svg))
+ badge-svg
+ javascript-licenses))
(define (navigation-items navigation)
(match navigation
@@ -148,6 +149,10 @@ system whose names start with " (code "guile-") ":" (br)
(title ,title))
(body
(header
+ (a (@ (href "/static/about/javascript")
+ (rel "jslicense")
+ (class "d-none"))
+ "Javascript license information")
(nav (@ (class "navbar navbar-expand-lg navbar-light bg-light"))
(a (@ (class "navbar-brand pt-0")
(href "/"))
@@ -2003,3 +2008,43 @@ content as a string."
`(("X%" ,percentage-str)
("_name" ,spec))))))
(badge-string "badge-error.svg")))
+
+(define (javascript-licenses)
+ "Return the Javascript licenses table, for compatibility with LibreJS. See:
+https://www.gnu.org/software/librejs/free-your-javascript.html."
+ '((table
+ (@ (id "jslicense-labels1"))
+ (tr
+ (td (a (@ (href "/static/js/popper.min.js")) "popper.min.js"))
+ (td (a (@ (href
"https://github.com/popperjs/popper-core/blob/master/LICENSE.md"))
+ "Expat"))
+ (td (a (@ (href "/static/js/popper.min.js")) "popper.js") ))
+ (tr
+ (td (a (@ (href "/static/js/datatables.min.js")) "datatables.min.js"))
+ (td (a (@ (href "https://datatables.net/license/mit")) "Expat"))
+ (td (a (@ (href
"https://cdn.datatables.net/1.10.24/js/dataTables.bootstrap.js"))
+ "dataTables.bootstrap.js")))
+ (tr
+ (td (a (@ (href "/static/js/d3.v6.min.js")) "d3.v6.min.js"))
+ (td (a (@ (href "https://raw.githubusercontent.com/d3/d3/main/LICENSE"))
+ "BSD-3-Clause"))
+ (td (a (@ (href "https://github.com/d3/d3/releases/tag/v6.6.2"))
+ "d3.js")))
+ (tr
+ (td (a (@ (href "/static/js/choices.min.js")) "choices.min.js"))
+ (td (a (@ (href
"https://github.com/Choices-js/Choices/blob/master/LICENSE"))
+ "Expat"))
+ (td (a (@ (href
"http://libs.wware.org/choices.js/9.0.1/scripts/choices.js"))
+ "choices.js")))
+ (tr
+ (td (a (@ (href "/static/js/chart.js")) "chart.js"))
+ (td (a (@ (href
"https://github.com/chartjs/Chart.js/blob/master/LICENSE.md"))
+ "Expat"))
+ (td (a (@ (href
"https://github.com/chartjs/Chart.js/releases/tag/v2.9.3"))
+ "Chart.js")))
+ (tr
+ (td (a (@ (href "/static/js/bootstrap.min.js")) "bootstrap.min.js"))
+ (td (a (@ (href "https://github.com/twbs/bootstrap/blob/master/LICENSE"))
+ "Expat"))
+ (td (a (@ (href
"https://github.com/twbs/bootstrap/releases/download/v4.2.1/bootstrap-4.2.1-dist.zip"))
+ "bootstrap.js"))))))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: templates: Add javascript licenses page.,
Mathieu Othacehe <=