mirror of
https://github.com/safing/web
synced 2025-09-01 18:49:06 +00:00
Automatically retrieve the last blog/pod on the homepage
This commit is contained in:
parent
04702390bb
commit
a671a59ca2
3 changed files with 13 additions and 37 deletions
|
@ -13,6 +13,9 @@
|
|||
</div>
|
||||
<div class="pt-6">
|
||||
<span class="opacity-25">
|
||||
{% if include.pre_header %}
|
||||
{{ include.pre_header }} -
|
||||
{% endif %}
|
||||
{{ post.date | date: "%-d. %b %Y" }}
|
||||
</span>
|
||||
{% if post.progress_update == true %}
|
||||
|
|
|
@ -22,6 +22,9 @@
|
|||
</span>
|
||||
<div class="pt-6">
|
||||
<span class="opacity-25">
|
||||
{% if include.pre_header %}
|
||||
{{ include.pre_header }} -
|
||||
{% endif %}
|
||||
{{ episode.date | date: "%-d. %b %Y" }}
|
||||
</span>
|
||||
{% assign title_length = episode.title | size %}
|
||||
|
|
44
index.html
44
index.html
|
@ -138,32 +138,10 @@ title: Safing - Love Freedom
|
|||
<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 -->
|
||||
<li class="mt-12 md:mt-0 ">
|
||||
<div class="block transform hover:scale-95 duration-150 ease-in-out">
|
||||
<a href="/podcast/2020/06/29/deadlines-tailwind-designing-safing/">
|
||||
<div class="relative" style="max-width: 365px;">
|
||||
<img src="/assets/img/thumbnails/podcast/placeholder.png">
|
||||
<span class="absolute text-white right-0 bottom-0 pr-3 pb-3" style="font-size: 3.1rem; font-weight: 800;">#22</span>
|
||||
</div>
|
||||
<span style="font-size: 12rem; font-weight: 800; margin-top: -13.8rem; margin-left: -0.8rem;" class=" z-0 absolute bg-top">
|
||||
<button type="button" style="background-color: #6188ff;" class="inline-flex items-center px-3 py-3 rounded-md border border-transparent text-xs leading-5 font-extrabold text-white">
|
||||
<svg class="h-8 w-auto lg:h-7" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
||||
<g fill="none">
|
||||
<path d="M0 0h24v24H0z"></path>
|
||||
<path stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.8" d="M12 15v0c-1.657 0-3-1.343-3-3V6c0-1.657 1.343-3 3-3v0c1.657 0 3 1.343 3 3v6c0 1.657-1.343 3-3 3z"></path>
|
||||
<path stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.8" d="M18 10v2c0 3.314-2.686 6-6 6v0c-3.314 0-6-2.686-6-6v-2M12 18v3M7.82 21h8.36"></path>
|
||||
</g>
|
||||
</svg>
|
||||
</button>
|
||||
</span>
|
||||
<div class="pt-6">
|
||||
<span class="opacity-25">PODCAST - 29. Jun 2020</span>
|
||||
|
||||
<p>Deadlines, Tailwind & Designing Safing - #22</p>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</li>
|
||||
{% assign sorted_podcasts = site.podcasts | reverse %}
|
||||
{% for episode in sorted_podcasts, limit: 1 %}
|
||||
{% include thumbnail_podcast.html pre_header="PODCAST" %}
|
||||
{% endfor %}
|
||||
|
||||
<!-- video -->
|
||||
<li class="mt-12 md:mt-0">
|
||||
|
@ -185,17 +163,9 @@ title: Safing - Love Freedom
|
|||
</li>
|
||||
|
||||
<!-- blog -->
|
||||
<li class="mt-12 md:mt-0">
|
||||
<div class="block transform hover:scale-95 duration-150 ease-in-out">
|
||||
<a href="/blog/2020/06/26/progress-update/">
|
||||
<img src="/assets/img/thumbnails/blog/placeholder.png">
|
||||
<div class="pt-6">
|
||||
<span class="opacity-25">BLOG - 26. Jun 2020</span>
|
||||
<p>Progress Update - #01</p>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</li>
|
||||
{% for post in site.posts, limit: 1 %}
|
||||
{% include thumbnail_blog.html pre_header="BLOG" %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<div class="pt-20 flex w-full">
|
||||
<div class="mx-auto grid md:block">
|
||||
|
|
Loading…
Add table
Reference in a new issue