From 8274656847a6851cb4073abff9554fc24518c234 Mon Sep 17 00:00:00 2001 From: Thel Seraphim Date: Sat, 14 Mar 2015 00:57:03 -0700 Subject: add a title block, light refactoring --- resources/pronouns.css | 7 +++++++ src/pronouns/pages.clj | 18 +++++++++++++----- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/resources/pronouns.css b/resources/pronouns.css index 5753b25..3ad386d 100644 --- a/resources/pronouns.css +++ b/resources/pronouns.css @@ -11,6 +11,13 @@ body { border:4px solid #eeeeee; } +.title { + font: large; + margin: 8px; + padding: 4px 6px 4px 6px; + border:4px solid #eeeeee; +} + .about { font: large; margin: 8px; diff --git a/src/pronouns/pages.clj b/src/pronouns/pages.clj index 7aa2b0f..3404068 100644 --- a/src/pronouns/pages.clj +++ b/src/pronouns/pages.clj @@ -31,10 +31,14 @@ [subject reflexive] (render-sentence (wrap-pronoun (s/capitalize subject)) " threw the frisbee to " (wrap-pronoun reflexive) ".")) +(defn title-block [title] + [:div {:class "title"} + [:h1 title]]) + (defn examples-block [subject object possessive-determiner possessive-pronoun reflexive] [:div {:class "examples"} - [:p [:h1 "Here are some usage examples for my pronouns:"]] + [:p [:h2 "Here are some usage examples for my pronouns:"]] (subject-example subject) (object-example object) (posessive-determiner-example subject possessive-determiner) @@ -60,15 +64,17 @@ (defn format-pronoun-examples [subject object possessive-determiner possessive-pronoun reflexive] + (let [title "Pronoun Island: Examples"] (html [:html [:head - [:title "Pronoun Island: Examples"] + [:title title] [:link {:rel "stylesheet" :href "/pronouns.css"}]] [:body + (title-block title) (examples-block subject object possessive-determiner possessive-pronoun reflexive) (about-block) - (contact-block)]])) + (contact-block)]]))) (defn parse-pronouns-with-lookup [pronouns-string pronouns-table] @@ -87,13 +93,15 @@ [:li [:a {:href link} label]])) (defn front [pronouns-table] - (let [links (map make-link (sort pronouns-table))] + (let [links (map make-link (sort pronouns-table)) + title "Pronoun Island"] (html [:html [:head - [:title "Pronoun Island"] + [:title title] [:link {:rel "stylesheet" :href "/pronouns.css"}]] [:body + (title-block title) [:div {:class "table"} [:p "pronoun.is is a www site for showing people how to use pronouns"] [:p "here are some pronouns the site knows about:"] -- cgit From 05615d20ed35d4d010c2a806c49ece5bc707c10c Mon Sep 17 00:00:00 2001 From: Thel Seraphim Date: Sat, 14 Mar 2015 01:06:59 -0700 Subject: re-organize examples and contact --- src/pronouns/pages.clj | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/src/pronouns/pages.clj b/src/pronouns/pages.clj index 3404068..0ba1430 100644 --- a/src/pronouns/pages.clj +++ b/src/pronouns/pages.clj @@ -47,18 +47,24 @@ (defn about-block [] [:div {:class "about"} - [:p "Full usage:"] - [:p + [:p "Full usage: " [:tt "http://pronoun.is/subject-pronoun/object-pronoun/possessive-determiner/possessive-pronoun/reflexive"] - " displays examples of your pronouns. If we have a good guess we'll let you use just the first one or two."] - [:p "Quick examples:"] - [: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"] "."]]) + " displays examples of your pronouns."] + [:p "This is a bit unwieldy. If we have a good guess we'll let you use just the first one or two."]]) (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") ". " + [:p + "Written by " + (twitter-name "morganastra") + ", whose " + [:a {:href "http://pronoun.is/ze/zir"} "pronoun.is/ze/zir"] + " and " + (twitter-name "thelseraphim") + ", whose " + [:a {:href "http://pronoun.is/she"} "pronoun.is/she"] + ". " "Visit the project on " [:a {:href "https://github.com/witch-house/pronoun.is"} "github!"]]])) -- cgit From 7f8bfd232602e69cefba923c5acf84002d9dcf41 Mon Sep 17 00:00:00 2001 From: Thel Seraphim Date: Sat, 14 Mar 2015 01:24:12 -0700 Subject: add a single comma. --- src/pronouns/pages.clj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pronouns/pages.clj b/src/pronouns/pages.clj index 0ba1430..495d41f 100644 --- a/src/pronouns/pages.clj +++ b/src/pronouns/pages.clj @@ -60,7 +60,7 @@ (twitter-name "morganastra") ", whose " [:a {:href "http://pronoun.is/ze/zir"} "pronoun.is/ze/zir"] - " and " + ", and " (twitter-name "thelseraphim") ", whose " [:a {:href "http://pronoun.is/she"} "pronoun.is/she"] -- cgit From 08cadfb6d3bf39d43a05db6e14d6b43bcad9ee60 Mon Sep 17 00:00:00 2001 From: Thel Seraphim Date: Sat, 14 Mar 2015 01:25:45 -0700 Subject: specified that we are working in English --- src/pronouns/pages.clj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pronouns/pages.clj b/src/pronouns/pages.clj index 495d41f..d7ef9fc 100644 --- a/src/pronouns/pages.clj +++ b/src/pronouns/pages.clj @@ -70,7 +70,7 @@ (defn format-pronoun-examples [subject object possessive-determiner possessive-pronoun reflexive] - (let [title "Pronoun Island: Examples"] + (let [title "Pronoun Island: English Language Examples"] (html [:html [:head @@ -109,7 +109,7 @@ [:body (title-block title) [:div {:class "table"} - [:p "pronoun.is is a www site for showing people how to use pronouns"] + [:p "pronoun.is is a www site for showing people how to use pronouns in English."] [:p "here are some pronouns the site knows about:"] [:ul links]]] (contact-block)]))) -- cgit