* fixed comment deletion link
* updated contact info * fixed compatibility with current blaze
This commit is contained in:
parent
3a39dfc19e
commit
de09c2cc68
2 changed files with 11 additions and 13 deletions
|
@ -20,6 +20,7 @@ Executable tazblog
|
||||||
happstack-server,
|
happstack-server,
|
||||||
text,
|
text,
|
||||||
blaze-html,
|
blaze-html,
|
||||||
|
blaze-markup,
|
||||||
crypto-api,
|
crypto-api,
|
||||||
cryptohash,
|
cryptohash,
|
||||||
old-locale,
|
old-locale,
|
||||||
|
|
23
src/Blog.hs
23
src/Blog.hs
|
@ -10,7 +10,7 @@ import Data.Text (Text, append, pack, empty)
|
||||||
import Data.Time
|
import Data.Time
|
||||||
import Network.Captcha.ReCaptcha
|
import Network.Captcha.ReCaptcha
|
||||||
import System.Locale (defaultTimeLocale)
|
import System.Locale (defaultTimeLocale)
|
||||||
import Text.Blaze (preEscapedText)
|
import Text.Blaze.Html (preEscapedToHtml)
|
||||||
import Text.Hamlet
|
import Text.Hamlet
|
||||||
import Text.Lucius
|
import Text.Lucius
|
||||||
import Locales
|
import Locales
|
||||||
|
@ -47,7 +47,7 @@ $doctype 5
|
||||||
<a class="btitle" href=#{append "/" (show' lang)}>#{blogTitle lang empty}
|
<a class="btitle" href=#{append "/" (show' lang)}>#{blogTitle lang empty}
|
||||||
<p style="clear: both;">
|
<p style="clear: both;">
|
||||||
<span class="contacts" id="cosx">^{contactInfo iMessage}
|
<span class="contacts" id="cosx">^{contactInfo iMessage}
|
||||||
<span class="righttext">^{preEscapedText $ rightText lang}
|
<span class="righttext">^{preEscapedToHtml $ rightText lang}
|
||||||
<div class="middle">
|
<div class="middle">
|
||||||
^{body}
|
^{body}
|
||||||
<div class="footer">
|
<div class="footer">
|
||||||
|
@ -89,7 +89,7 @@ renderEntries showAll entries topText footerLinks = [shamlet|
|
||||||
$forall entry <- elist
|
$forall entry <- elist
|
||||||
<li>
|
<li>
|
||||||
<a href=#{linkElems entry}>#{linkText $ length $ comments entry}
|
<a href=#{linkElems entry}>#{linkText $ length $ comments entry}
|
||||||
^{preEscapedText $ append " " $ btext entry}
|
^{preEscapedToHtml $ append " " $ btext entry}
|
||||||
$if ((/=) (mtext entry) empty)
|
$if ((/=) (mtext entry) empty)
|
||||||
<p><a href=#{linkElems entry}>#{readMore $ lang entry}
|
<p><a href=#{linkElems entry}>#{readMore $ lang entry}
|
||||||
$else
|
$else
|
||||||
|
@ -130,8 +130,8 @@ renderEntry Entry{..} = [shamlet|
|
||||||
<article>
|
<article>
|
||||||
<ul style="max-width:57em;">
|
<ul style="max-width:57em;">
|
||||||
<li>
|
<li>
|
||||||
^{preEscapedText $ btext}
|
^{preEscapedToHtml $ btext}
|
||||||
<p>^{preEscapedText $ mtext}
|
<p>^{preEscapedToHtml $ mtext}
|
||||||
<div class="innerBoxComments">
|
<div class="innerBoxComments">
|
||||||
<div class="cHead">#{cHead lang}
|
<div class="cHead">#{cHead lang}
|
||||||
<ul style="max-width:57em;">#{renderComments comments lang}
|
<ul style="max-width:57em;">#{renderComments comments lang}
|
||||||
|
@ -146,7 +146,7 @@ renderComments comments lang = [shamlet|
|
||||||
$forall comment <- comments
|
$forall comment <- comments
|
||||||
<li>
|
<li>
|
||||||
<i>#{append (cauthor comment) ": "}
|
<i>#{append (cauthor comment) ": "}
|
||||||
^{preEscapedText $ ctext comment}
|
^{preEscapedToHtml $ ctext comment}
|
||||||
<p class="tt">#{timeString $ cdate comment}
|
<p class="tt">#{timeString $ cdate comment}
|
||||||
|]
|
|]
|
||||||
where
|
where
|
||||||
|
@ -172,17 +172,14 @@ $doctype 5
|
||||||
<head>
|
<head>
|
||||||
<title>Impressum
|
<title>Impressum
|
||||||
<body>
|
<body>
|
||||||
<h2>
|
<h2>Impressum
|
||||||
Impressum und #
|
|
||||||
<a alt="Verantwortlich im Sinne des Presserechtes">ViSdP
|
|
||||||
<i>[German law demands this]
|
|
||||||
<br>
|
<br>
|
||||||
<p>
|
<p>
|
||||||
Vincent Ambo
|
Vincent Ambo
|
||||||
<br>
|
<br>
|
||||||
Benfleetstr. 8
|
Gyllenborgsgatan 8, LGH 1306
|
||||||
<br>
|
<br>
|
||||||
50858 Köln
|
11243 Stockholm
|
||||||
<p><a href="/" style="color:black;">Back
|
<p><a href="/" style="color:black;">Back
|
||||||
|]
|
|]
|
||||||
|
|
||||||
|
@ -298,7 +295,7 @@ editComments comments eId = [shamlet|
|
||||||
|]
|
|]
|
||||||
where
|
where
|
||||||
cPostTime = formatTime defaultTimeLocale "%c"
|
cPostTime = formatTime defaultTimeLocale "%c"
|
||||||
cDeleteLink cd = concat ["/admin/cdelete", show eId, formatTime defaultTimeLocale "/%s%Q" cd]
|
cDeleteLink cd = concat ["/admin/cdelete/", show eId, formatTime defaultTimeLocale "/%s%Q" cd]
|
||||||
|
|
||||||
commentDeleted :: EntryId -> Html
|
commentDeleted :: EntryId -> Html
|
||||||
commentDeleted eId = adminTemplate "Kommentar gelöscht" $ [shamlet|
|
commentDeleted eId = adminTemplate "Kommentar gelöscht" $ [shamlet|
|
||||||
|
|
Loading…
Reference in a new issue