diff options
| -rw-r--r-- | app/Main.hs | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/app/Main.hs b/app/Main.hs index 9ee0209..0f2e3e7 100644 --- a/app/Main.hs +++ b/app/Main.hs @@ -228,13 +228,23 @@ app AppData{..} request respond = mkAnswer >>= (respond . toResponse) Exact (_,match) -> lookupName match ril100map & maybe None Exact Fuzzy (_,match) -> Fuzzy (ril100BaseUrl <> "/" <> match) - helptext = Plaintext $ "\ + helptext = Html $ "\ + \<pre>\ \ril100 → Name: " <> ril100BaseUrl <> "/RM\n\ \Name → ril100: " <> ril100BaseUrl <> "/Mannheim\n\n\ \Leitpunkt → Name: " <> leitpunktBaseUrl <> "/MA\n\ - \Name → Leitpunkt: " <> leitpunktBaseUrl <> "/Mannheim\n\n\ + \Name → Leitpunkt: " <> leitpunktBaseUrl <> "/Mannheim\n\ + \</pre>\ + \<form id=\"form1\"><input id=\"query\" type=\"text\" \ + \oninput=\"document.getElementById('form1').action = '/' + this.value\">\ + \<input type=\"submit\" value=\"search\"></form>\ + \<pre>\ \Am selben Bahnsteig gegenüber:\n\ - \ " <> ril100BaseUrl <> "/RM/gleis" + \ " <> ril100BaseUrl <> "/RM/gleis\n\ + \</pre>\ + \<form id=\"form2\"><input id=\"query\" type=\"text\" \ + \oninput=\"document.getElementById('form2').action = '/' + this.value + '/gleis'\">\ + \<input type=\"submit\" value=\"search\"></form>" host = head (BS.split (fromIntegral (ord '.')) rawHost) where rawHost = case lookup "x-forwarded-host" $ requestHeaders request of Nothing -> fromMaybe "" $ requestHeaderHost request |
