[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[no subject]
From: |
Ludovic Courtès |
Date: |
Sat, 15 Jul 2023 16:30:00 -0400 (EDT) |
branch: master
commit 160df0e6e9e9076e6ec954d92b25ad77685a425f
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Sat Jul 15 19:28:20 2023 +0200
templates: Hide badges that are zero.
This avoids cluttering evaluation tables with zeros (zero scheduled
builds, zero failures, etc.).
* src/cuirass/templates.scm (build-counter-badge): Add the "hidden"
class when VALUE is 0.
* src/static/css/cuirass.css (.hidden): New class.
---
src/cuirass/templates.scm | 6 ++++--
src/static/css/cuirass.css | 4 ++++
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/cuirass/templates.scm b/src/cuirass/templates.scm
index 5b08742..82ba2f1 100644
--- a/src/cuirass/templates.scm
+++ b/src/cuirass/templates.scm
@@ -1271,10 +1271,12 @@ the nearest exact even integer."
#:optional link)
(if link
`(a (@ (href ,link)
- (class "badge " ,class " badge-counter")
+ (class "badge " ,class " badge-counter"
+ ,(if (eqv? 0 value) " hidden" ""))
(title ,title))
,value)
- `(div (@ (class "badge " ,class " badge-counter")
+ `(div (@ (class "badge " ,class " badge-counter"
+ ,(if (eqv? 0 value) " hidden" ""))
(title ,title))
,value)))
diff --git a/src/static/css/cuirass.css b/src/static/css/cuirass.css
index 08e87a3..f4aec2d 100644
--- a/src/static/css/cuirass.css
+++ b/src/static/css/cuirass.css
@@ -61,6 +61,10 @@ body {
min-width: 25px;
}
+.hidden {
+ visibility: hidden;
+}
+
div.tooltip {
position: absolute;
opacity:0.8;
- master updated (ee8b6b2 -> 6f047c6), Ludovic Courtès, 2023/07/15
- [no subject], Ludovic Courtès, 2023/07/15
- [no subject],
Ludovic Courtès <=
- [no subject], Ludovic Courtès, 2023/07/15
- [no subject], Ludovic Courtès, 2023/07/15
- [no subject], Ludovic Courtès, 2023/07/15
- [no subject], Ludovic Courtès, 2023/07/15