Files
labyricorn-site/templates/home.html
T
Labyricorn ad2fa3729d
Deploy production / deploy (push) Successful in 19s
Limit homepage devlogs and add refresh trigger
2026-08-20 16:03:22 -07:00

93 lines
4.6 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="homepage-discovery-grid">
<section class="homepage-panel" aria-labelledby="recent-activity-heading">
<div class="section-heading">
<span id="recent-activity-heading">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 ['articles', 'blog'] %}
{% for item in site.get('/' ~ section_id).children %}
{% if entries.append(item) %}{% endif %}
{% endfor %}
{% endfor %}
{% for project in site.query('/projects').filter(F._model == 'project') %}
{% set devlog = site.get(project.path ~ '/devlog') %}
{% if devlog %}
{% set latest_devlog_entry = devlog.children.order_by('-date', '-source_commit_time').first() %}
{% if latest_devlog_entry and entries.append(latest_devlog_entry) %}{% 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>
</section>
<section class="homepage-panel featured-projects-panel" aria-labelledby="featured-projects-heading">
<div class="section-heading">
<span id="featured-projects-heading">Featured Projects</span>
<span>Curated work</span>
</div>
<div class="featured-project-list">
{% for project in site.query('/projects').filter(F._model == 'project').filter(F.featured == true).order_by('featured_order', '-date').limit(3) %}
{% set devlog = site.get(project.path ~ '/devlog') %}
{% set latest_activity = devlog.children.order_by('-date', '-source_commit_time').first() if devlog else none %}
<article class="featured-project-card">
<div class="featured-project-meta">
<span class="label">{{ project.status }}</span>
<time datetime="{{ project.date }}">{{ project.date|dateformat('YYYY.MM.dd') }}</time>
</div>
<h2><a href="{{ project|url }}">{{ project.title }}</a></h2>
<p>{{ project.summary }}</p>
{% if project.technology_labels %}
<div class="featured-project-technologies" aria-label="Technologies">
{% for technology in project.technology_labels[:4] %}
{% set parts = technology.split('\t', 1) %}
<span>{{ parts[1] if parts|length > 1 else parts[0] }}</span>
{% endfor %}
</div>
{% endif %}
{% if latest_activity %}
<div class="featured-project-latest">
<span>Latest activity</span>
<a href="{{ latest_activity|url }}"><time datetime="{{ latest_activity.date }}">{{ latest_activity.date|dateformat('YYYY.MM.dd') }}</time> {{ latest_activity.title }} →</a>
</div>
{% endif %}
<div class="featured-project-actions">
<a href="{{ project|url }}">View project →</a>
{% if devlog %}<a href="{{ devlog|url }}">Devlog →</a>{% endif %}
</div>
</article>
{% else %}
<p class="featured-projects-empty">Selected projects will appear here.</p>
{% endfor %}
</div>
<a class="featured-projects-link" href="{{ '/projects'|url }}">View all projects →</a>
</section>
</div>
</div>
</section>