Browse Source

Improvements

single-block-api
Peter Stuifzand 2 years ago
parent
commit
1d6956f81c
  1. 2
      .editorconfig
  2. 2
      render.go
  3. 4
      templates/edit.html
  4. 2
      templates/history.html

2
.editorconfig

@ -0,0 +1,2 @@ @@ -0,0 +1,2 @@
[*.go]
indent_size = 8

2
render.go

@ -142,6 +142,8 @@ func (checklist *Checklist) Render(w io.Writer) error { @@ -142,6 +142,8 @@ func (checklist *Checklist) Render(w io.Writer) error {
buf.WriteString(`<span class="icon is-medium">`)
if item.Checked {
buf.WriteString(`<i class="fa fa-check-circle has-text-success"></i>`)
} else {
buf.WriteString(`<i class="fa fa-circle-thin"></i>`)
}
buf.WriteString(`</span>`)
buf.WriteString(`<div class="checklist--item-text">`)

4
templates/edit.html

@ -1,3 +1,7 @@ @@ -1,3 +1,7 @@
{{ define "navbar" }}
<a href="/{{ .Name }}" class="navbar-item">Back</a>
{{ end }}
{{define "content"}}
<h1 class="title">{{ .Title }}</h1>
<form action="/save/" method="post">

2
templates/history.html

@ -11,4 +11,4 @@ @@ -11,4 +11,4 @@
</section>
<hr/>
{{ end }}
{{ end }}
{{ end }}

Loading…
Cancel
Save