diff --git a/service/transport.go b/service/transport.go index dc7e479..d481b21 100644 --- a/service/transport.go +++ b/service/transport.go @@ -167,7 +167,7 @@ func NewHandler(s Service, staticDir string) http.Handler { w.Header().Add("Location", req.Header.Get("Referer")+"#status-"+id) w.WriteHeader(http.StatusFound) - }).Methods(http.MethodGet) + }).Methods(http.MethodPost) r.HandleFunc("/unlike/{id}", func(w http.ResponseWriter, req *http.Request) { ctx := getContextWithSession(context.Background(), req) @@ -180,7 +180,7 @@ func NewHandler(s Service, staticDir string) http.Handler { w.Header().Add("Location", req.Header.Get("Referer")+"#status-"+id) w.WriteHeader(http.StatusFound) - }).Methods(http.MethodGet) + }).Methods(http.MethodPost) r.HandleFunc("/retweet/{id}", func(w http.ResponseWriter, req *http.Request) { ctx := getContextWithSession(context.Background(), req) @@ -193,7 +193,7 @@ func NewHandler(s Service, staticDir string) http.Handler { w.Header().Add("Location", req.Header.Get("Referer")+"#status-"+id) w.WriteHeader(http.StatusFound) - }).Methods(http.MethodGet) + }).Methods(http.MethodPost) r.HandleFunc("/unretweet/{id}", func(w http.ResponseWriter, req *http.Request) { ctx := getContextWithSession(context.Background(), req) @@ -206,7 +206,7 @@ func NewHandler(s Service, staticDir string) http.Handler { w.Header().Add("Location", req.Header.Get("Referer")+"#status-"+id) w.WriteHeader(http.StatusFound) - }).Methods(http.MethodGet) + }).Methods(http.MethodPost) r.HandleFunc("/post", func(w http.ResponseWriter, req *http.Request) { ctx := getContextWithSession(context.Background(), req) diff --git a/static/main.css b/static/main.css index ad03792..e82586d 100644 --- a/static/main.css +++ b/static/main.css @@ -82,6 +82,10 @@ min-width: 64px; } +.status-action form { + display: inline-block; +} + .status-action:last-child { min-width: unset; } diff --git a/templates/status.tmpl b/templates/status.tmpl index 7facba2..1661f58 100644 --- a/templates/status.tmpl +++ b/templates/status.tmpl @@ -101,13 +101,13 @@ {{else}} {{if .Reblogged}} - - - +
{{else}} - - - + {{end}} {{end}} @@ -116,13 +116,13 @@