Add links to my cgit instance, temporarily
Until I've written something myself, just link on to my cgit instance.
This commit is contained in:
parent
7e4d5611c1
commit
f9ec43653b
1 changed files with 12 additions and 7 deletions
|
@ -40,15 +40,19 @@
|
||||||
(substring name 0 pos)
|
(substring name 0 pos)
|
||||||
name)))
|
name)))
|
||||||
|
|
||||||
(define (project->row dir project)
|
(define (project->row dir project prefix)
|
||||||
(let ((project-dir (string-append dir "/" project)))
|
(let ((project-dir (string-append dir "/" project))
|
||||||
|
(project-name (gitless project)))
|
||||||
`(tr
|
`(tr
|
||||||
(td (@ (class "span3")) ,(gitless project))
|
(td (@ (class "span3"))
|
||||||
|
(a (@ (href "http://code.ryuslash.org/cgit.cgi/"
|
||||||
|
,prefix "/" ,project-name))
|
||||||
|
,project-name))
|
||||||
(td (@ (class "span6")) ,(project-description project-dir))
|
(td (@ (class "span6")) ,(project-description project-dir))
|
||||||
(td (@ (class "span2")) ,(git-last-update project-dir))
|
(td (@ (class "span2")) ,(git-last-update project-dir))
|
||||||
(td (@ (class "span1")) ""))))
|
(td (@ (class "span1")) ""))))
|
||||||
|
|
||||||
(define (project-list->table top-dir list lvl)
|
(define (project-list->table top-dir list lvl prefix)
|
||||||
(let ((head (car list))
|
(let ((head (car list))
|
||||||
(body (cadr list)))
|
(body (cadr list)))
|
||||||
`((,(string->symbol (string-append "h" (number->string lvl))) ,head)
|
`((,(string->symbol (string-append "h" (number->string lvl))) ,head)
|
||||||
|
@ -62,13 +66,14 @@
|
||||||
(th "")))
|
(th "")))
|
||||||
(tbody
|
(tbody
|
||||||
,@(map (lambda (elt)
|
,@(map (lambda (elt)
|
||||||
(project->row top-dir elt))
|
(project->row top-dir elt prefix))
|
||||||
(filter (lambda (elt)
|
(filter (lambda (elt)
|
||||||
(and (string? elt)
|
(and (string? elt)
|
||||||
(access? (string-append top-dir "/" elt) R_OK)))
|
(access? (string-append top-dir "/" elt) R_OK)))
|
||||||
body))))
|
body))))
|
||||||
,@(map (lambda (elt) (project-list->table
|
,@(map (lambda (elt) (project-list->table
|
||||||
(string-append top-dir (car elt)) elt (1+ lvl)))
|
(string-append top-dir (car elt)) elt (1+ lvl)
|
||||||
|
(string-append prefix (car elt))))
|
||||||
(filter
|
(filter
|
||||||
(lambda (elt)
|
(lambda (elt)
|
||||||
(and (list? elt)
|
(and (list? elt)
|
||||||
|
@ -76,5 +81,5 @@
|
||||||
body)))))
|
body)))))
|
||||||
|
|
||||||
(define (page-projects request body index)
|
(define (page-projects request body index)
|
||||||
(respond (project-list->table *projects-dir* (list-projects) 1)
|
(respond (project-list->table *projects-dir* (list-projects) 1 "")
|
||||||
#:extra-headers '((pragma . (no-cache (broccoli . "tastyy"))))))
|
#:extra-headers '((pragma . (no-cache (broccoli . "tastyy"))))))
|
||||||
|
|
Loading…
Reference in a new issue