Add tasks for all the new languages
This commit is contained in:
parent
9dc3c2bb62
commit
bba7bfd280
13208 changed files with 134745 additions and 0 deletions
|
|
@ -0,0 +1,26 @@
|
|||
;; styles -
|
||||
(style 'td "text-align:right")
|
||||
(style 'table "border-spacing: 10px;border:1px solid red")
|
||||
(style 'th "color:blue;")
|
||||
|
||||
;; generic html5 builder
|
||||
;; pushes <tag style=..> (proc content) </tag>
|
||||
(define (emit-tag tag html-proc content )
|
||||
(if (style tag)
|
||||
(push html (format "<%s style='%a'>" tag (style tag)))
|
||||
(push html (format "<%s>" tag )))
|
||||
(html-proc content)
|
||||
(push html (format "</%s> " tag )))
|
||||
|
||||
;; html procs : 1 tag, 1 proc
|
||||
(define (h-raw content)
|
||||
(push html (format "%s" content)))
|
||||
(define (h-header headers)
|
||||
(for ((h headers)) (emit-tag 'th h-raw h)))
|
||||
(define (h-row row)
|
||||
(for ((item row)) (emit-tag 'td h-raw item)))
|
||||
(define (h-table table )
|
||||
(emit-tag 'tr h-header (first table))
|
||||
;; add row-num i at head of row
|
||||
(for ((i 1000)(row (rest table))) (emit-tag 'tr h-row (cons i row))))
|
||||
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
(define my-table '(("" X Y Z) (-1111 111 11) (22 -222 2222) (4422 0 42) (33 333 3333) (6666 666 66)))
|
||||
|
||||
(stack (define html 'html)) ;; stack of html elements
|
||||
(emit-tag 'table h-table my-table)
|
||||
(string-join (stack->list html) " ")
|
||||
Loading…
Add table
Add a link
Reference in a new issue