cleanup and #ffffea
This commit is contained in:
parent
7fd9a01a1a
commit
0eebffc039
@ -332,8 +332,6 @@ func index(w http.ResponseWriter, r *http.Request) {
|
|||||||
template.New("").Funcs(templateFuncs).ParseFS(templates, "templates/main.html"),
|
template.New("").Funcs(templateFuncs).ParseFS(templates, "templates/main.html"),
|
||||||
)
|
)
|
||||||
|
|
||||||
//tmpl = tmpl.Funcs(templateFuncs)
|
|
||||||
|
|
||||||
err = tmpl.ExecuteTemplate(w, "main.html", stuff)
|
err = tmpl.ExecuteTemplate(w, "main.html", stuff)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
http.Error(w, err.Error(), http.StatusInternalServerError)
|
http.Error(w, err.Error(), http.StatusInternalServerError)
|
||||||
|
7
main.go
7
main.go
@ -158,12 +158,17 @@ func main() {
|
|||||||
log.Println(err)
|
log.Println(err)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
defer resp.Body.Close()
|
|
||||||
body, err := io.ReadAll(resp.Body)
|
body, err := io.ReadAll(resp.Body)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Println(err)
|
log.Println(err)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
err = resp.Body.Close()
|
||||||
|
if err != nil {
|
||||||
|
log.Println(err)
|
||||||
|
continue
|
||||||
|
}
|
||||||
contentType := resp.Header.Get("Content-Type")
|
contentType := resp.Header.Get("Content-Type")
|
||||||
|
|
||||||
err = app.queries.AddIcon(app.ctx, data.AddIconParams{
|
err = app.queries.AddIcon(app.ctx, data.AddIconParams{
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<style>
|
<style>
|
||||||
|
html {
|
||||||
|
background-color: #ffffea;
|
||||||
|
}
|
||||||
.icon {
|
.icon {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
|
Loading…
Reference in New Issue
Block a user