diff options
| author | stuebinm | 2026-01-24 22:47:16 +0100 |
|---|---|---|
| committer | stuebinm | 2026-01-24 22:47:16 +0100 |
| commit | 83031c010be0ed73f45ba5975d16cb05a1638ff1 (patch) | |
| tree | 5480bf8e506d72dbc1b0c627b79e69ecd6dba20a /app | |
| parent | ce971e686f2be7cbc5cf01b45bd50f48a7b95aae (diff) | |
bahnhof-name: set html device width for mobile screensrnv
Diffstat (limited to '')
| -rw-r--r-- | app/Main.hs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/app/Main.hs b/app/Main.hs index dcd95fb..9ee0209 100644 --- a/app/Main.hs +++ b/app/Main.hs @@ -176,7 +176,6 @@ app AppData{..} request respond = mkAnswer >>= (respond . toResponse) | null platforms -> pure $ Html $ "Found no information, sorry.<br><br>If you want to investigate, the attempted query was:<br><br><pre>" <> decodeUtf8 overpassQuery - <> "</pre>" | otherwise -> do let answer = V.toList platforms & sortOn (maybe (0::Int) (fromRight 0 . fmap fst . T.signed T.decimal) . osmLevel) @@ -247,7 +246,10 @@ app AppData{..} request respond = mkAnswer >>= (respond . toResponse) Plaintext msg -> responseLBS status200 (mkHeaders "text/plain") (LB.fromStrict $ encodeUtf8 msg) Html markup -> responseLBS - status200 (mkHeaders "text/html") (LB.fromStrict $ encodeUtf8 markup) + status200 (mkHeaders "text/html") $ LB.fromStrict $ + "<html lang=\"en\"><head><meta charset=\"utf-8\"><meta name=\"viewport\" content=\"width=device-width, initial-scale=1\"></head><body>" + <> encodeUtf8 markup + <> "</body></html>" Notfound -> responseLBS status404 (mkHeaders "text/plain") "??" Unimplemented -> responseLBS |
