diff options
| -rw-r--r-- | src/weepinbell/handler.clj | 5 | ||||
| -rw-r--r-- | src/weepinbell/ui.clj | 5 |
2 files changed, 6 insertions, 4 deletions
diff --git a/src/weepinbell/handler.clj b/src/weepinbell/handler.clj index 056c8f4..24d06d6 100644 --- a/src/weepinbell/handler.clj +++ b/src/weepinbell/handler.clj @@ -16,8 +16,9 @@ (process-webmention wmc) (defroutes api-routes - (GET "/" [] (ui/home (get-config :allowed-target-domains) - (get-config :endpoint))) + (GET "/" [target] (ui/home (get-config :allowed-target-domains) + (get-config :endpoint) + target)) ;; receiver endpoint (POST (get-config :endpoint) [source target] (receive {:s source :t target} wmc)) diff --git a/src/weepinbell/ui.clj b/src/weepinbell/ui.clj index d68ef74..5d83063 100644 --- a/src/weepinbell/ui.clj +++ b/src/weepinbell/ui.clj @@ -14,7 +14,7 @@ [:title "Weepinbell - Webmention Receiver"]] [:body slot]]))) -(defn home [domains endpoint] +(defn home [domains endpoint preset-target] (-> [:main.home [:img.banner {:src "/weepinbell.avif"}] @@ -25,7 +25,8 @@ [:p "Have him send a Webmention for you."] [:form {:action endpoint :method "POST"} [:input {:name "source" :placeholder "source"}] - [:input {:name "target" :placeholder "target"}] + [:input {:name "target" :placeholder "target" + :value preset-target}] [:button {:type "submit"} "send"]]]] page-base page-response)) |
