diff options
| -rw-r--r-- | src/app.phel | 3 | ||||
| -rw-r--r-- | src/controller/routes.phel | 3 | ||||
| -rw-r--r-- | src/view/main.phel | 16 |
3 files changed, 1 insertions, 21 deletions
diff --git a/src/app.phel b/src/app.phel index 41565bf..0397b99 100644 --- a/src/app.phel +++ b/src/app.phel @@ -10,9 +10,6 @@ (r/router [["/" {:handler (fn [req] (routes/index-handler req router))}] - ["/ping" {:name ::ping - :get {:handler routes/ping-handler} - :post {:handler routes/ping-handler}}] ["/book" {:post {:handler routes/book-create-handler}}] ["/book/{id}/session" {:post {:handler routes/book-session-create-handler}}] ["/author/{id}" {:name :author diff --git a/src/controller/routes.phel b/src/controller/routes.phel index acfc2af..38d1882 100644 --- a/src/controller/routes.phel +++ b/src/controller/routes.phel @@ -15,9 +15,6 @@ (h/response-from-map {:status 200 :body (index-html books router)}))) -(defn ping-handler [req] - (h/response-from-map {:status 200 - :body (g/greet (str "pong - " (rand)))})) (defn book-create-handler [request] (let [title (get-in request [:parsed-body "title"]) diff --git a/src/view/main.phel b/src/view/main.phel index dc57f3c..e25a079 100644 --- a/src/view/main.phel +++ b/src/view/main.phel @@ -11,17 +11,6 @@ [:link {:rel "icon" :type "image/png" :href "./images/favicon-32.png"}] [:title "Lezer"]]) -(def- logo - [:div {:class "logo"} - [:img {:src "./images/logo.svg" :width "360"}]]) - -(def- links - [:div {:class "links"} - [:a {:href "https://phel-lang.org/"} "Homepage"] - [:a {:href "https://phel-lang.org/documentation/getting-started/"} "Getting started"] - [:a {:href "https://github.com/phel-lang/phel-lang"} "GitHub"] - [:a {:href "https://gitter.im/phel-lang/community"} "Community"]]) - (defn- authors-list [authors router] (raw-string (html [:span (let [a (first authors)] @@ -31,7 +20,7 @@ [:span ", " [:a {:href (r/generate router :author {:id (:id a)})} (:name a)]])]))) -(defn content [books router] +(defn index-html [books router] (html (doctype :html5) [:html @@ -65,6 +54,3 @@ [:label {:for "pages"} "# of pages: "] [:input {:type "number" :name "pages"}] [:input {:type "submit"}]]]]]])) - -(defn index-html [books router] - (content books router)) |
