From b846aa65f8f21189f39236f88908267167004a35 Mon Sep 17 00:00:00 2001 From: Joris Date: Thu, 14 Jul 2016 15:47:33 +0200 Subject: Add isPro info --- src/Model/Resume.hs | 1 + src/Parser/Resume.hs | 6 ++++-- src/Time.hs | 9 +++------ src/View/Html/Ad.hs | 16 ++++++++++++---- src/View/Html/Design.hs | 24 +++++++++++++++--------- src/View/Plain/Ad.hs | 3 ++- 6 files changed, 37 insertions(+), 22 deletions(-) diff --git a/src/Model/Resume.hs b/src/Model/Resume.hs index 3e3cd82..59f6698 100644 --- a/src/Model/Resume.hs +++ b/src/Model/Resume.hs @@ -13,6 +13,7 @@ data Resume = Resume { name :: Text , price :: Maybe Text , url :: URL + , isPro :: Bool } deriving (Eq, Read, Show) getNewResumes :: [URL] -> [Resume] -> ([URL], [Resume]) diff --git a/src/Parser/Resume.hs b/src/Parser/Resume.hs index f300ec3..8940be7 100644 --- a/src/Parser/Resume.hs +++ b/src/Parser/Resume.hs @@ -2,7 +2,8 @@ module Parser.Resume ( parse ) where -import Data.Maybe (catMaybes) +import Data.Maybe (catMaybes, isJust) +import Data.List (find) import Data.Text (Text) import qualified Data.Text as T @@ -26,4 +27,5 @@ parseResume item = do name <- getTagTextAfter "