mirror of
https://github.com/safing/web
synced 2025-09-01 10:39:03 +00:00
Show the last 6 publications on the homepage
This commit is contained in:
parent
2243da0537
commit
9cae6702c9
1 changed files with 12 additions and 15 deletions
27
index.html
27
index.html
|
@ -103,22 +103,19 @@ title: Safing - Love Freedom
|
|||
</div>
|
||||
<div class="mt-8 lg:mt-32">
|
||||
<ul class="md:grid md:grid-cols-2 lg:grid-cols-3 md:col-gap-8 md:row-gap-10 max-w-sm mx-auto md:max-w-full">
|
||||
<!-- podcast -->
|
||||
{% assign sorted_podcasts = site.medias | reverse | where:"category","podcast" %}
|
||||
{% for episode in sorted_podcasts limit: 1 %}
|
||||
{% include thumbnail_podcast.html pre_header="PODCAST" %}
|
||||
{% endfor %}
|
||||
{% assign all_publications = site.medias | sort: "date" | reverse %}
|
||||
|
||||
<!-- video -->
|
||||
{% assign sorted_videos = site.medias | reverse | where:"category","video" %}
|
||||
{% for video in sorted_videos limit: 1 %}
|
||||
{% include thumbnail_video.html pre_header="VIDEO" %}
|
||||
{% endfor %}
|
||||
|
||||
<!-- blog -->
|
||||
{% assign sorted_blogs = site.medias | reverse | where:"category","blog" %}
|
||||
{% for post in sorted_blogs limit: 1 %}
|
||||
{% include thumbnail_blog.html pre_header="BLOG" %}
|
||||
{% for publication in all_publications limit: 6 %}
|
||||
{% if publication.category == "blog" %}
|
||||
{% assign post = publication %}
|
||||
{% include thumbnail_blog.html pre_header="BLOG" %}
|
||||
{% elsif publication.category == "video" %}
|
||||
{% assign video = publication %}
|
||||
{% include thumbnail_video.html pre_header="VIDEO" %}
|
||||
{% elsif publication.category == "podcast" %}
|
||||
{% assign episode = publication %}
|
||||
{% include thumbnail_podcast.html pre_header="PODCAST" %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<div class="pt-20 flex w-full">
|
||||
|
|
Loading…
Add table
Reference in a new issue