Public Access
1
0

feat: hide future posts in blog page

This commit is contained in:
2025-08-26 00:26:25 -04:00
parent 3a96b683cd
commit fc7e3bf56c

View File

@@ -8,21 +8,23 @@ eleventyExcludeFromCollections: true
<div class="space-y-8"> <div class="space-y-8">
{%- for post in collections.general | reverse -%} {%- for post in collections.general | reverse -%}
<div class="card"> {%- if post.date <= page.date -%}
<h2 class="text-2xl font-bold mb-1"> <div class="card">
<a href="{{ post.url }}" class="text-blue-400 hover:underline">{{ post.data.title }}</a> <h2 class="text-2xl font-bold mb-1">
</h2> <a href="{{ post.url }}" class="text-blue-400 hover:underline">{{ post.data.title }}</a>
<div class="flex items-center text-gray-400 mb-4"> </h2>
<i class="fas fa-calendar-alt mr-2"></i> <div class="flex items-center text-gray-400 mb-4">
<p>{{ post.date | readableDate }}</p> <i class="fas fa-calendar-alt mr-2"></i>
<span class="mx-2 text-gray-600">|</span> <p>{{ post.date | readableDate }}</p>
<i class="fas fa-eye mr-2"></i> <span class="mx-2 text-gray-600">|</span>
<span class="view-count" data-view-count data-slug="{{ post.fileSlug }}">...</span> <i class="fas fa-eye mr-2"></i>
<span class="view-count" data-view-count data-slug="{{ post.fileSlug }}">...</span>
</div>
{% if post.data.excerpt %}
<p class="text-gray-300">{{ post.data.excerpt }}</p>
{% endif %}
</div> </div>
{% if post.data.excerpt %} {%- endif -%}
<p class="text-gray-300">{{ post.data.excerpt }}</p>
{% endif %}
</div>
{%- endfor -%} {%- endfor -%}
</div> </div>
<script src="/js/view-counter.js"></script> <script src="/js/view-counter.js"></script>