Files
labyricorn-site/templates/home.html
T
Labyricorn aae9836b99
Deploy production / deploy (push) Successful in 2s
Batch recent activity six at a time
2026-08-12 00:09:20 -07:00

50 lines
1.9 KiB
HTML

<section class="hero">
<div class="shell narrow">
<p class="eyebrow">{{ this.eyebrow }}</p>
<h1>{{ this.summary }}</h1>
<div class="dek">{{ this.body }}</div>
</div>
</section>
<section class="activity-section">
<div class="shell">
<div class="section-heading">
<span>Recent Activity</span>
<span>Sorted by date</span>
</div>
<div class="timeline" id="recent-activity-list" data-activity-feed data-batch-size="6">
{% set entries = [] %}
{% for section_id in ['projects', 'articles', 'blog'] %}
{% for item in site.get('/' ~ section_id).children %}
{% if entries.append(item) %}{% endif %}
{% endfor %}
{% endfor %}
{% for project in site.query('/projects') %}
{% if project._model == 'project' %}
{% set devlog = site.get(project.path ~ '/devlog') %}
{% if devlog %}
{% for entry in devlog.children %}
{% if entries.append(entry) %}{% endif %}
{% endfor %}
{% endif %}
{% endif %}
{% endfor %}
{% for item in entries|sort(attribute='date', reverse=true) %}
<article class="timeline-entry accent-{{ item.kicker|lower }}" data-activity-item>
<div class="entry-meta">
<span class="label">{{ item.kicker }}</span>
<time datetime="{{ item.date }}">{{ item.date|dateformat('YYYY.MM.dd') }}</time>
</div>
<h2><a href="{{ item|url }}">{{ item.title }}</a></h2>
<p>{{ item.summary }}</p>
<a class="read-more" href="{{ item|url }}">Read entry →</a>
</article>
{% endfor %}
</div>
<div class="activity-controls" data-activity-controls hidden>
<p class="activity-status" data-activity-status aria-live="polite"></p>
<button class="activity-more-button" type="button" data-activity-more aria-controls="recent-activity-list">Show 6 more</button>
</div>
</div>
</section>