Nicer layout for h-entry, with cute icons

This commit is contained in:
Danielle McLean 2017-10-09 19:54:58 +11:00
parent 03cd1487fe
commit 0e80d93994
Signed by: 00dani
GPG key ID: 5A5D2D1AFF12EEC5
3 changed files with 24 additions and 10 deletions

View file

@ -8,7 +8,10 @@ import Import
import Data.Time.Format ( defaultTimeLocale, formatTime, iso8601DateFormat )
import Data.Time.Format.Human ( humanReadableTime )
data FormattedTime = FormattedTime { timeUnfriendly :: String, timeFriendly :: String }
data FormattedTime = FormattedTime
{ timeUnfriendly :: String
, timeFriendly :: String
} deriving Eq
toFormattedTime :: MonadIO m => UTCTime -> m FormattedTime
toFormattedTime time = FormattedTime (unfriendly time) <$> friendly time

View file

@ -0,0 +1,7 @@
article.h-entry
> .card-footer
display: flex
flex-wrap: wrap
justify-content: space-evenly
> *
margin-right: 1em

View file

@ -1,15 +1,19 @@
<article .h-entry .card.bg-dark>
<div .card-body>
<h4 .p-name .card-title>#{entryName entry}
$maybe author <- maybeAuthor
<p .card-subtitle>
published by
<a .p-author.h-card href=@{HomeR}>#{userFullName author}
<div .e-content>
#{entryContent entry}
<a .u-url .card-link href="@{entryR (Entity entryId entry)}">permalink
<div .card-footer>
$maybe author <- maybeAuthor
<a .p-author.h-card href=@{HomeR}>
<i .fa.fa-user>
#{userFullName author}
<a .u-url href="@{entryR (Entity entryId entry)}">
<i .fa.fa-link>
permalink
<time .dt-published datetime=#{timeUnfriendly published}>
<i .fa.fa-calendar>
#{timeFriendly published}
<time .dt-updated datetime=#{timeUnfriendly updated}>
<time .dt-updated datetime=#{timeUnfriendly updated} :published == updated:hidden>
<i .fa.fa-pencil>
#{timeFriendly updated}