Files
pi-weekly-newspaper/templates/dashboard.html

48 lines
1.4 KiB
HTML
Raw Normal View History

{% extends "base.html" %}
{% block title %}Dashboard{% endblock %}
{% block content %}
<h1>Dashboard</h1>
<div class="stats-grid">
<div class="stat-card">
<span class="number">{{ articles_this_week }}</span>
<span class="label">Articles This Week</span>
</div>
<div class="stat-card">
<span class="number">{{ total_articles }}</span>
<span class="label">Total Cached</span>
</div>
<div class="stat-card">
<span class="number">{{ total_issues }}</span>
<span class="label">Issues Published</span>
</div>
</div>
<hgroup>
<h3>Scheduler</h3>
<p>
Status: <strong>{{ "Running" if scheduler_status.running else "Stopped" }}</strong>
{% if scheduler_status.rss_fetch %}
· Next fetch: {{ scheduler_status.rss_fetch.next_run }}
· Interval: {{ scheduler_status.rss_fetch.interval_hours }}h
{% endif %}
</p>
</hgroup>
<div class="action-buttons">
<form method="post" action="/fetch-now">
<button type="submit">Fetch Now</button>
</form>
<a href="/articles" role="button" class="outline">View</a>
<a href="/publish" role="button">Publish New</a>
</div>
{% if latest_issue %}
<h3>Latest Issue</h3>
<p>
{{ latest_issue.week_start }} {{ latest_issue.week_end }}
· <a href="/issues/{{ latest_issue.id }}/download">Download ePub</a>
</p>
{% endif %}
{% endblock %}