|
|
|
@ -18,6 +18,7 @@ limitations under the License.
|
|
|
|
|
package main
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"bytes"
|
|
|
|
|
"fmt"
|
|
|
|
|
"html/template"
|
|
|
|
|
"io/fs"
|
|
|
|
@ -78,12 +79,18 @@ func (app *application) render(w http.ResponseWriter, status int, page string, d
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
w.WriteHeader(status)
|
|
|
|
|
buf := new(bytes.Buffer)
|
|
|
|
|
|
|
|
|
|
err := ts.ExecuteTemplate(w, "base", data)
|
|
|
|
|
err := ts.ExecuteTemplate(buf, "base", data)
|
|
|
|
|
if err != nil {
|
|
|
|
|
app.serverError(w, err)
|
|
|
|
|
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
w.WriteHeader(status)
|
|
|
|
|
|
|
|
|
|
_, _ = buf.WriteTo(w)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type motionListTemplateData struct {
|
|
|
|
|