Clean up, working links
This commit is contained in:
parent
e382150986
commit
6ee5998e82
3 changed files with 39 additions and 39 deletions
|
|
@ -36,7 +36,7 @@ import Options.Applicative
|
|||
)
|
||||
import Render
|
||||
import Text.Printf (printf)
|
||||
import Translation (Lang (EN, ES))
|
||||
import Translation (Lang (EN, ES), getLangAsString)
|
||||
import Web.Scotty
|
||||
import Web.Scotty.Cookie (defaultSetCookie, getCookie, setCookie, setCookieExpires, setCookieName, setCookieValue)
|
||||
|
||||
|
|
@ -62,7 +62,6 @@ data Config = Config
|
|||
configPort :: Int
|
||||
}
|
||||
|
||||
-- Build the parser
|
||||
configParser :: Parser Config
|
||||
configParser =
|
||||
Config
|
||||
|
|
@ -115,6 +114,11 @@ main = do
|
|||
liftIO $ print errors
|
||||
|
||||
html $ renderText $ renderFrontpage lang validEvents
|
||||
get "/wiki" $ do
|
||||
langHeader <- header "Accept-Language"
|
||||
let lang = getLanguageHeader langHeader
|
||||
langString = getLangAsString lang
|
||||
redirect $ TL.pack $ printf "/%s/" langString
|
||||
get "/monthView/" $ do
|
||||
timeNow <- liftIO $ getCurrentTime
|
||||
tmz <- liftIO $ getCurrentTimeZone
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue