Files
Todoist-Actual-Backup/todoist_backup_template.html
2025-10-17 07:37:24 -04:00

102 lines
4.3 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Todoist Backup - {{ date }}</title>
<style>
body { font-family: Arial, sans-serif; background: #f8f9fa; color: #222; margin: 0; padding: 0; }
.container { max-width: 900px; margin: 2em auto; background: #fff; padding: 2em; border-radius: 8px; box-shadow: 0 2px 8px #0001; }
h1, h2, h3 { color: #2d72d9; }
.project { margin-bottom: 2em; }
.task-list { margin: 0 0 1em 1em; }
.task { border-bottom: 1px solid #eee; padding: 0.5em 0; }
.completed { color: #888; }
.attachments { margin: 0.5em 0 0.5em 1em; }
.comments { margin: 0.5em 0 0.5em 1em; font-size: 0.95em; color: #444; }
.field { font-weight: bold; }
a.attachment-link { color: #2d72d9; text-decoration: underline; }
.meta { color: #666; font-size: 0.95em; }
</style>
</head>
<body>
<div class="container">
<h1>Todoist Backup ({{ date }})</h1>
<!-- Table of Contents -->
<nav style="margin-bottom:2em;">
<h2 style="font-size:1.2em;">Projects</h2>
<ul>
{% for project in projects %}
<li><a href="#project-{{ project.id }}">{{ project.name }}{% if project.is_archived %} <span class="meta">[Archived]</span>{% endif %}</a></li>
{% endfor %}
</ul>
</nav>
{% for project in projects %}
<div class="project" id="project-{{ project.id }}">
<h2>{{ project.name }} {% if project.is_archived %}<span class="meta">[Archived]</span>{% endif %}</h2>
<div class="meta">
<span>ID: {{ project.id }}</span> | <span>Color: {{ project.color }}</span> | <span>Created: {{ project.created_at }}</span>
</div>
<h3>Active Tasks</h3>
<div class="task-list">
{% for task in project.tasks %}
<div class="task">
<span class="field">Content:</span> {{ task.content }}<br>
<span class="meta">ID: {{ task.id }} | Due: {{ task.due }} | Priority: {{ task.priority }}</span><br>
{% if task.attachments %}
<div class="attachments">
<span class="field">Attachments:</span>
<ul>
{% for att in task.attachments %}
<li><a class="attachment-link" href="{{ att.local_file }}" download>{{ att.file_name or att.local_file }}</a></li>
{% endfor %}
</ul>
</div>
{% endif %}
{% if task.comments %}
<div class="comments">
<span class="field">Comments:</span>
<ul>
{% for comment in task.comments %}
<li>{{ comment.content }} <span class="meta">({{ comment.posted_at }})</span></li>
{% endfor %}
</ul>
</div>
{% endif %}
</div>
{% endfor %}
</div>
<h3>Completed Tasks</h3>
<div class="task-list">
{% for task in project.completed_tasks %}
<div class="task completed">
<span class="field">Content:</span> {{ task.content }}<br>
<span class="meta">ID: {{ task.id }} | Due: {{ task.due }} | Priority: {{ task.priority }}</span><br>
{% if task.attachments %}
<div class="attachments">
<span class="field">Attachments:</span>
<ul>
{% for att in task.attachments %}
<li><a class="attachment-link" href="{{ att.local_file }}" download>{{ att.file_name or att.local_file }}</a></li>
{% endfor %}
</ul>
</div>
{% endif %}
{% if task.comments %}
<div class="comments">
<span class="field">Comments:</span>
<ul>
{% for comment in task.comments %}
<li>{{ comment.content }} <span class="meta">({{ comment.posted_at }})</span></li>
{% endfor %}
</ul>
</div>
{% endif %}
</div>
{% endfor %}
</div>
</div>
{% endfor %}
</div>
</body>
</html>