nasg/templates/meta-article.j2.html
Peter Molnar c6755e6125 - no more microdata or RDFa in HTML: went full JSON-LD
- added og: and article: from open graph to meta
- jsonld as tmplvars for most elements
- removed unused commented code
- indention for inline CSS for readability
- merged reactions and comments into a single block
2019-02-07 19:27:15 +00:00

79 lines
2.6 KiB
HTML

<article class="h-entry hentry" lang="{{ post.inLanguage }}">
<header>
<h3 class="p-name entry-title">
{% if post.mentions %}
<span>
<svg width="16" height="16">
<use xlink:href="#icon-reply" />
</svg>
<a href="{{ post.url }}">
RE:
</a>
<a href="{{ post.mentions.url }}" class="u-in-reply-to">
{{ post.mentions.url }}
</a>
</span>
{% else %}
<a href="{{ post.url }}">
{{ post.headline }}
</a>
{% endif %}
</h3>
<a href="{{ post.url }}" class="u-url"></a>
</header>
{% if post.description|length %}
<div class="e-summary entry-summary">
{{ post.description }}
<span class="more">
<a href="{{ post.url }}">
{% if post.inLanguage == 'hu' %}Tovább »{% else %}Continue »{% endif %}
</a>
</span>
</div>
{% else %}
<div class="e-content entry-content">
{{ post.text }}
</div>
{% endif %}
<footer aria-hidden="true" hidden="hidden">
<time datetime="{{ post.datePublished }}" class="published dt-published"></time>
<time datetime="{{ post.dateModified }}" class="updated dt-updated"></time>
<span class="p-author h-card vcard">
<img class="photo avatar u-photo u-avatar"
src="{{ post.author.image }}"
alt="Photo of {{ post.author.name }}" />
<a class="fn p-name url u-url u-uid org" href="{{ post.author.url }}">
{{ post.author.name }}
</a>
<a class="u-email email" href="mailto:{{ post.author.email }}">
{{ post.author.email }}
</a>
</span>
</footer>
<script type="application/ld+json">
{%
set basedata = {
"@context": post['@context'],
"@type": post['@type'],
"inLanguage": post.inLanguage,
"headline": post.headline,
"url": post.url,
"mainEntityOfPage": post.mainEntityOfPage,
"dateModified": post.dateModified,
"datePublished": post.datePublished,
"copyrightYear": post.copyrightYear,
"license": post.license,
"image": post.image,
"author": post.author,
"sameAs": post.sameAs,
"publisher": post.publisher,
"name": post.name,
"description": post.description
}
%}
{{ basedata|tojson(indent=4) }}
</script>
</article>