add a follow button
Ted Unangst tedu@tedunangst.com
Thu, 21 Jan 2021 22:47:58 -0500
2 files changed,
8 insertions(+),
1 deletions(-)
M
docs/changelog.txt
→
docs/changelog.txt
@@ -2,6 +2,8 @@ changelog
=== next ++ A new follow button in a surprise location. + + Fix mastodon import. + Filters work better with hashtags.
M
web.go
→
web.go
@@ -727,7 +727,12 @@ honks = gethonksbyxonker(u.UserID, name, 0)
} else { honks = gethonksbyhonker(u.UserID, name, 0) } - msg := templates.Sprintf(`honks by honker: <a href="%s" ref="noreferrer">%s</a>`, name, name) + miniform := templates.Sprintf(`<form action="/submithonker" method="POST"> +<input type="hidden" name="CSRF" value="%s"> +<input type="hidden" name="url" value="%s"> +<button tabindex=1 name="add honker" value="add honker">add honker</button> +</form>`, login.GetCSRF("submithonker", r), name) + msg := templates.Sprintf(`honks by honker: <a href="%s" ref="noreferrer">%s</a>%s`, name, name, miniform) templinfo := getInfo(r) templinfo["PageName"] = "honker" templinfo["PageArg"] = name