Basic grid layout.
This commit is contained in:
parent
d77beadf91
commit
3e5251608d
2 changed files with 80 additions and 62 deletions
|
@ -473,7 +473,7 @@ util-list.import.scm: $(UTIL-LIST-SOURCES)
|
|||
EXPORT-WEB-STATIC-SOURCES=export-web-static.scm brmember.import.scm \
|
||||
util-dir.import.scm mbase.import.scm \
|
||||
members-payments.import.scm cal-day.import.scm \
|
||||
util-git.import.scm configuration.import.scm
|
||||
util-git.import.scm configuration.import.scm texts.import.scm
|
||||
|
||||
export-web-static.o: export-web-static.import.scm
|
||||
export-web-static.import.scm: $(EXPORT-WEB-STATIC-SOURCES)
|
||||
|
|
|
@ -42,7 +42,8 @@
|
|||
members-payments
|
||||
cal-day
|
||||
util-git
|
||||
configuration)
|
||||
configuration
|
||||
texts)
|
||||
|
||||
;; HTML entities
|
||||
(define (sanitize-html str)
|
||||
|
@ -52,31 +53,37 @@
|
|||
|
||||
;; Prints the HTML summary for given member to current-output-port
|
||||
(define (print-html-member mr)
|
||||
(let ((bhs (brmember-balance-history mr)))
|
||||
(print "<!DOCTYPE html>")
|
||||
(print "<html>")
|
||||
(print "<head>")
|
||||
(print "<meta charset=\"utf-8\">")
|
||||
(print "<title>Brmlab member "
|
||||
(brmember-nick mr)
|
||||
"</title>")
|
||||
(print "<style>")
|
||||
(print "body{padding:0px;margin:0px}")
|
||||
(print "h1{padding:0px;margin:0px;text-indent:10px}")
|
||||
(print "h1:after{display:block;border-top:1px solid #8cacbb;border-bottom:1px solid #8cacbb;padding:10px;content:\"\";background:#dee7ec;height:10px;padding:0px}")
|
||||
(print "table{border-collapse:collapse;border:1px solid grey}")
|
||||
(print "td,th{border:1px solid grey}")
|
||||
(print ".r{text-align:right}")
|
||||
(print ".gc{display:grid}")
|
||||
(print ".gl{grid-column:1}")
|
||||
(print ".gr{grid-column:2}")
|
||||
(print "footer{background:#dee7ec;border-top:1px solid #8cacbb;padding:10px}")
|
||||
(print "</style>")
|
||||
(print "</head>")
|
||||
(print "<body>")
|
||||
(print "<h1>Brmlab member " (brmember-nick mr) "</h1>")
|
||||
(print "<hr>")
|
||||
(print "<div class=\"gc\">")
|
||||
(print "<div class=\"gl\">")
|
||||
(print "<dl>")
|
||||
(print "<dt>Nick:</dt><dd>" (brmember-nick mr) "</dd>")
|
||||
(print "<dt>Id:</dt><dd>" (brmember-id mr) "</dd>")
|
||||
(print "<dt>Balance:</dt><dd>" (caar (reverse bhs)) "</dd>")
|
||||
(print "</dl>")
|
||||
(print "<hr>")
|
||||
(print "<h2>Member file</h2>")
|
||||
(print "<pre>")
|
||||
(print (sanitize-html
|
||||
(string-intersperse (brmember-source mr) "\n")))
|
||||
(print "</pre>")
|
||||
(print "<hr>")
|
||||
(print "<h2>Payments history</h2>")
|
||||
(print "<table>")
|
||||
(print "<thead><tr><th>Date</th><th>Type</th><th>Comment</th><th>Amount</th><th>Currency</th><th>Amount [CZK]</th><th>Balance</th></tr></thead>")
|
||||
|
@ -98,9 +105,17 @@
|
|||
(exact->inexact (car hr))
|
||||
"</td></tr>"
|
||||
))
|
||||
(brmember-balance-history mr))
|
||||
bhs)
|
||||
(print "</tbody>")
|
||||
(print "</table>")
|
||||
(print "</div>")
|
||||
(print "<div class=\"gr\">")
|
||||
(print "<hr>")
|
||||
(print "<h2>Member file</h2>")
|
||||
(print "<pre>")
|
||||
(print (sanitize-html
|
||||
(string-intersperse (brmember-source mr) "\n")))
|
||||
(print "</pre>")
|
||||
(print "<hr>")
|
||||
(print "<h2>Member File Git Log</h2>")
|
||||
(print "<pre>")
|
||||
|
@ -110,8 +125,11 @@
|
|||
'log '-p '--
|
||||
(brmember-file-name mr)))
|
||||
(print "</pre>")
|
||||
(print "</div>")
|
||||
(print "</div>")
|
||||
(print "<footer>Generated by " banner-line "</footer>")
|
||||
(print "</body>")
|
||||
(print "</html>"))
|
||||
(print "</html>")))
|
||||
|
||||
;; Generates a single member in given directory
|
||||
(define (gen-html-member mr dir)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue