small pixel drawing of a pufferfish vore

add submittable text box to feeds page
Jes Olson j3s@c3f.net
Sun, 19 Mar 2023 03:39:07 -0700
commit

97eef91a88034e8eac1e6b69dd4fe039dd8a77be

parent

a1c614841d0c9a0dc951051a26eb6837bdd42b52

1 files changed, 15 insertions(+), 4 deletions(-)

jump to
M site.gosite.go

@@ -44,8 +44,8 @@ username := s.username(r)

fmt.Fprintf(w, `<!DOCTYPE html> <title>%s</title> <p> { %s <a href=/logout>logout</a> } - <p> <a href="/%s">view your feed</a> - <p> <a href="/feeds">edit your feed</a>`, s.title, username, username) + <p> <a href="/%s">view feeds</a> + <p> <a href="/feeds">edit feeds</a>`, s.title, username, username) } else { fmt.Fprintf(w, `<!DOCTYPE html> <title>%s</title>

@@ -170,7 +170,7 @@ }

feeds := s.reaper.GetUserFeeds(s.username(r)) if len(feeds) > 0 { - fmt.Fprintf(w, `<h3>subscribed feeds</h3> + fmt.Fprintf(w, `<h3>your feeds</h3> <table> <thead> <tr>

@@ -187,7 +187,18 @@ <td><p>%s</td>

<tr>`, feed.Link, feed.Title, feed.UpdateURL) } fmt.Fprintf(w, `</tbody> - </table>`) + </table> + <h3>feed urls</h3> + <p>use this box to add/remove URLs that you'd like to follow + <form action="/feeds/validate" method="post"> + <textarea rows="10" cols="72">`) + for _, feed := range feeds { + fmt.Fprintf(w, "%s\n", feed.UpdateURL) + } + fmt.Fprintf(w, ` </textarea> + <br> + <input type="submit" value="submit"> + </form>`) } // TODO: textbox with feed.URL // TODO: validate button