1
0
mirror of https://github.com/kremalicious/blog.git synced 2024-12-02 14:16:11 +01:00
blog/_src/_includes/articles.html

109 lines
4.0 KiB
HTML

{% if post.layout == "link" %}
<article class="hentry format-link">
<header class="entry-header">
<h1 class="entry-title">
<a href="{{ post.linkurl }}" title="Go to source: {{ post.linkurl | remove:'http://' | remove:'https://' | remove:'www.' }}">
{{ post.title | titlecase }}
<svg class="icon icon-forward">
<use xlink:href="/assets/img/sprite.svg#forward"></use>
</svg>
<span class="linkurl">{{ post.linkurl | remove:'http://' | remove:'https://' | remove:'www.' | split:'/' | first }}</span>
</a>
</h1>
</header>
<section class="entry-content">
{{ post.content }}
<p>
<a class="more-link" href="{{ post.linkurl }}">Go to source
<svg class="icon icon-forward">
<use xlink:href="/assets/img/sprite.svg#forward"></use>
</svg>
</a>
<a class="permalink-link" href="{{ post.url }}" data-toggle="tooltip" title="Permalink">
<svg class="icon icon-infinity">
<use xlink:href="/assets/img/sprite.svg#infinity"></use>
</svg>
</a>
</p>
</section>
</article>
{% elsif post.layout == "photo" %}
<article class="hentry format-photo">
<a class="photo-link" href="{{ post.url }}">
<figure class="hentry__teaser hmedia">
{% include picture.html size='phototeaser' %}
<figcaption class="entry-title fn">{{ post.title | titlecase }}</figcaption>
</figure>
</a>
</article>
{% else %}
<article class="hentry format-post">
<header class="entry-header">
<h1 class="entry-title"><a href="{{ post.url }}">{{ post.title | titlecase }}</a></h1>
</header>
<section class="entry-content">
{% if post.image %}
<a class="hentry__teaser hentry__teaser--link" href="{{ post.url }}">
{% include picture.html %}
</a>
{% endif %}
{% capture has_more %}{{ post.content | has_excerpt }}{% endcapture %}
{% unless post.categories contains "goodies" and page.path contains "goodies" %}
{{ post.excerpt }}
{% endunless %}
{% if post.categories contains "goodies" and page.path contains "goodies" %}
<footer class="goodie-actions grid grid--gutters grid--full grid-small--fit">
<p class="info grid__col">
<a class="btn icon icon-info" href="{{ post.url }}">
<svg class="icon icon-info-with-circle">
<use xlink:href="/assets/img/sprite.svg#info-with-circle"></use>
</svg>
Release Post
</a>
</p>
{% if post.download %}
<p class="download grid__col">
<a class="btn" href="/media/{{ post.download }}">
<svg class="icon icon-arrow-with-circle-down">
<use xlink:href="/assets/img/sprite.svg#arrow-with-circle-down"></use>
</svg>
Download <span>zip</span>
</a>
</p>
{% endif %}
</footer>
{% endif %}
{% unless page.path contains "goodies" %}
<a class="more-link" href="{{ post.url }}">
Continue reading
<svg class="icon icon-chevron-right">
<use xlink:href="/assets/img/sprite.svg#chevron-right"></use>
</svg>
</a>
{% endunless %}
</section>
</article>
{% endif %}