what if we sexp'd the css too
is this good (also, sorted the imports for no important reason)
This commit is contained in:
parent
f315cd9237
commit
8fb927143f
1 changed files with 51 additions and 49 deletions
82
main.scm
82
main.scm
|
@ -1,21 +1,23 @@
|
||||||
#!/usr/bin/csi -s
|
#!/usr/bin/csi -s
|
||||||
|
|
||||||
(import utf8
|
(import
|
||||||
lowdown
|
(chicken file)
|
||||||
(chicken string)
|
(chicken format)
|
||||||
(chicken port)
|
|
||||||
(chicken io)
|
(chicken io)
|
||||||
|
(chicken pathname)
|
||||||
|
(chicken port)
|
||||||
(chicken process)
|
(chicken process)
|
||||||
(chicken process-context)
|
(chicken process-context)
|
||||||
(chicken format)
|
(chicken string)
|
||||||
(chicken pathname)
|
|
||||||
(chicken file)
|
|
||||||
sxml-transforms
|
|
||||||
(clojurian syntax)
|
(clojurian syntax)
|
||||||
|
scss
|
||||||
|
lowdown
|
||||||
srfi-1 ;; list utils
|
srfi-1 ;; list utils
|
||||||
srfi-13 ;; string utils
|
srfi-13 ;; string utils
|
||||||
srfi-14 ;; charsets
|
srfi-14 ;; charsets
|
||||||
|
sxml-transforms
|
||||||
symbol-utils ;; (unspecified-value)
|
symbol-utils ;; (unspecified-value)
|
||||||
|
utf8
|
||||||
)
|
)
|
||||||
|
|
||||||
(define CLONE-URL (or (get-environment-variable "REPO2HTML_CLONE_URL") "git://git.example.com"))
|
(define CLONE-URL (or (get-environment-variable "REPO2HTML_CLONE_URL") "git://git.example.com"))
|
||||||
|
@ -68,37 +70,37 @@
|
||||||
|
|
||||||
;; main code ---------------------------------
|
;; main code ---------------------------------
|
||||||
|
|
||||||
(define css "
|
(define mycss
|
||||||
body {
|
(with-output-to-string
|
||||||
margin: 0 auto;
|
(lambda ()
|
||||||
max-width: 700px;
|
(write-css
|
||||||
}
|
'(css
|
||||||
pre, code {
|
(body
|
||||||
background-color: #ffd9df;
|
(margin 0 auto)
|
||||||
}
|
(max-width 700px))
|
||||||
pre {
|
(((pre) (code))
|
||||||
padding: 15px 20px;
|
(background-color "#ffd9df"))
|
||||||
white-space: pre;
|
(pre
|
||||||
overflow: scroll;
|
(overflow scroll)
|
||||||
}
|
(padding 15px 20px)
|
||||||
a { color: blue; }
|
(white-space pre))
|
||||||
nav a { margin-right: 10px; }
|
(a
|
||||||
hr {
|
(color blue))
|
||||||
border:0;
|
((nav a)
|
||||||
border-bottom: 1px solid black;
|
(margin-right 10px))
|
||||||
margin-top: 16px;
|
(hr
|
||||||
}
|
(border 0)
|
||||||
td {
|
(border-bottom 1px solid black)
|
||||||
padding: 0em .5em;
|
(margin-top 16px))
|
||||||
vertical-align: top;
|
(td
|
||||||
}
|
(padding 0em .5em)
|
||||||
footer {
|
(vertical-align top))
|
||||||
text-align: right;
|
(footer
|
||||||
font-size: small;
|
(font-size small)
|
||||||
}
|
(text-align right))
|
||||||
#file-path {
|
((= id file-path)
|
||||||
/* change this to your liking */
|
;; change this to your liking
|
||||||
}")
|
))))))
|
||||||
|
|
||||||
(define (make-sxml-template-wrapper repository-name source-files-list)
|
(define (make-sxml-template-wrapper repository-name source-files-list)
|
||||||
(let ((readme-file
|
(let ((readme-file
|
||||||
|
@ -119,7 +121,7 @@
|
||||||
(meta (@ (name viewport) (content "width=device-width, initial-scale-1.0, user-scalable=yes")))
|
(meta (@ (name viewport) (content "width=device-width, initial-scale-1.0, user-scalable=yes")))
|
||||||
(link (@ (rel icon) (href "data:,")))
|
(link (@ (rel icon) (href "data:,")))
|
||||||
(meta (@ (name description) (content ,DESCRIPTION)))
|
(meta (@ (name description) (content ,DESCRIPTION)))
|
||||||
(style ,css))
|
(style ,mycss))
|
||||||
(body
|
(body
|
||||||
(h1 ,H1)
|
(h1 ,H1)
|
||||||
(h2 ,repository-name)
|
(h2 ,repository-name)
|
||||||
|
|
Loading…
Reference in a new issue