aboutsummaryrefslogtreecommitdiff
path: root/src/View
diff options
context:
space:
mode:
Diffstat (limited to 'src/View')
-rw-r--r--src/View/Ad.hs19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/View/Ad.hs b/src/View/Ad.hs
index 5ab08e6..ec5da2d 100644
--- a/src/View/Ad.hs
+++ b/src/View/Ad.hs
@@ -7,16 +7,21 @@ module View.Ad
import Data.List (intersperse)
import Data.Maybe (fromMaybe)
+
import Data.Text (Text)
import qualified Data.Text as T
import Model.Ad (Ad(..))
import qualified Model.Ad as Ad
+
import Model.Resume (Resume(..))
import qualified Model.Resume as Resume
+
import Model.Detail (Detail(..))
import qualified Model.Detail as Detail
+import Model.URL
+
renderConsoleAds :: Text -> [Ad] -> Text
renderConsoleAds time ads =
let (title, message) = renderAds ads
@@ -72,4 +77,16 @@ renderResume resume =
renderDetail :: Detail -> Text
renderDetail detail =
- fromMaybe "−" (Detail.description detail)
+ T.concat
+ [ fromMaybe "−" (Detail.description detail)
+ , renderURLs "\n\nImages" (Detail.images detail)
+ ]
+
+renderURLs :: Text -> [URL] -> Text
+renderURLs title [] = ""
+renderURLs title urls =
+ T.concat
+ [ title
+ , "\n\n"
+ , T.intercalate "\n" urls
+ ]