From 23f04635cc26e1b0553088f28553f518488a9fc8 Mon Sep 17 00:00:00 2001 From: Joris Date: Wed, 1 May 2019 15:52:32 +0200 Subject: Setup personal page with Hakyll --- src/View/Project.hs | 66 ----------------------------------------------------- 1 file changed, 66 deletions(-) delete mode 100644 src/View/Project.hs (limited to 'src/View/Project.hs') diff --git a/src/View/Project.hs b/src/View/Project.hs deleted file mode 100644 index a5aaf2c..0000000 --- a/src/View/Project.hs +++ /dev/null @@ -1,66 +0,0 @@ -{-# LANGUAGE OverloadedStrings #-} - -module View.Project - ( renderProjects - ) where - -import Data.String (fromString) - -import Text.Blaze.Html -import Text.Blaze.Html5 -import Text.Blaze.Html5.Attributes -import qualified Text.Blaze.Html5 as H - -import Conf (Conf) - -import Model.Header (Header(Projects)) -import qualified Model.Project as P -import Model.Translated -import Model.Translation.Language - -import View.Header (renderHeader) -import View.Git (renderGitIcon) - -renderProjects :: Conf -> Language -> [P.Project] -> Html -renderProjects conf language projects = - H.div $ do - renderHeader language (Just Projects) - H.div ! class_ "projectsPage" $ - mapM_ (renderProject conf language) projects - -renderProject :: Conf -> Language -> P.Project -> Html -renderProject conf language project = - H.div ! class_ "project" $ do - renderTitle conf project - H.div ! class_ "body" $ do - renderTechnologies (P.technologies project) - case P.pageLink project of - Just pageLink -> renderPageLink pageLink - Nothing -> fromString "" - case P.description project of - Just description -> renderDescription language description - Nothing -> H.div "" - -renderTitle :: Conf -> P.Project -> Html -renderTitle conf project = - h1 $ do - toHtml (P.name project) - H.span ! class_ "separator" $ fromString " − " - renderGitIcon conf (P.git project) - -renderTechnologies :: [String] -> Html -renderTechnologies technologies = - H.div ! class_ "technologies" $ do - ul $ mapM_ (H.li . fromString) technologies - -renderPageLink :: String -> Html -renderPageLink pageLink = - H.div ! class_ "pageLink" $ do - H.a - ! href (fromString pageLink) - $ toHtml pageLink - -renderDescription :: Language -> Translated -> Html -renderDescription language description = - H.div ! class_ "description" $ do - fromString . getTranslation language $ description -- cgit v1.2.3