add handler, html templates, Makefile and migrations
This commit is contained in:
commit
a06e8db2ff
22 changed files with 1001 additions and 0 deletions
28
templates/threads.html
Normal file
28
templates/threads.html
Normal file
|
@ -0,0 +1,28 @@
|
|||
<!DOCTYPE html>
|
||||
{{define "header"}}
|
||||
<h1 class="mb-0">Explore threads</h1>
|
||||
{{end}}
|
||||
|
||||
{{define "content"}}
|
||||
{{range .Threads}}
|
||||
<div class="card mb-4">
|
||||
<div class="card-body">
|
||||
<a href="#" class="d-block card-title text-body mt-1 h5">
|
||||
{{.Title}}
|
||||
</a>
|
||||
<p class="card-text">{{.Description}}</p>
|
||||
<a href="/threads/{{.ID}}" class="btn btn-primary">Browse Thread</a>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
{{end}}
|
||||
|
||||
{{define "sidebar"}}
|
||||
<div class="card mb-4">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">Create a new thread</h5>
|
||||
<p class="card-text">Start a new community on goddit and share experiences.</p>
|
||||
<a href="/threads/new" class="btn btn-primary btn-block">Create Thread</a>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
Reference in a new issue