diff --git a/.gitignore b/.gitignore index 6d57f64..df5f33f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ dist* static/tmp/ static/combined/ +static/uploads/ config/client_session_key.aes *.hi *.o diff --git a/config/models b/config/models index c19a960..7e6ec9a 100644 --- a/config/models +++ b/config/models @@ -29,6 +29,7 @@ Entry kind EntryKind maxlen=255 name Text Maybe maxlen=255 content Markdown sqltype=longtext + photo Text Maybe maxlen=190 published UTCTime updated UTCTime authorId UserId diff --git a/src/Widget/Entry.hs b/src/Widget/Entry.hs index 4743ee3..ba02577 100644 --- a/src/Widget/Entry.hs +++ b/src/Widget/Entry.hs @@ -10,6 +10,7 @@ import Database.Esqueleto ( (^.) ) import qualified Database.Esqueleto as E import Data.Time.Format ( defaultTimeLocale, formatTime, iso8601DateFormat ) import Data.Time.Format.Human ( humanReadableTime ) +import Model.Entry ( entryTitle ) import Web.Slug ( mkSlug ) data FormattedTime = FormattedTime diff --git a/templates/mf2/h-entry.hamlet b/templates/mf2/h-entry.hamlet index 66494a3..5e9f3a8 100644 --- a/templates/mf2/h-entry.hamlet +++ b/templates/mf2/h-entry.hamlet @@ -1,4 +1,6 @@
+ $maybe photo <- entryPhoto entry + #{entryTitle
$maybe name <- entryName entry

#{name}