diff options
| -rw-r--r-- | main.scm | 28 | ||||
| -rw-r--r-- | style.css | 8 | 
2 files changed, 18 insertions, 18 deletions
| @@ -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"]) @@ -200,11 +200,3 @@ textarea {      min-height:0.5em;      white-space:pre-wrap;  } - -.content-link { -  display: inline-block; -} - -.content-text { -  display: inline-block; -} | 
