New blog layout

This commit is contained in:
Tom 2023-10-13 15:50:53 +02:00
parent 673442652d
commit a75f993831
2 changed files with 19 additions and 37 deletions

View File

@ -1,27 +0,0 @@
---
title: Blog
layout: default
permalink: /blog-alt/
mathjax: false
---
{% for post in site.posts %}
<article class="h-entry blogroll">
<figure>
<img class="u-photo"
src = "{{ post.thumbnail | default: post.image }}"
class = "{{ post.image_class }}"
alt="{{post.alt}}">
</figure>
<section>
<h2 class="p-name blogroll-title"><a class="u-uid u-url" href="{{ post.url }}">{{ post.title }}</a></h2>
<time class="dt-published" datetime="{{ post.date | date_to_xmlschema }}">{{ post.date | date_to_string }}</time>
<summary class="p-summary">{{ post.excerpt | markdownify | remove: '<p>' | remove: '</p>' }}</summary>
</section>
</article>
{% unless forloop.last %}
<hr class="blogroll">
{% endunless %}
{% endfor %}

View File

@ -4,17 +4,26 @@ layout: default
permalink: /
redirect_from:
- /blog/
head: <script type="module" src="/assets/js/model-viewer.js"></script>
mathjax: false
---
{% for post in site.posts %}
<article class="h-entry">
<h2 class="p-name blogroll-title"><a class="u-uid u-url" href="{{ post.url }}">{{ post.title }}</a></h2>
<time class="dt-published" datetime="{{ post.date | date_to_xmlschema }}">{{ post.date | date_to_string }}</time>
<summary class="p-summary">{{ post.excerpt | markdownify | remove: '<p>' | remove: '</p>' }}</summary>
{% unless post.hide_image %}
<figure class="blogroll">
<img class="u-photo" src = "{{post.image}}" alt="{{post.alt}}">
</figure>
{% endunless %}
<article class="h-entry blogroll">
<figure>
<img class="u-photo"
src = "{{ post.thumbnail | default: post.image }}"
class = "{{ post.image_class }}"
alt="{{post.alt}}">
</figure>
<section>
<h2 class="p-name blogroll-title"><a class="u-uid u-url" href="{{ post.url }}">{{ post.title }}</a></h2>
<time class="dt-published" datetime="{{ post.date | date_to_xmlschema }}">{{ post.date | date_to_string }}</time>
<summary class="p-summary">{{ post.excerpt | markdownify | remove: '<p>' | remove: '</p>' }}</summary>
</section>
</article>
{% unless forloop.last %}
<hr class="blogroll">
{% endunless %}
{% endfor %}