gdritter repos khuzd / 964d71a
Fixed bug with month-displaying and made the title bilingual Getty Ritter 11 years ago
1 changed file(s) with 7 addition(s) and 3 deletion(s). Collapse all Expand all
1111 import Data.Time (UTCTime(..))
1212 import Data.Time.Calendar (toGregorian)
1313 import Data.Time.Format (formatTime)
14 import Prelude (String, ($), (++), (==), return, Bool(..), Maybe(..), show)
14 import Prelude (String, ($), (++), (-), (==), return, Bool(..), Maybe(..), show)
1515 import qualified Prelude as P
1616 import System.Locale (defaultTimeLocale)
1717 import Text.Blaze.Html5
5151 title (toHtml ("Baruk Khazâd: " `T.append` pgName))
5252 body ! id "bg" $ do
5353 userText
54 div ! class_ "title" $ h1 ("Baruk Khazâd! Khazâd ai-Mênu!")
54 div ! class_ "title" $ h1 $
55 span ! class_ "bilingual"
56 ! dataAttribute "english" "Axes of the Dwarves! The Dwarves are Upon You!"
57 ! dataAttribute "dwarvish" "Baruk Khazâd! Khazâd ai-Mênu!"
58 $ ("Baruk Khazâd! Khazâd ai-Mênu!")
5559 div ! class_ "nav" $ titlebar isLoggedIn
5660 div ! class_ "main" $ pgContents
5761 where userText = case isLoggedIn of
175179 formatDate t = do
176180 toMarkup (show day)
177181 " "
178 toMonth month
182 toMonth (month - 1)
179183 ", "
180184 toMarkup (show year)
181185 where (year, month, day) = toGregorian (utctDay t)