Mark up h-entries with schema.org/BlogPosting as well. It's so gross compared to h-entry oh my god.

This commit is contained in:
Danielle McLean 2017-10-16 09:07:08 +11:00
parent bf970db801
commit 7f7f64c8b5
Signed by: 00dani
GPG key ID: 5A5D2D1AFF12EEC5

View file

@ -1,26 +1,33 @@
<article .h-entry .card.bg-dark>
<article .h-entry .card.bg-dark itemscope itemtype="http://schema.org/BlogPosting">
$maybe photo <- entryPhoto entry
<img .card-img-top.u-photo src=@{staticR ["uploads", photo]} alt=#{entryTitle 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>#{name}
<div .e-content>
<h4 .p-name .card-title itemprop="headline">#{name}
<div .e-content itemprop="articleBody">
#{entryContent entry}
$nothing
<div .e-content.p-name>
<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=@{HomeR}>
<a .p-author.h-card href=@{userProfile author}>
<img .u-photo src=@{AvatarR $ entryAuthorId entry} alt=#{userFullName author}>
#{userFullName author}
<a .u-url href="@{entryR (Entity entryId entry)}">
$# 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 datetime=#{timeUnfriendly published} title=#{timeUnfriendly published}>
<time .dt-published itemprop="datePublished" datetime=#{timeUnfriendly published} title=#{timeUnfriendly published}>
<i .fa.fa-calendar>
#{timeFriendly published}
<time .dt-updated datetime=#{timeUnfriendly updated} title=#{timeUnfriendly updated} :published == updated:hidden>
<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