Skip to content

Commit

Permalink
add edit link at bottom
Browse files Browse the repository at this point in the history
  • Loading branch information
vimeh committed Sep 11, 2023
1 parent 487b232 commit 60e0fc4
Showing 1 changed file with 16 additions and 11 deletions.
27 changes: 16 additions & 11 deletions main.go
Expand Up @@ -84,20 +84,25 @@ func renderHandler(w http.ResponseWriter, r *http.Request) {
return
}

w.Write([]byte(fmt.Sprintf(`<!DOCTYPE html>
<html>
<head>
<title>%s</title>
<link rel="stylesheet" type="text/css" href="/static/styles.css">
</head>
<body>
<div class="container">
`, pageTitle)))
w.Write([]byte(fmt.Sprintf(`
<!DOCTYPE html>
<html>
<head>
<title>%s</title>
<link rel="stylesheet" type="text/css" href="/static/styles.css">
</head>
<body>
<div class="container">`, pageTitle)))

w.Write(htmlContent)

w.Write([]byte(`</div></body>
</html>`))
w.Write([]byte(`
<footer style="margin-top: 20px;">
<a href="/edit">Edit</a>
</footer>
</div>
</body>
</html>`))
}

func downloadHandler(w http.ResponseWriter, r *http.Request) {
Expand Down

0 comments on commit 60e0fc4

Please sign in to comment.