tracker: single-binary project tracker with auth, api keys, and json api
Go + SQLite web app, server-rendered, hackerman theme. Projects with descriptions, searchable notes, todo/doing/done task tracking. Bcrypt login sessions, hashed api keys, full /api/v1 crud. Deploys on straylight via configs/tracker.nix (prebuilt binary).
This commit is contained in:
@@ -0,0 +1,61 @@
|
||||
{{template "header" .}}
|
||||
|
||||
<section class="panel">
|
||||
<div class="row spread">
|
||||
<h1 class="glow">{{.Project.Name}}</h1>
|
||||
<div class="row">
|
||||
<a class="btn" href="/projects/{{.Project.ID}}/edit">edit</a>
|
||||
<form method="post" action="/projects/{{.Project.ID}}/delete" onsubmit="return confirm('delete project and all its data?')">
|
||||
<button type="submit" class="btn danger">rm -rf</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{{if .Project.Description}}<p class="description">{{.Project.Description}}</p>
|
||||
{{else}}<p class="muted">no description.</p>{{end}}
|
||||
</section>
|
||||
|
||||
<section class="panel">
|
||||
<h2 class="glow">// tasks</h2>
|
||||
<form method="post" action="/projects/{{.Project.ID}}/tasks" class="inline-form">
|
||||
<input type="text" name="title" placeholder="new task…" required maxlength="240">
|
||||
<button type="submit" class="btn primary">add ▸</button>
|
||||
</form>
|
||||
{{if not .Tasks}}<p class="muted">no tasks queued.</p>{{end}}
|
||||
<ul class="task-list">
|
||||
{{range .Tasks}}
|
||||
<li class="task">
|
||||
<form method="post" action="/tasks/{{.ID}}/cycle">
|
||||
<button type="submit" class="status {{.Status}}" title="cycle status">{{statusLabel .Status}}</button>
|
||||
</form>
|
||||
<span class="task-title {{.Status}}">{{.Title}}</span>
|
||||
<form method="post" action="/tasks/{{.ID}}/delete" class="push">
|
||||
<button type="submit" class="btn ghost" title="delete">✕</button>
|
||||
</form>
|
||||
</li>
|
||||
{{end}}
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
<section class="panel">
|
||||
<h2 class="glow">// notes</h2>
|
||||
<form method="post" action="/projects/{{.Project.ID}}/notes" class="stack">
|
||||
<textarea name="body" placeholder="log an entry…" rows="3" required></textarea>
|
||||
<div class="row"><button type="submit" class="btn primary">log ▸</button></div>
|
||||
</form>
|
||||
{{if not .Notes}}<p class="muted">no entries logged.</p>{{end}}
|
||||
<ul class="note-list">
|
||||
{{range .Notes}}
|
||||
<li class="note">
|
||||
<div class="row spread">
|
||||
<span class="muted">[{{dateFmt .CreatedAt}}]</span>
|
||||
<form method="post" action="/notes/{{.ID}}/delete">
|
||||
<button type="submit" class="btn ghost" title="delete">✕</button>
|
||||
</form>
|
||||
</div>
|
||||
<p class="note-body">{{.Body}}</p>
|
||||
</li>
|
||||
{{end}}
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
{{template "footer" .}}
|
||||
Reference in New Issue
Block a user