simplify legend

master
Matthew Butterick 6 years ago
parent 00ad6225c3
commit 213c6cf384

@ -1,6 +1,9 @@
#lang racket/base #lang racket/base
(require racket/dict "sku.rkt") (require racket/dict
(provide (all-defined-out) (all-from-out "sku.rkt")) racket/match
"sku.rkt")
(provide (all-defined-out)
(all-from-out "sku.rkt"))
(define (round-cents float) (define (round-cents float)
@ -54,15 +57,14 @@
(table-row row 'th)) (table-row row 'th))
`(table ((class "buy-table")) `(table ((class "buy-table"))
,(table-header (car grid)) ,(table-header (car grid))
,@(map table-row (cdr grid)))) ,@(map table-row (cdr grid))))
(define (people->string p) (define (people->string p)
(define p-string (format "~a" (string-append (match p
(if (<= p 10) [2 "12"]
(list-ref '(zero one two three four five six seven eight nine ten) p) [5 "35"]
p))) [10 "610"]) " people"))
(string-append "up to " p-string " " (if (= p 1) "person" "people")))
(require txexpr racket/string) (require txexpr racket/string)
(define (textify x) (define (textify x)

@ -490,6 +490,7 @@ text-align: center;
th { th {
font-family: "concourse-c4"; font-family: "concourse-c4";
font-feature-settings: 'c2sc' 1;
font-weight: normal; font-weight: normal;
text-transform: lowercase; text-transform: lowercase;
font-size: 85%; font-size: 85%;