about summary refs log tree commit diff
path: root/src/pronouns/pages.clj
diff options
context:
space:
mode:
Diffstat (limited to 'src/pronouns/pages.clj')
-rw-r--r--src/pronouns/pages.clj33
1 files changed, 14 insertions, 19 deletions
diff --git a/src/pronouns/pages.clj b/src/pronouns/pages.clj
index 66f65a9..f380542 100644
--- a/src/pronouns/pages.clj
+++ b/src/pronouns/pages.clj
@@ -31,15 +31,15 @@
   [subject reflexive]
   (render-sentence (wrap-pronoun (s/capitalize subject)) " threw the frisbee to " (wrap-pronoun reflexive) "."))
 
-
-(defn twitter-name [name]
-  [:a {:href (str "https://www.twitter.com/" name)} (str "@" name)])
-
-(defn contact-block []
-  [:div {:class "contact"}
-   [:p "Written by " (twitter-name "morganastra") " and " (twitter-name "thelseraphim") ". "
-   "Visit the project on " [:a {:href "https://github.com/witch-house/pronoun.is"} "github!"]]])
-
+(defn examples-block
+  [subject object possessive-determiner possessive-pronoun reflexive]
+  [:div {:class "examples"}
+   [:p [:h1 "Here are some usage examples for my pronouns:"]]
+   (subject-example subject)
+   (object-example object)
+   (posessive-determiner-example subject possessive-determiner)
+   (possessive-pronoun-example possessive-pronoun)
+   (reflexive-example subject reflexive)])
 
 (defn about-block []
   [:div {:class "about"}
@@ -51,18 +51,13 @@
    [:p "My name is Thel Seraphim, my " [:a {:href "http://pronoun.is/she"} "pronoun.is/she"] "."]
    [:p "My name is Morgan, my " [:a {:href "http://pronoun.is/ze/zir"} "pronoun.is/ze/zir"] "."]])
 
+(defn contact-block []
+  (let [twitter-name (fn [handle] [:a {:href (str "https://www.twitter.com/" handle)} (str "@" handle)])]
+  [:div {:class "contact"}
+   [:p "Written by " (twitter-name "morganastra") " and " (twitter-name "thelseraphim") ". "
+   "Visit the project on " [:a {:href "https://github.com/witch-house/pronoun.is"} "github!"]]]))
 
 
-(defn examples-block
-  [subject object possessive-determiner possessive-pronoun reflexive]
-  [:div {:class "examples"}
-   [:p [:h1 "Here are some usage examples for my pronouns:"]]
-   (subject-example subject)
-   (object-example object)
-   (posessive-determiner-example subject possessive-determiner)
-   (possessive-pronoun-example possessive-pronoun)
-   (reflexive-example subject reflexive)])
-
 (defn format-pronoun-examples
   [subject object possessive-determiner possessive-pronoun reflexive]
   (html