mirror of
https://github.com/commercialhaskell/stackage-server.git
synced 2026-01-21 00:11:56 +01:00
Move liked classes into template
Per discussion with @DanBurton
This commit is contained in:
parent
444b09c6fe
commit
d5989c8fbf
@ -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
|
||||||
|
|
||||||
|
|||||||
@ -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
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user