diff --git a/src/Handler/Home.hs b/src/Handler/Home.hs index eae3746..2b6bd5c 100644 --- a/src/Handler/Home.hs +++ b/src/Handler/Home.hs @@ -6,7 +6,7 @@ module Handler.Home where import Import -import Widget.Hcard (hcard) +import Widget.Card ( hCard ) getHomeR :: Handler Html getHomeR = do diff --git a/src/Widget/Hcard.hs b/src/Widget/Card.hs similarity index 92% rename from src/Widget/Hcard.hs rename to src/Widget/Card.hs index 80aacea..8c304ce 100644 --- a/src/Widget/Hcard.hs +++ b/src/Widget/Card.hs @@ -1,7 +1,7 @@ {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} -module Widget.Hcard (hcard) where +module Widget.Card ( hCard ) where import Import import Data.Maybe (fromJust) @@ -28,8 +28,8 @@ prettyPgp = T.unwords . T.chunksOf 4 . pgpKeyFingerprint routeFromPgp :: PgpKey -> Route App routeFromPgp PgpKey { pgpKeyFingerprint = f } = staticR ["pgp", T.takeEnd 8 f ++ ".asc"] -hcard :: Entity User -> Widget -hcard (Entity userId user) = do +hCard :: Entity User -> Widget +hCard (Entity userId user) = do maybeAvatar <- libravatar user mcurrentRoute <- getCurrentRoute userProfiles <- handlerToWidget . runDB $ do @@ -37,4 +37,4 @@ hcard (Entity userId user) = do sites <- M.fromList . map entityToTuple <$> selectList [SiteId <-. (profileSiteId <$> profiles)] [] return $ arrangeProfiles sites profiles pgpKeys <- handlerToWidget . runDB $ map entityVal <$> selectList [PgpKeyUserId ==. userId] [] - $(widgetFile "hcard") + $(widgetFile "mf2/h-card") diff --git a/templates/home.hamlet b/templates/home.hamlet index 47ca208..a472860 100644 --- a/templates/home.hamlet +++ b/templates/home.hamlet @@ -1 +1 @@ -^{hcard user} +^{hCard user} diff --git a/templates/hcard.cassius b/templates/mf2/h-card.cassius similarity index 100% rename from templates/hcard.cassius rename to templates/mf2/h-card.cassius diff --git a/templates/hcard.hamlet b/templates/mf2/h-card.hamlet similarity index 100% rename from templates/hcard.hamlet rename to templates/mf2/h-card.hamlet