|
|
@ -172,9 +172,9 @@
|
|
|
|
(cons #f `(span ,@(map (λ(on) `(a ((href ,on)) ,on (span ((class "file-ext")) "." ,source-first-ext ,(format " (from ~a)" (->string (find-relative-path dashboard-dir source)))))) output-names)))]
|
|
|
|
(cons #f `(span ,@(map (λ(on) `(a ((href ,on)) ,on (span ((class "file-ext")) "." ,source-first-ext ,(format " (from ~a)" (->string (find-relative-path dashboard-dir source)))))) output-names)))]
|
|
|
|
[else
|
|
|
|
[else
|
|
|
|
(define extra-row-string
|
|
|
|
(define extra-row-string
|
|
|
|
(if (equal? source-minus-ext (remove-ext source)) ; escaped and unescaped versions are equal
|
|
|
|
(if (equal? source-minus-ext (remove-ext source)) ; escaped and unescaped versions are equal
|
|
|
|
"" ; no extra string needed
|
|
|
|
"" ; no extra string needed
|
|
|
|
(format " (from ~a)" (->string (find-relative-path dashboard-dir source)))))
|
|
|
|
(format " (from ~a)" (->string (find-relative-path dashboard-dir source)))))
|
|
|
|
|
|
|
|
|
|
|
|
(cons #f `(a ((href ,filename)) ,(->string source-minus-ext) (span ((class "file-ext")) "." ,source-first-ext ,extra-row-string)))])]
|
|
|
|
(cons #f `(a ((href ,filename)) ,(->string source-minus-ext) (span ((class "file-ext")) "." ,source-first-ext ,extra-row-string)))])]
|
|
|
|
[else ; other non-source file
|
|
|
|
[else ; other non-source file
|
|
|
@ -253,6 +253,9 @@
|
|
|
|
;; 404 route
|
|
|
|
;; 404 route
|
|
|
|
(define/contract (route-404 req)
|
|
|
|
(define/contract (route-404 req)
|
|
|
|
(request? . -> . response?)
|
|
|
|
(request? . -> . response?)
|
|
|
|
(define error-text (format "route-404: Can't find ~a" (->string (req->path req))))
|
|
|
|
(define missing-path (->string (req->path req)))
|
|
|
|
(message error-text)
|
|
|
|
(message (format "route-404: Can't find ~a" missing-path))
|
|
|
|
(response/xexpr+doctype `(html ,error-text)))
|
|
|
|
(response/xexpr+doctype
|
|
|
|
|
|
|
|
`(html
|
|
|
|
|
|
|
|
(head (title "404 error") (link ((href "/error.css") (rel "stylesheet"))))
|
|
|
|
|
|
|
|
(body (div ((class "section")) (div ((class "title")) "404 error") (p ,(format "~v" missing-path) " was not found"))))))
|
|
|
|