You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by bd...@apache.org on 2021/07/22 08:23:00 UTC

[sling-site] branch master updated: SLING-7534 - add sha512 links and warn that not all sha* links work now

This is an automated email from the ASF dual-hosted git repository.

bdelacretaz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-site.git


The following commit(s) were added to refs/heads/master by this push:
     new bc6efc0  SLING-7534 - add sha512 links and warn that not all sha* links work now
bc6efc0 is described below

commit bc6efc08c83cdfcb6f00ee7f325626827885926e
Author: Bertrand Delacretaz <bd...@apache.org>
AuthorDate: Thu Jul 22 10:22:19 2021 +0200

    SLING-7534 - add sha512 links and warn that not all sha* links work now
---
 src/main/jbake/assets/res/css/site.css |  9 +++++++++
 src/main/jbake/templates/downloads.tpl | 37 ++++++++++++++++++++++++----------
 2 files changed, 35 insertions(+), 11 deletions(-)

diff --git a/src/main/jbake/assets/res/css/site.css b/src/main/jbake/assets/res/css/site.css
index b094afa..7f40658 100644
--- a/src/main/jbake/assets/res/css/site.css
+++ b/src/main/jbake/assets/res/css/site.css
@@ -135,3 +135,12 @@ code {
 .content pre code {
     border: 1px solid #cde0ea;
 }
+
+.footnoteLink {
+    size:80%;
+    color: grey;
+}
+
+.digestLinks {
+    font-size: 80%;
+}
\ No newline at end of file
diff --git a/src/main/jbake/templates/downloads.tpl b/src/main/jbake/templates/downloads.tpl
index 7c9db16..0db76ea 100644
--- a/src/main/jbake/templates/downloads.tpl
+++ b/src/main/jbake/templates/downloads.tpl
@@ -324,11 +324,15 @@ def downloadLink(label, artifact, version, suffix) {
 	def digestsBase = "https://downloads.apache.org/${path}"
 
 	a(href:"[preferred]${path}", label)
-	yield " ("
-	a(href:"${digestsBase}.asc", "asc")
-	yield ", "
-	a(href:"${digestsBase}.sha1", "sha1")
-	yield ")"
+  span(class:"digestLinks") {
+    yield(" (")
+    a(href:"${digestsBase}.asc", "asc")
+    yield ", "
+    a(href:"${digestsBase}.sha1", "sha1")
+    yield ", "
+    a(href:"${digestsBase}.sha512", "sha512")
+    yield(")")
+  }
 	newLine()
 }
 
@@ -363,6 +367,17 @@ def tableHead(String [] headers) {
 
 }
 
+def sectionHeader(String title) {
+  h3(title)
+  div(class:"footnoteLink") {
+    yield("Not all sha* links work (")
+    a(href:"https://issues.apache.org/jira/browse/SLING-7534") { 
+      yield "SLING-7534"
+    }
+    yield("), sha512 is preferred if available")
+  }
+}
+
  // ------------------------------------------------------------------------------------------------
 // Downloads page layout
 // ------------------------------------------------------------------------------------------------
@@ -381,7 +396,7 @@ layout 'layout/main.tpl', true,
                     section(class:"wrap"){
                         yieldUnescaped U.processBody(content, config)
 
-						h3("Sling Application")
+						sectionHeader("Sling Application")
 						table(class:"table") {
 							tableHead("Artifact", "Version", "GitHub", "Provides", "Package")
 							tbody() {
@@ -403,7 +418,7 @@ layout 'layout/main.tpl', true,
 							}
 						}
 
-						h3("Sling IDE Tooling")
+						sectionHeader("Sling IDE Tooling")
 						table(class:"table") {
 							tableHead("Artifact", "Version", "Provides", "Update Site")
 							tbody() {
@@ -422,7 +437,7 @@ layout 'layout/main.tpl', true,
 							}
 						}
 
-						h3("Sling Components")
+						sectionHeader("Sling Components")
 						table(class:"table") {
 							tableHead("Artifact", "Version", "GitHub", "Binary", "Source")
 							tbody() {
@@ -449,7 +464,7 @@ layout 'layout/main.tpl', true,
 							}
 						}
 
-						h3("Maven Plugins")
+						sectionHeader("Maven Plugins")
 						table(class:"table") {
 							tableHead("Artifact", "Version", "GitHub", "Binary", "Source")
 							tbody() {
@@ -475,7 +490,7 @@ layout 'layout/main.tpl', true,
 							}
 						}
 
-						h3("bnd Plugins")
+						sectionHeader("bnd Plugins")
 						table(class:"table") {
 							tableHead("Artifact", "Version", "GitHub", "Binary", "Source")
 							tbody() {
@@ -501,7 +516,7 @@ layout 'layout/main.tpl', true,
 							}
 						}
 
-						h3("Deprecated")
+						sectionHeader("Deprecated")
 						table(class:"table") {
 							tableHead("Artifact", "Replacement", "Version", "Binary", "Source")
 							tbody() {