Move style to pages
gitile/handler.scm
| 84 | 84 | (asset-load-data a)) | |
| 85 | 85 | (not-found request footer)))) | |
| 86 | 86 | ||
| 87 | - | (define (style page project ref footer) | |
| 88 | - | `(html | |
| 89 | - | (head | |
| 90 | - | (meta (@ (charset "UTF-8"))) | |
| 91 | - | (meta (@ (name "viewport") (content "width=device-width, initial-scale=1"))) | |
| 92 | - | (link (@ (rel "stylesheet") (href "/css/gitile.css"))) | |
| 93 | - | (link (@ (rel "stylesheet") (href "/css/highlight.css"))) | |
| 94 | - | (link (@ (rel "icon") (href "/images/icon.png") (sizes "32x32"))) | |
| 95 | - | (script (@ (src "/js/gitile.js")) "") | |
| 96 | - | (title ,project)) | |
| 97 | - | (body | |
| 98 | - | (header | |
| 99 | - | (nav | |
| 100 | - | (ul | |
| 101 | - | (li (@ (class "first")) (a (@ (href "/")) "Projects")) | |
| 102 | - | (li (a (@ (href "/" ,project)) "Repository")) | |
| 103 | - | (li (a (@ (href "/" ,project "/tree/" ,ref)) "Files")) | |
| 104 | - | (li (a (@ (href "/" ,project "/commits")) "Commits")) | |
| 105 | - | (li (a (@ (href "/" ,project "/tags")) "Tags"))))) | |
| 106 | - | (div (@ (id "content")) | |
| 107 | - | ,@page) | |
| 108 | - | (footer ,@footer)))) | |
| 109 | - | ||
| 110 | 87 | (define-record-type <project> | |
| 111 | 88 | (make-project slug name description) | |
| 112 | 89 | project? |
gitile/pages.scm
| 38 | 38 | project-index | |
| 39 | 39 | project-commits | |
| 40 | 40 | project-commit | |
| 41 | - | project-tags)) | |
| 41 | + | project-tags | |
| 42 | + | style)) | |
| 42 | 43 | ||
| 43 | 44 | (define* (project-file-raw repo path #:key (ref "-")) | |
| 44 | 45 | (let* ((ref (if (equal? ref "-") #f ref)) | |
… | |||
| 336 | 337 | (loop lines (+ old-line 1) (+ new-line 1)))))) | |
| 337 | 338 | 0)) | |
| 338 | 339 | (append content (cons file-header `((table (@ (class "file-diff")) ,file-content)))))) | |
| 340 | + | ||
| 341 | + | (define (style page project ref footer) | |
| 342 | + | `(html | |
| 343 | + | (head | |
| 344 | + | (meta (@ (charset "UTF-8"))) | |
| 345 | + | (meta (@ (name "viewport") (content "width=device-width, initial-scale=1"))) | |
| 346 | + | (link (@ (rel "stylesheet") (href "/css/gitile.css"))) | |
| 347 | + | (link (@ (rel "stylesheet") (href "/css/highlight.css"))) | |
| 348 | + | (link (@ (rel "icon") (href "/images/icon.png") (sizes "32x32"))) | |
| 349 | + | (script (@ (src "/js/gitile.js")) "") | |
| 350 | + | (title ,project)) | |
| 351 | + | (body | |
| 352 | + | (header | |
| 353 | + | (nav | |
| 354 | + | (ul | |
| 355 | + | (li (@ (class "first")) (a (@ (href "/")) "Projects")) | |
| 356 | + | (li (a (@ (href "/" ,project)) "Repository")) | |
| 357 | + | (li (a (@ (href "/" ,project "/tree/" ,ref)) "Files")) | |
| 358 | + | (li (a (@ (href "/" ,project "/commits")) "Commits")) | |
| 359 | + | (li (a (@ (href "/" ,project "/tags")) "Tags"))))) | |
| 360 | + | (div (@ (id "content")) | |
| 361 | + | ,@page) | |
| 362 | + | (footer ,@footer)))) | |