From 221ad4d8c0444db5c6e79ea981ac602b5c6eb20e Mon Sep 17 00:00:00 2001 From: Daria Phoebe Brashear Date: Tue, 9 Feb 2016 12:49:20 -0500 Subject: add fae pronouns to the database --- resources/pronouns.tab | 1 + 1 file changed, 1 insertion(+) (limited to 'resources') diff --git a/resources/pronouns.tab b/resources/pronouns.tab index d8fe3ce..e19c6e7 100644 --- a/resources/pronouns.tab +++ b/resources/pronouns.tab @@ -23,3 +23,4 @@ se sim ser sers serself zme zmyr zmyr zmyrs zmyrself ve vem vir virs vemself zee zed zeta zetas zedself +fae faer faer faers faerself -- cgit From b3a7b60a101c003c583b0edbad46acd980e7d80f Mon Sep 17 00:00:00 2001 From: Alice Wyan Date: Wed, 20 Apr 2016 16:15:32 +0100 Subject: Added zie/hir pronouns --- resources/pronouns.tab | 1 + 1 file changed, 1 insertion(+) (limited to 'resources') diff --git a/resources/pronouns.tab b/resources/pronouns.tab index e19c6e7..723533b 100644 --- a/resources/pronouns.tab +++ b/resources/pronouns.tab @@ -24,3 +24,4 @@ zme zmyr zmyr zmyrs zmyrself ve vem vir virs vemself zee zed zeta zetas zedself fae faer faer faers faerself +zie hir hir hirs hirself -- cgit From 89bb78554f62762d237cae41282dbc0bfe8a8372 Mon Sep 17 00:00:00 2001 From: Jamie Culpon Date: Thu, 26 May 2016 19:05:42 -0700 Subject: Add si/hyr pronouns Add si/hyr pronouns, used by some nonbinary folks in the Vermont area. --- resources/pronouns.tab | 1 + 1 file changed, 1 insertion(+) (limited to 'resources') diff --git a/resources/pronouns.tab b/resources/pronouns.tab index 723533b..bfdea53 100644 --- a/resources/pronouns.tab +++ b/resources/pronouns.tab @@ -25,3 +25,4 @@ ve vem vir virs vemself zee zed zeta zetas zedself fae faer faer faers faerself zie hir hir hirs hirself +si hyr hyr hyrs hyrself -- cgit From 1e3ef97b2b30a2ed0e3d1d723f34870757a7bd76 Mon Sep 17 00:00:00 2001 From: Cassie Peele Date: Mon, 30 May 2016 19:06:52 -0400 Subject: add kit pronouns --- resources/pronouns.tab | 1 + 1 file changed, 1 insertion(+) (limited to 'resources') diff --git a/resources/pronouns.tab b/resources/pronouns.tab index 723533b..a7891e3 100644 --- a/resources/pronouns.tab +++ b/resources/pronouns.tab @@ -25,3 +25,4 @@ ve vem vir virs vemself zee zed zeta zetas zedself fae faer faer faers faerself zie hir hir hirs hirself +kit kit kits kits kitself -- cgit From cc63e119bc7d4031b37ee2ebcef38c854ad40dce Mon Sep 17 00:00:00 2001 From: Kara Alexandra Date: Sun, 7 Aug 2016 15:05:40 -0700 Subject: Add ne/nem pronouns --- resources/pronouns.tab | 1 + 1 file changed, 1 insertion(+) (limited to 'resources') diff --git a/resources/pronouns.tab b/resources/pronouns.tab index 37e8d34..64ccbbb 100644 --- a/resources/pronouns.tab +++ b/resources/pronouns.tab @@ -27,3 +27,4 @@ fae faer faer faers faerself zie hir hir hirs hirself si hyr hyr hyrs hyrself kit kit kits kits kitself +ne nem nir nirs nemself -- cgit From 93c37971682cbcbda3139c7e8a47ca21311f8947 Mon Sep 17 00:00:00 2001 From: Morgan Astra Date: Tue, 20 Sep 2016 16:17:58 -0700 Subject: add 'section' CSS class for repeated declarations --- resources/pronouns.css | 17 ++++------------- src/pronouns/pages.clj | 15 +++++++-------- 2 files changed, 11 insertions(+), 21 deletions(-) (limited to 'resources') diff --git a/resources/pronouns.css b/resources/pronouns.css index 1285cee..59160b5 100644 --- a/resources/pronouns.css +++ b/resources/pronouns.css @@ -3,32 +3,23 @@ body { background-color: #F6CEFC; } -.examples { +.section { margin: 8px; padding: 4px 6px 4px 6px; border: 4px solid #eeeeee; } +.examples { +} + .title { - margin: 8px; - padding: 4px 6px 4px 6px; - border: 4px solid #eeeeee; } .about { - margin: 8px; - padding: 4px 6px 4px 6px; - border: 4px solid #eeeeee; } .contact { - margin: 8px; - padding: 4px 6px 4px 6px; - border: 4px solid #eeeeee; } .table { - margin: 8px; - padding: 4px 6px 4px 6px; - border: 4px solid #eeeeee; } diff --git a/src/pronouns/pages.clj b/src/pronouns/pages.clj index da6d46e..f9fde11 100644 --- a/src/pronouns/pages.clj +++ b/src/pronouns/pages.clj @@ -59,7 +59,7 @@ ".")) (defn title-block [title] - [:div {:class "title"} + [:div {:class "section title"} [:h1 title]]) (defn examples-block @@ -68,7 +68,7 @@ header-str (str "Here are some usage examples for my " sub-obj " pronouns")] - [:div {:class "examples"} + [:div {:class "section examples"} [:p [:h2 header-str]] (subject-example subject) (object-example object) @@ -77,7 +77,7 @@ (reflexive-example subject reflexive)])) (defn about-block [] - [:div {:class "about"} + [:div {:class "section about"} [:p "Full usage: " [:tt "http://pronoun.is/subject-pronoun/object-pronoun/possessive-determiner/possessive-pronoun/reflexive"] " displays examples of your pronouns."] @@ -86,7 +86,7 @@ (defn contact-block [] (let [twitter-name (fn [handle] (href (str "https://www.twitter.com/" handle) (str "@" handle)))] - [:div {:class "contact"} + [:div {:class "section contact"} [:p "Written by " (twitter-name "morganastra") @@ -131,8 +131,7 @@ [:li (href link label)])) (defn front [] - (let [blah (println *pronouns-table*) - abbreviations (u/abbreviate *pronouns-table*) + (let [abbreviations (u/abbreviate *pronouns-table*) links (map make-link abbreviations) title "Pronoun Island"] (html @@ -143,7 +142,7 @@ [:link {:rel "stylesheet" :href "/pronouns.css"}]] [:body (title-block title) - [:div {:class "table"} + [:div {:class "section table"} [: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]]] @@ -159,7 +158,7 @@ [:link {:rel "stylesheet" :href "/pronouns.css"}]] [:body (title-block title) - [:div {:class "examples"} + [:div {:class "section examples"} [:p [:h2 (str "We couldn't find those pronouns in our database." "If you think we should have them, please reach out!")]]] (about-block) -- cgit From 5d85c1a5e7fbe3f06667982bf1a8f1353921a76f Mon Sep 17 00:00:00 2001 From: Morgan Astra Date: Tue, 20 Sep 2016 18:04:16 -0700 Subject: allow ellipses to shorten unambiguous path, e.g. /they/.../themself per #46 --- resources/pronouns.tab | 1 + src/pronouns/util.clj | 32 +++++++++++++++++++++++--------- 2 files changed, 24 insertions(+), 9 deletions(-) (limited to 'resources') diff --git a/resources/pronouns.tab b/resources/pronouns.tab index 64ccbbb..b6e00dd 100644 --- a/resources/pronouns.tab +++ b/resources/pronouns.tab @@ -3,6 +3,7 @@ ze zir zir zirs zirself she her her hers herself he him his his himself they them their theirs themselves +they them their theirs themself xey xem xyr xyrs xemself sie hir hir hirs hirself it it its its itself diff --git a/src/pronouns/util.clj b/src/pronouns/util.clj index 5aa9530..5086634 100644 --- a/src/pronouns/util.clj +++ b/src/pronouns/util.clj @@ -21,26 +21,40 @@ (let [lines (s/split (slurp path) #"\n")] (map #(s/split % #"\t") lines))) +(defn table-front-filter + [query-key table] + (let [arity (count query-key)] + (filter #(= query-key (take arity %)) table))) + +(defn table-end-filter + [query-key table] + (let [table-arity (count (first table)) + query-arity (count query-key)] + (filter #(= query-key (drop (- table-arity query-arity) %)) table))) + (defn table-lookup [query-key table] - (let [arity (count query-key) - filtered-table (filter #(= query-key (take arity %)) table)] - (first filtered-table))) + (if (some #(= "..." %) query-key) + (let [[query-front query-end-] (split-with #(not= "..." %) query-key) + query-end (drop 1 query-end-) + front-matches (table-front-filter query-front table)] + (first (table-end-filter query-end front-matches))) + (first (table-front-filter query-key table)))) (defn tabfile-lookup [query-key tabfile] (table-lookup query-key (slurp-tabfile tabfile))) (defn minimum-unambiguous-path - ([table sections] (minimum-unambiguous-path table sections 1)) - ([table sections number-of-sections] - (let [sections-subset (take number-of-sections sections) - results (filter #(= (take number-of-sections %) sections-subset) + ([table columns] (minimum-unambiguous-path table columns 1)) + ([table columns number-of-columns] + (let [columns-subset (take number-of-columns columns) + results (filter #(= (take number-of-columns %) columns-subset) table)] (case (count results) 0 nil - 1 (clojure.string/join "/" sections-subset) - (recur table sections (+ number-of-sections 1)))))) + 1 (clojure.string/join "/" columns-subset) + (recur table columns (+ number-of-columns 1)))))) (defn abbreviate "given a list of pronoun rows, return a list of minimum unabiguous paths" -- cgit From 9a5a309ea5ba08f2799ebae21933b13dcc42d61e Mon Sep 17 00:00:00 2001 From: Morgan Astra Date: Wed, 21 Sep 2016 23:58:16 -0700 Subject: make the footer sections 0.8em --- resources/pronouns.css | 15 ++++++++++----- src/pronouns/pages.clj | 12 ++++++------ 2 files changed, 16 insertions(+), 11 deletions(-) (limited to 'resources') diff --git a/resources/pronouns.css b/resources/pronouns.css index 59160b5..c27bd5a 100644 --- a/resources/pronouns.css +++ b/resources/pronouns.css @@ -1,12 +1,17 @@ body { - font-family: Futura, sans-serif; - background-color: #F6CEFC; + font-family: Futura, sans-serif; + background-color: #F6CEFC; +} + +footer { + font-size: 0.8em; } .section { - margin: 8px; - padding: 4px 6px 4px 6px; - border: 4px solid #eeeeee; + margin: 8px; + padding: 4px 6px 4px 6px; + border: 4px solid #EEEEEE; + border-radius: 7px; } .examples { diff --git a/src/pronouns/pages.clj b/src/pronouns/pages.clj index fe9e2aa..60175c9 100644 --- a/src/pronouns/pages.clj +++ b/src/pronouns/pages.clj @@ -86,7 +86,7 @@ (defn contact-block [] (let [twitter-name (fn [handle] (href (str "https://www.twitter.com/" handle) (str "@" handle)))] - [:footer {:class "section contact"} + [:div {:class "section contact"} [:p "Written by " (twitter-name "morganastra") ", whose " @@ -97,6 +97,8 @@ (href "https://github.com/witch-house/pronoun.is" "github")] [:p "<3"]])) +(defn footer-block [] + [:footer (about-block) (contact-block)]) (defn format-pronoun-examples [pronoun-declensions] @@ -110,8 +112,7 @@ [:body (title-block title) (map #(apply examples-block %) pronoun-declensions) - (about-block) - (contact-block)]]))) + (footer-block)]]))) (defn lookup-pronouns [pronouns-string] (let [inputs (s/split pronouns-string #"/") @@ -141,7 +142,7 @@ [:p "pronoun.is is a website for personal pronoun usage examples"] [:p "here are some pronouns the site knows about:"] [:ul links]]] - (contact-block)]))) + (footer-block)]))) (defn not-found [] (let [title "Pronoun Island: English Language Examples"] @@ -156,8 +157,7 @@ [:div {:class "section examples"} [:p [:h2 (str "We couldn't find those pronouns in our database." "If you think we should have them, please reach out!")]]] - (about-block) - (contact-block)]]))) + (footer-block)]]))) (defn pronouns [params] (let [path (params :*) -- cgit