aboutsummaryrefslogtreecommitdiff
path: root/guix-data-service/web
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2019-06-20 14:19:11 +0200
committerChristopher Baines <mail@cbaines.net>2019-06-20 14:19:11 +0200
commitbb0251160730a36488185eefe16e35f611ecc655 (patch)
tree63d84ccec557428e9aaddad99516ff0c6e100102 /guix-data-service/web
parent66364207f4da62f6de063c70f95f28186973f6c9 (diff)
downloaddata-service-bb0251160730a36488185eefe16e35f611ecc655.tar
data-service-bb0251160730a36488185eefe16e35f611ecc655.tar.gz
Don't have all the inputs use a monospace font
Only those where it's appropriate for the data, like commit hashes.
Diffstat (limited to 'guix-data-service/web')
-rw-r--r--guix-data-service/web/view/html.scm37
1 files changed, 24 insertions, 13 deletions
diff --git a/guix-data-service/web/view/html.scm b/guix-data-service/web/view/html.scm
index 6e7fa62..3e66bd2 100644
--- a/guix-data-service/web/view/html.scm
+++ b/guix-data-service/web/view/html.scm
@@ -102,6 +102,7 @@
help-text
required?
options
+ font-family
(type "text"))
(define (value->text value)
(match value
@@ -133,7 +134,10 @@
(@ (class "col-sm-9"))
,(if options
`(select (@ (class "form-control")
- (style "font-family: monospace;")
+ (style ,(if font-family
+ (string-append
+ "font-family: " font-family ";")
+ ""))
(multiple #t)
(id ,input-id)
,@(if show-help-span?
@@ -149,22 +153,25 @@
(_ '()))))
(map (match-lambda
- ((option-value)
- `(option
- (@ ,@(if (member option-value selected-options)
- '((selected ""))
- '()))
- ,(value->text option-value)))
((option-label . option-value)
`(option
(@ ,@(if (member option-value selected-options)
'((selected ""))
'())
(value ,option-value))
- ,(value->text option-label))))
+ ,(value->text option-label)))
+ (option-value
+ `(option
+ (@ ,@(if (member option-value selected-options)
+ '((selected ""))
+ '()))
+ ,(value->text option-value))))
options)))
`(input (@ (class "form-control")
- (style "font-family: monospace;")
+ (style ,(if font-family
+ (string-append
+ "font-family: " font-family ";")
+ ""))
(id ,input-id)
(type ,type)
,@(if required?
@@ -1318,19 +1325,23 @@
,(form-horizontal-control
"Base commit" query-parameters
#:required? #t
- #:help-text "The commit to use as the basis for the comparison.")
+ #:help-text "The commit to use as the basis for the comparison."
+ #:font-family "monospace")
,(form-horizontal-control
"Target commit" query-parameters
#:required? #t
- #:help-text "The commit to compare against the base commit.")
+ #:help-text "The commit to compare against the base commit."
+ #:font-family "monospace")
,(form-horizontal-control
"System" query-parameters
#:options valid-systems
- #:help-text "Only include derivations for this system.")
+ #:help-text "Only include derivations for this system."
+ #:font-family "monospace")
,(form-horizontal-control
"Target" query-parameters
#:options valid-systems
- #:help-text "Only include derivations that are build for this system.")
+ #:help-text "Only include derivations that are build for this system."
+ #:font-family "monospace")
,(form-horizontal-control
"Build status" query-parameters
#:options valid-build-statuses