about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMorgan Astra <m@morganastra.me>2018-11-14 22:22:15 -0800
committerMorgan Astra <m@morganastra.me>2018-11-14 22:22:15 -0800
commit8238eb6e0cbf71db6f2efe86ed4942253ebab9b6 (patch)
tree52d65a52b0c655c6eb8d29b6b5bfe51fb66254fa
parent8628d9705526e91664886e6b2588d4972716a8a5 (diff)
Add all-pronouns page
-rw-r--r--src/pronouns/pages.clj24
-rw-r--r--src/pronouns/web.clj6
2 files changed, 27 insertions, 3 deletions
diff --git a/src/pronouns/pages.clj b/src/pronouns/pages.clj
index 6d08519..3b808fb 100644
--- a/src/pronouns/pages.clj
+++ b/src/pronouns/pages.clj
@@ -168,9 +168,27 @@
       [:body
        (header-block title)
        [:div {:class "section table"}
-       [:p "pronoun.is is a website for personal pronoun usage examples"]
-       [:p "here are some pronouns the site knows about:"]
-       [:ul links]]]
+        [:p "pronoun.is is a website for personal pronoun usage examples"]
+        [:p "here are some pronouns the site knows about:"]
+        [:ul links]
+        [:p [:small (href "all-pronouns" "see all pronouns in the database")]]]]
+      (footer-block)])))
+
+(defn all-pronouns []
+  (let [abbreviations (u/abbreviate *pronouns-table*)
+        links (map make-link abbreviations)
+        title "Pronoun Island"]
+    (html
+     [:html
+      [:head
+       [:title title]
+       [:meta {:name "viewport" :content "width=device-width"}]
+       [:link {:rel "stylesheet" :href "/pronouns.css"}]]
+      [:body
+       (header-block title)
+       [:div {:class "section table"}
+        [:p "All pronouns the site knows about:"]
+        [:ul links]]]
       (footer-block)])))
 
 (defn not-found []
diff --git a/src/pronouns/web.clj b/src/pronouns/web.clj
index 15057c2..ab887d0 100644
--- a/src/pronouns/web.clj
+++ b/src/pronouns/web.clj
@@ -39,6 +39,12 @@
         :headers {"Content-Type" "text/html"}
         :body (pages/front)})
 
+  (GET "/all-pronouns" []
+       {:status 200
+        :headers {"Content-Type" "text/html"}
+        :body (pages/all-pronouns)})
+
+
   (GET "/pronouns.css" []
      {:status 200
      :headers {"Content-Type" "text/css"}