about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/Blog.hs14
-rw-r--r--src/Locales.hs6
2 files changed, 13 insertions, 7 deletions
diff --git a/src/Blog.hs b/src/Blog.hs
index f7e5f5f3b727..534803baa426 100644
--- a/src/Blog.hs
+++ b/src/Blog.hs
@@ -2,6 +2,7 @@
 
 module Blog where
 
+import           Control.Monad (when, unless)
 import           Data.Data (Data, Typeable)
 import           Data.List (intersperse)
 import           Data.Monoid (mempty)
@@ -71,10 +72,15 @@ renderEntries showAll entries topText footerLinks =
     where
         showEntry :: Entry -> Html
         showEntry e = H.li $ do 
-            entryLink e
-            preEscapedText $ T.concat [" ", btext e, "<br>&nbsp;</br>"]
-        entryLink e = H.a ! A.href (toValue $ concat $ intersperse' "/" $ linkElems e) $
-                        toHtml ("[" ++ show(length $ comments e) ++ "]")
+            entryLink e $ T.pack $ show(length $ comments e)
+            preEscapedText $ T.append " " $ btext e
+            when ( mtext e /= T.empty ) $
+                H.p $ entryLink e $ readMore $ lang e
+            unless ( mtext e /= T.empty ) $
+                preEscapedText "<br>&nbsp;</br>"
+        entryLink :: Entry -> Text -> Html
+        entryLink e s = H.a ! A.href (toValue $ concat $ intersperse' "/" $ linkElems e) $
+                        toHtml (T.concat ["[", s, "]"])
         linkElems e = [show(lang e), show $ entryId e]
         getFooterLinks (Just h) = h
         getFooterLinks Nothing = mempty
diff --git a/src/Locales.hs b/src/Locales.hs
index 393a69f8fc18..9330fd81fb9b 100644
--- a/src/Locales.hs
+++ b/src/Locales.hs
@@ -13,7 +13,7 @@ import    BlogDB (BlogLang (..))
 
 data BlogError = NotFound | DBError
 
-version = "2.2b"
+version = "3.0"
 
 allLang = [EN, DE]
 
@@ -73,8 +73,8 @@ nextText DE = "Später"
 nextText EN = "Later"
 
 readMore :: BlogLang -> Text
-readMore DE = "[Weiterlesen]"
-readMore EN = "[Read more]"
+readMore DE = "Weiterlesen"
+readMore EN = "Read more"
 
 -- contact information
 contactText :: BlogLang -> Text