mirror of
https://codeberg.org/mycelium/emojiquest.git
synced 2024-09-30 23:32:58 +00:00
also submit emoji url
This commit is contained in:
parent
a9048f05bc
commit
3c029c9563
3
main.go
3
main.go
|
@ -9,6 +9,7 @@ import (
|
|||
|
||||
type EmojiDetails struct {
|
||||
Label string
|
||||
Url string
|
||||
}
|
||||
|
||||
//go:embed templates
|
||||
|
@ -24,9 +25,11 @@ func handleForm(w http.ResponseWriter, r *http.Request) {
|
|||
|
||||
details := EmojiDetails{
|
||||
Label: r.FormValue("label"),
|
||||
Url: r.FormValue("url"),
|
||||
}
|
||||
|
||||
log.Print(details.Label)
|
||||
log.Print(details.Url)
|
||||
|
||||
tmpl.Execute(w, struct{ Success bool }{true})
|
||||
}
|
||||
|
|
|
@ -20,10 +20,14 @@
|
|||
{{end}}
|
||||
<h1>Request An Emoji</h1>
|
||||
<form method="POST">
|
||||
<span>
|
||||
<label for="emojiLabel">Emoji label</label>
|
||||
<input type="text" id="emojiLabel" name="label" placeholder="blobcatNotLikeThis">
|
||||
</span>
|
||||
<div>
|
||||
<label for="label">Emoji label</label>
|
||||
<input type="text" id="label" name="label" placeholder="blobcatNotLikeThis">
|
||||
</div>
|
||||
<div>
|
||||
<label for="url">Emoji URL</label>
|
||||
<input type="text" id="url" name="url" placeholder="https://...">
|
||||
</div>
|
||||
<input type="submit">
|
||||
</form>
|
||||
</body>
|
||||
|
|
Loading…
Reference in a new issue