Add all-pronouns page

This commit is contained in:
Morgan Astra 2018-11-14 22:22:15 -08:00
parent 8628d97055
commit 8238eb6e0c
2 changed files with 27 additions and 3 deletions

View File

@ -168,9 +168,27 @@
[:body [:body
(header-block title) (header-block title)
[:div {:class "section table"} [:div {:class "section table"}
[:p "pronoun.is is a website for personal pronoun usage examples"] [:p "pronoun.is is a website for personal pronoun usage examples"]
[:p "here are some pronouns the site knows about:"] [:p "here are some pronouns the site knows about:"]
[:ul links]]] [: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)]))) (footer-block)])))
(defn not-found [] (defn not-found []

View File

@ -39,6 +39,12 @@
:headers {"Content-Type" "text/html"} :headers {"Content-Type" "text/html"}
:body (pages/front)}) :body (pages/front)})
(GET "/all-pronouns" []
{:status 200
:headers {"Content-Type" "text/html"}
:body (pages/all-pronouns)})
(GET "/pronouns.css" [] (GET "/pronouns.css" []
{:status 200 {:status 200
:headers {"Content-Type" "text/css"} :headers {"Content-Type" "text/css"}