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) return (packages, downloads, recentDownloads, nLikes, liked, metadata)
let likedClass = if liked then "fa-thumbs-up" else "fa-thumbs-o-up" :: Text let likeTitle = if liked
likeTitle = if liked
then "You liked this!" then "You liked this!"
else "I like this!" :: Text else "I like this!" :: Text

View File

@ -34,7 +34,7 @@ $newline never
<span #likes> <span #likes>
#{nLikes} #{nLikes}
\ likes # \ 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 $if downloads /= 0
<span .downloads> <span .downloads>
$if downloads /= recentDownloads $if downloads /= recentDownloads