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

zregvart pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-website.git


The following commit(s) were added to refs/heads/main by this push:
     new 7bea8fb  chore: add row for empty data on security page
7bea8fb is described below

commit 7bea8fbad8486a855c295e74b736b271b312cc34
Author: Zoran Regvart <[email protected]>
AuthorDate: Thu Dec 9 09:56:43 2021 +0100

    chore: add row for empty data on security page
    
    To appear the data on the security page is up to date add a row for any
    year from now till the latest reported security issue indicating that no
    issues were reported in that year. Also cleans up the table so that the
    CVE number doesn't word-wrap.
    
    Fixes #710
---
 antora-ui-camel/src/css/security.css |  7 +++++++
 antora-ui-camel/src/css/site.css     |  1 +
 layouts/security/list.html           | 14 ++++++++++++--
 3 files changed, 20 insertions(+), 2 deletions(-)

diff --git a/antora-ui-camel/src/css/security.css 
b/antora-ui-camel/src/css/security.css
new file mode 100644
index 0000000..ca4db75
--- /dev/null
+++ b/antora-ui-camel/src/css/security.css
@@ -0,0 +1,7 @@
+.security td:only-child {
+  text-align: center;
+}
+
+.security td:first-child {
+  white-space: nowrap;
+}
diff --git a/antora-ui-camel/src/css/site.css b/antora-ui-camel/src/css/site.css
index 93a5c3c..11b1862 100644
--- a/antora-ui-camel/src/css/site.css
+++ b/antora-ui-camel/src/css/site.css
@@ -28,3 +28,4 @@
 @import 'download.css';
 @import 'catalog.css';
 @import 'sharingbuttons.css';
+@import 'security.css';
diff --git a/layouts/security/list.html b/layouts/security/list.html
index d6cd803..962b234 100644
--- a/layouts/security/list.html
+++ b/layouts/security/list.html
@@ -2,7 +2,7 @@
 
 <div class="body">
     <main>
-        <article class="static doc">
+        <article class="static doc security">
 
             {{ .Content }}
             <div class="table-wrapper">
@@ -18,7 +18,17 @@
                   </tr>
                 </thead>
                 <tbody>
-              {{ range .Pages.GroupByDate "2006" "desc" }}
+              {{ $pages := .Pages.GroupByDate "2006" "desc" }}
+              {{ $latest_year := (index $pages 0).Key }}
+              {{ range seq (now.Format "2006") (add (int $latest_year) 1) }}
+                  <tr>
+                    <th colspan="5" scope="row"><strong>{{ . }}</strong></th>
+                  </tr>
+                  <tr>
+                    <td colspan="5"><em>No issues reported</em></td>
+                  </tr>
+              {{ end }}
+              {{ range $pages }}
                   <tr>
                     <th colspan="5" scope="row"><strong>{{ .Key 
}}</strong></th>
                   </tr>

Reply via email to