feat: eisenhower matrix view

This commit is contained in:
2026-03-01 22:22:19 +00:00
parent d792f89fe6
commit 8499c99721
5 changed files with 358 additions and 0 deletions

View File

@@ -64,6 +64,10 @@
<svg class="nav-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="3" y="4" width="18" height="18" rx="2" ry="2"/><line x1="16" y1="2" x2="16" y2="6"/><line x1="8" y1="2" x2="8" y2="6"/><line x1="3" y1="10" x2="21" y2="10"/><rect x="7" y="14" width="3" height="3" rx="0.5"/><rect x="14" y="14" width="3" height="3" rx="0.5"/></svg>
Calendar
</a>
<a href="/eisenhower" class="nav-item {{ 'active' if active_nav == 'eisenhower' }}">
<svg class="nav-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="3" y="3" width="8" height="8" rx="1"/><rect x="13" y="3" width="8" height="8" rx="1"/><rect x="3" y="13" width="8" height="8" rx="1"/><rect x="13" y="13" width="8" height="8" rx="1"/></svg>
Eisenhower
</a>
<a href="/decisions" class="nav-item {{ 'active' if active_nav == 'decisions' }}">
<svg class="nav-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10z"/><path d="M9 12l2 2 4-4"/></svg>
Decisions

129
templates/eisenhower.html Normal file
View File

@@ -0,0 +1,129 @@
{% extends "base.html" %}
{% block content %}
<div class="page-header">
<h1>Eisenhower Matrix</h1>
<span class="text-muted">{{ total }} open tasks classified by priority &amp; urgency</span>
</div>
<div class="eisenhower-grid">
<!-- Axis labels -->
<div class="eisenhower-y-label">
<span>Important</span>
</div>
<!-- Q1: Urgent + Important -->
<div class="eisenhower-quadrant eisenhower-q1">
<div class="eisenhower-quadrant-header">
<h3>Do First</h3>
<span class="eisenhower-quadrant-subtitle">Urgent &amp; Important</span>
<span class="badge badge-red">{{ counts.do_first }}</span>
</div>
<div class="eisenhower-task-list">
{% for task in quadrants.do_first %}
<a href="/tasks/{{ task.id }}" class="eisenhower-task">
<span class="priority-dot priority-{{ task.priority }}"></span>
<span class="eisenhower-task-title">{{ task.title }}</span>
{% if task.due_date %}
<span class="eisenhower-task-due {% if task.due_date < today %}overdue{% endif %}">
{{ task.due_date.strftime('%b %-d') }}
</span>
{% endif %}
{% if task.project_name %}
<span class="eisenhower-task-project">{{ task.project_name }}</span>
{% endif %}
</a>
{% else %}
<div class="eisenhower-empty">No tasks</div>
{% endfor %}
</div>
</div>
<!-- Q2: Not Urgent + Important -->
<div class="eisenhower-quadrant eisenhower-q2">
<div class="eisenhower-quadrant-header">
<h3>Schedule</h3>
<span class="eisenhower-quadrant-subtitle">Not Urgent &amp; Important</span>
<span class="badge badge-accent">{{ counts.schedule }}</span>
</div>
<div class="eisenhower-task-list">
{% for task in quadrants.schedule %}
<a href="/tasks/{{ task.id }}" class="eisenhower-task">
<span class="priority-dot priority-{{ task.priority }}"></span>
<span class="eisenhower-task-title">{{ task.title }}</span>
{% if task.due_date %}
<span class="eisenhower-task-due">{{ task.due_date.strftime('%b %-d') }}</span>
{% endif %}
{% if task.project_name %}
<span class="eisenhower-task-project">{{ task.project_name }}</span>
{% endif %}
</a>
{% else %}
<div class="eisenhower-empty">No tasks</div>
{% endfor %}
</div>
</div>
<!-- Second row y-label -->
<div class="eisenhower-y-label">
<span>Not Important</span>
</div>
<!-- Q3: Urgent + Not Important -->
<div class="eisenhower-quadrant eisenhower-q3">
<div class="eisenhower-quadrant-header">
<h3>Delegate</h3>
<span class="eisenhower-quadrant-subtitle">Urgent &amp; Not Important</span>
<span class="badge badge-amber">{{ counts.delegate }}</span>
</div>
<div class="eisenhower-task-list">
{% for task in quadrants.delegate %}
<a href="/tasks/{{ task.id }}" class="eisenhower-task">
<span class="priority-dot priority-{{ task.priority }}"></span>
<span class="eisenhower-task-title">{{ task.title }}</span>
{% if task.due_date %}
<span class="eisenhower-task-due {% if task.due_date < today %}overdue{% endif %}">
{{ task.due_date.strftime('%b %-d') }}
</span>
{% endif %}
{% if task.project_name %}
<span class="eisenhower-task-project">{{ task.project_name }}</span>
{% endif %}
</a>
{% else %}
<div class="eisenhower-empty">No tasks</div>
{% endfor %}
</div>
</div>
<!-- Q4: Not Urgent + Not Important -->
<div class="eisenhower-quadrant eisenhower-q4">
<div class="eisenhower-quadrant-header">
<h3>Eliminate</h3>
<span class="eisenhower-quadrant-subtitle">Not Urgent &amp; Not Important</span>
<span class="badge badge-muted">{{ counts.eliminate }}</span>
</div>
<div class="eisenhower-task-list">
{% for task in quadrants.eliminate %}
<a href="/tasks/{{ task.id }}" class="eisenhower-task">
<span class="priority-dot priority-{{ task.priority }}"></span>
<span class="eisenhower-task-title">{{ task.title }}</span>
{% if task.due_date %}
<span class="eisenhower-task-due">{{ task.due_date.strftime('%b %-d') }}</span>
{% endif %}
{% if task.project_name %}
<span class="eisenhower-task-project">{{ task.project_name }}</span>
{% endif %}
</a>
{% else %}
<div class="eisenhower-empty">No tasks</div>
{% endfor %}
</div>
</div>
<!-- X-axis labels -->
<div class="eisenhower-x-spacer"></div>
<div class="eisenhower-x-label">Urgent</div>
<div class="eisenhower-x-label">Not Urgent</div>
</div>
{% endblock %}