Move liked classes into template

Per discussion with @DanBurton
This commit is contained in:
Michael Snoyman 2014-11-13 22:39:24 +02:00
parent 444b09c6fe
commit d5989c8fbf
2 changed files with 2 additions and 3 deletions

View File

@ -44,8 +44,7 @@ getPackageR pn = do
return (packages, downloads, recentDownloads, nLikes, liked, metadata)
let likedClass = if liked then "fa-thumbs-up" else "fa-thumbs-o-up" :: Text
likeTitle = if liked
let likeTitle = if liked
then "You liked this!"
else "I like this!" :: Text

View File

@ -34,7 +34,7 @@ $newline never
<span #likes>
#{nLikes}
\ likes #
<i .fa .#{likedClass} #like title="#{likeTitle}">
<i .fa :liked:.fa-thumbs-up :not liked:.fa-thumbs-o-up #like title="#{likeTitle}">
$if downloads /= 0
<span .downloads>
$if downloads /= recentDownloads