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