summaryrefslogtreecommitdiffstats
path: root/main.scm
diff options
context:
space:
mode:
Diffstat (limited to 'main.scm')
-rw-r--r--main.scm28
1 files changed, 18 insertions, 10 deletions
diff --git a/main.scm b/main.scm
index f6a049c..0027a30 100644
--- a/main.scm
+++ b/main.scm
@@ -183,8 +183,13 @@
(let ([r "(https://[^ ]*)"])
(if (irregex-search r content)
(let* ([starts-with-link (= 0 (irregex-match-start-index (irregex-search r content)))]
- [texts (map (cut list 'div '(@ [class "content-text"]) <>) (irregex-split r content))]
- [links (map (lambda (x) `(a (@ [href ,x] [class "content-link"]) ,x)) (irregex-extract r content))])
+ [texts (map (cut list 'span <>) (irregex-split r content))]
+ [links (map (lambda (x)
+ `(a (@ [href ,x]
+ [target "_blank"]
+ [rel "noreferrer"])
+ ,x)) (irregex-extract r content))])
+ (display `(,texts ,links))
(define (go xs ys take-y?)
(cond
[(and (not (null-list? ys)) take-y?)
@@ -250,14 +255,17 @@
))
(define (page inner)
- (with-output-to-string (lambda ()
- (sxml-display-as-html
- `(html (head
- (link (@ [rel "stylesheet"] [href "/style.css"]))
- (meta (@ [name "viewport"] [content "width=device-width, initial-scale=1"])))
- (body
- ,inner
- ))))))
+ (string-append
+ "<!DOCTYPE html>"
+ (with-output-to-string
+ (lambda ()
+ (sxml-display-as-html
+ `(html (head
+ (link (@ [rel "stylesheet"] [href "/style.css"]))
+ (meta (@ [name "viewport"] [content "width=device-width, initial-scale=1"])))
+ (body
+ ,inner
+ )))))))
(define login-form
`(form (@ [class "login-form"] [action "/login"] [method "POST"])