Daybook: a self-hosted, multi-user Django + DRF app where agents, scripts, or people publish artifacts and each logged-in user browses their own time-ordered, label-filterable feed. This squashes prior local development history (kept privately on a separate branch) into a single clean starting point for the public repository. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
42 lines
2.7 KiB
HTML
42 lines
2.7 KiB
HTML
{% for group in day_groups %}
|
|
<div class="day-group">
|
|
<div class="day-separator">
|
|
<span>{{ group.day|date:"D, M j Y" }}{% if group.day == today %} <em class="today-badge">Today</em>{% endif %}</span>
|
|
<span class="day-separator-count">{{ group.artifacts|length }}</span>
|
|
</div>
|
|
{% for artifact in group.artifacts %}
|
|
<a class="artifact-row {% if selected_artifact.id == artifact.id %}selected{% endif %} {% if artifact.is_unread %}unread{% endif %} {% if artifact.is_kept %}kept{% endif %}"
|
|
href="?{% if selected_source %}source={{ selected_source|urlencode }}&{% endif %}{% if selected_label %}label={{ selected_label|urlencode }}&{% endif %}{% if selected_kind %}kind={{ selected_kind|urlencode }}&{% endif %}{% if title_query %}q={{ title_query|urlencode }}&{% endif %}artifact={{ artifact.id }}&view={{ selected_view }}"
|
|
data-artifact-id="{{ artifact.id }}"
|
|
data-title="{{ artifact.title }}"
|
|
data-kind="{{ artifact.kind }}"
|
|
data-source="{{ artifact.source }}"
|
|
data-source-type="{{ artifact.source_type }}"
|
|
data-source-name="{{ artifact.source_name }}"
|
|
data-created="{{ artifact.created_at|date:'M j Y, H:i' }}"
|
|
data-size="{{ artifact.size_bytes|filesizeformat }}"
|
|
data-kept="{{ artifact.is_kept|yesno:'1,0' }}"
|
|
data-tags="{{ artifact.tags|join:', ' }}"
|
|
data-rendered-url="{% url 'artifact' artifact.id %}"
|
|
data-raw-url="{% url 'artifact' artifact.id %}?raw=1">
|
|
<time class="artifact-time" datetime="{{ artifact.created_at|date:'c' }}">{{ artifact.created_at|date:"H:i" }}</time>
|
|
<span class="artifact-row-main">
|
|
<span class="artifact-title">{{ artifact.title }}</span>
|
|
<span class="artifact-kind-text">{% if artifact.kind == "image" %}image{% elif artifact.kind == "pdf" %}pdf{% elif artifact.kind == "markdown" %}markdown{% elif artifact.kind == "deck" %}deck{% elif artifact.kind == "binary" %}binary{% else %}html{% endif %}</span>
|
|
<span class="kept-badge" data-kept-badge title="Kept — never auto-deleted"{% if not artifact.is_kept %} hidden{% endif %}>K</span>
|
|
{% if artifact.label_chips %}
|
|
<span class="tag-chips">
|
|
{% for label in artifact.label_chips %}
|
|
<span class="tag-chip" style="background:{{ label.color }}">{{ label.name }}</span>
|
|
{% endfor %}
|
|
</span>
|
|
{% endif %}
|
|
</span>
|
|
<span class="artifact-source">{{ artifact.source }}</span>
|
|
</a>
|
|
{% endfor %}
|
|
</div>
|
|
{% endfor %}
|
|
{% if has_more %}
|
|
<div class="feed-more" data-feed-more data-next-before="{{ next_before }}"></div>
|
|
{% endif %}
|