summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorstuebinm2026-01-24 22:47:16 +0100
committerstuebinm2026-01-25 16:01:22 +0100
commitc96b75914b61d2ca40f6ccc2f8b2461b1651c283 (patch)
tree36b4fb28a2098a5340c85bddaf1e77aa619816c7 /app
parentd07c4732da464cf27643b467a9dc0fbf31dbe34b (diff)
bahnhof-name: set html device width for mobile screensHEADmain
Diffstat (limited to 'app')
-rw-r--r--app/Main.hs6
1 files changed, 4 insertions, 2 deletions
diff --git a/app/Main.hs b/app/Main.hs
index d73a617..259f018 100644
--- a/app/Main.hs
+++ b/app/Main.hs
@@ -168,7 +168,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)
@@ -239,7 +238,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