diff options
Diffstat (limited to 'web/templates/partials/tasks-tab.html')
| -rw-r--r-- | web/templates/partials/tasks-tab.html | 41 |
1 files changed, 27 insertions, 14 deletions
diff --git a/web/templates/partials/tasks-tab.html b/web/templates/partials/tasks-tab.html index 43afa7d..9379e5c 100644 --- a/web/templates/partials/tasks-tab.html +++ b/web/templates/partials/tasks-tab.html @@ -10,12 +10,33 @@ {{if .Atoms}} <div class="space-y-4"> {{range .Atoms}} - <div class="bg-white rounded-lg p-6 shadow-sm hover:shadow-md transition-shadow border-l-4 {{.ColorClass}}"> - <div class="flex items-start justify-between"> + <div class="task-item bg-white rounded-lg p-6 shadow-sm hover:shadow-md transition-shadow border-l-4 {{.ColorClass}}"> + <div class="flex items-start gap-4"> + + <!-- Checkbox --> + <div class="pt-1"> + <input type="checkbox" + class="w-5 h-5 text-blue-600 rounded border-gray-300 focus:ring-blue-500 cursor-pointer" + hx-post="/complete-atom" + hx-trigger="change" + hx-vals='{"id": "{{.ID}}", "source": "{{.Source}}"}' + hx-target="closest .task-item" + hx-swap="outerHTML"> + </div> + <div class="flex-1"> - <div class="flex items-center gap-3 mb-2"> - <span class="text-2xl">{{.SourceIcon}}</span> - <h3 class="text-lg font-semibold text-gray-900">{{.Title}}</h3> + <div class="flex items-center justify-between mb-2"> + <div class="flex items-center gap-3"> + <span class="text-2xl">{{.SourceIcon}}</span> + <h3 class="text-lg font-semibold text-gray-900">{{.Title}}</h3> + </div> + {{if .URL}} + <a href="{{.URL}}" target="_blank" class="text-primary-600 hover:text-primary-800 transition-colors"> + <svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"> + <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path> + </svg> + </a> + {{end}} </div> {{if .Description}} @@ -49,14 +70,6 @@ {{end}} </div> </div> - - {{if .URL}} - <a href="{{.URL}}" target="_blank" class="ml-4 text-primary-600 hover:text-primary-800 transition-colors"> - <svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"> - <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path> - </svg> - </a> - {{end}} </div> </div> {{end}} @@ -68,4 +81,4 @@ {{end}} </section> </div> -{{end}}
\ No newline at end of file +{{end}} |
