blog/_layouts/home.html

64 lines
2 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
layout: default
---
<div class="blog-home">
{% include message.html %} {% if site.posts.size > 0 %}
<ul class="blog-home__list-items">
{% for post in site.posts %}
<li class="blog-home__list-items__item">
<div class="blog-home__list-items__item__header">
<div class="blog-home__list-items__item__header__description">
<span
>🗓️ {% assign date_format = site.minima.date_format | default: "%b
%-d, %Y" %} {{ post.date | date: date_format }}
</span>
<span
>#️⃣
<a href="/{{post.category}}"
>{{post.category | capitalize }}</a
></span
>
</div>
<div>
<h3 class="blog-home__list-items__item__header__title">
<a href="{{ post.url | relative_url }}"
>{{ post.title | escape }}</a
>
</h3>
</div>
<div class="blog-home__list-items__item__header__description">
<span>{{post.description}}</span><br />
</div>
</div>
<div class="blog-home__list-items__item__excerpt">
{% if post.image %}
<a href="{{post.url | relative_url}}"
><img
class="blog-home__list-items__item__excerpt__thumb"
alt="{{ post.description | escape }}"
title="{{ post.description | escape }}"
src="../assets/images/{{ post.image }}.jpg"
/></a>
{% else %}
<!-- <a href="{{post.url | relative_url}}"
><img
class="blog-home__list-items__item__excerpt__thumb"
alt="{{ post.description | escape }}"
title="{{ post.description | escape }}"
src="../assets/images/hello-world.jpg"
/></a> -->
{% endif %} {{ post.excerpt }}
</div>
<div class="blog-home__list-items__item__readmore">
<a href="{{ post.url | relative_url }}" class="button"
>Continue Reading</a
>
</div>
</li>
{% endfor %}
</ul>
{% endif %}
</div>