1
0
mirror of https://github.com/kremalicious/blog.git synced 2024-11-26 11:49:04 +01:00
blog/_src/_includes/articles.html

87 lines
3.0 KiB
HTML

{% if post.layout == "link" %}
<article class="hentry format-link">
<header>
<h1 class="entry-title">
<a href="{{ post.linkurl }}" title="Go to source: {{ post.linkurl | remove:'http://' | remove:'https://' | remove:'www.' }}">
{{ post.title | titlecase }} <i class="icon-forward"></i>
<span class="linkurl">{{ post.linkurl | remove:'http://' | remove:'https://' | remove:'www.' | split:'/' | first }}</span>
</a>
</h1>
</header>
<section class="entry-content">
{{ post.content | markdownify }}
<p>
<a class="more-link" href="{{ post.linkurl }}">Go to source <i class="icon-forward"></i></a>
<a class="permalink-link" href="{{ post.url | append: '/' }}" rel="tooltip" title="Permalink">&#8734;</a>
</p>
</section>
</article>
{% elsif post.layout == "photo" %}
<article class="hentry format-photo">
<a class="photo-link" href="{{ post.url }}">
<figure class="hmedia">
{% picture {{ post.image }} %}
<figcaption class="entry-title fn">{{ post.title | titlecase }}</figcaption>
</figure>
</a>
</article>
{% else %}
<article class="hentry format-post">
<header>
<h1 class="entry-title"><a href="{{ post.url | append: '/' }}">{{ post.title | titlecase }}</a></h1>
</header>
<section class="entry-content">
{% if post.image %}
<a href="{{ post.url | append: '/' }}">
{% picture {{ post.image }} class="teaser" %}
</a>
{% endif %}
{% capture has_more %}{{ post.content | has_more }}{% endcapture %}
{% if has_more == 'true' %}
{{ post.content | post.excerpt | excerpt | markdownify }}
{% else %}
{% unless post.categories contains "goodies" and page.path contains "goodies" %}
{{ post.excerpt | markdownify }}
{% endunless %}
{% endif %}
{% if post.categories contains "goodies" and page.path contains "goodies" %}
<footer class="goodie-actions">
<p class="info col3">
<a class="btn icon-info" href="{{ post.url | append: '/' }}">Release Post</a>
</p>
{% if post.download %}
<p class="download col3">
<a class="btn icon-download" href="/media/{{ post.download }}">Download <span>zip</span></a>
</p>
{% endif %}
</footer>
{% endif %}
{% unless page.path contains "goodies" %}
<a class="more-link" href="{{ post.url | append: '/' }}">Continue reading <i class="icon-arrow-right"></i></a>
{% endunless %}
</section>
</article>
{% endif %}