summaryrefslogtreecommitdiff
path: root/web/templates/partials/trello-boards.html
blob: bd460cf6fef6825d920bc6af0cf7dbee6dcee0a1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
{{define "trello-boards"}}
{{if .Boards}}
<section class="card section-spacing">
    <!-- Section Header with Brand Color -->
    <div class="flex items-center gap-3 mb-6">
        <div class="w-1 h-8 bg-trello rounded"></div>
        <h2 class="text-2xl font-bold text-gray-900">Trello Boards</h2>
    </div>

    <!-- Active Boards Grid (boards with cards) -->
    <div class="card-grid mb-6">
        {{range .Boards}}
        {{if .Cards}}
        <div class="board-card">
            <h3 class="font-bold text-lg text-gray-900 mb-4">{{.Name}}</h3>
            <div class="space-y-3 max-h-96 overflow-y-auto scrollbar-thin">
                {{range .Cards}}
                <div class="trello-card-item">
                    <p class="font-medium text-sm text-gray-900 mb-2">{{.Name}}</p>
                    <div class="flex flex-wrap gap-2 items-center">
                        {{if .ListName}}
                        <span class="badge bg-gray-100 text-gray-700">
                            {{.ListName}}
                        </span>
                        {{end}}
                        {{if .DueDate}}
                        <span class="badge bg-red-100 text-red-800">
                            Due: {{.DueDate.Format "Jan 2"}}
                        </span>
                        {{end}}
                        {{if .URL}}
                        <a href="{{.URL}}" target="_blank"
                           class="text-trello hover:text-trello/80 text-xs font-medium ml-auto transition-colors">
                            View →
                        </a>
                        {{end}}
                    </div>
                </div>
                {{end}}
            </div>
        </div>
        {{end}}
        {{end}}
    </div>

    <!-- Empty Boards Collapsible (boards without cards) -->
    <details class="mt-6 border-t border-gray-200 pt-6">
        <summary class="cursor-pointer flex items-center justify-between group">
            <span class="text-sm font-medium text-gray-600 group-hover:text-gray-900 transition-colors">
                Empty Boards
            </span>
            <svg class="w-5 h-5 text-gray-400 group-hover:text-gray-600 transition-all"
                 fill="none" stroke="currentColor" viewBox="0 0 24 24">
                <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7" />
            </svg>
        </summary>
        <div class="mt-4">
            <div class="card-grid">
                {{range .Boards}}
                {{if not .Cards}}
                <div class="border border-gray-200 rounded-lg p-4 bg-gray-50 opacity-70 hover:opacity-100 transition-opacity">
                    <h3 class="font-semibold text-gray-700">{{.Name}}</h3>
                    <p class="text-sm text-gray-500 mt-2">No cards</p>
                </div>
                {{end}}
                {{end}}
            </div>
        </div>
    </details>
</section>
{{end}}
{{end}}