lebd/templates/mf2/h-entry.hamlet

37 lines
1.8 KiB
Plaintext

<article .h-entry .card.bg-dark itemscope itemtype="http://schema.org/BlogPosting">
$maybe photo <- entryPhoto entry
<img .card-img-top.u-photo itemprop="image" src=@{staticR ["uploads", photo]} alt=#{entryTitle entry}>
<div .card-body>
$maybe name <- entryName entry
<h4 .p-name .card-title itemprop="headline">#{name}
<div .e-content itemprop="articleBody">
#{entryContent entry}
$nothing
<div itemprop="headline" hidden>#{entryTitle entry}
<div .e-content.p-name itemprop="articleBody">
#{entryContent entry}
<div .card-footer>
$maybe author <- maybeAuthor
<a .p-author.h-card href=@{userProfile author}>
<img .u-photo src=@{AvatarR $ entryAuthorId entry} alt=#{userFullName author}>
#{userFullName author}
$# Use a separate hidden block for the schema.org metadata because you
$# can't put itemprop="author" and itemprop="url" on the same element,
$# because schema.org is garbage.
<div hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
<a itemprop="url" href=@{userProfile author}>
<span itemprop="name">#{userFullName author}
<a .u-url itemprop="mainEntityOfPage" href=@{entryR (Entity entryId entry)}>
<i .fa.fa-link>
permalink
<time .dt-published itemprop="datePublished" datetime=#{timeUnfriendly published} title=#{timeUnfriendly published}>
<i .fa.fa-calendar>
#{timeFriendly published}
<time .dt-updated itemprop="dateModified" datetime=#{timeUnfriendly updated} title=#{timeUnfriendly updated} :published == updated:hidden>
<i .fa.fa-pencil>
#{timeFriendly updated}
$forall (E.Value url, E.Value icon, E.Value name) <- posses
<a .u-syndication href=#{url}>
<i .#{icon}>
#{name}