From e4d1d16b4c782e42f2be3ea03dc8b710a3cfb10a Mon Sep 17 00:00:00 2001 From: Randall Mason Date: Tue, 9 Nov 2021 19:26:12 +0000 Subject: [PATCH] Add a block that shows the computed pronouns * The database assumes a set of pronouns based on what you type in. This prints out all of the assumed pronouns after the examples. --- src/pronouns/pages.clj | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/pronouns/pages.clj b/src/pronouns/pages.clj index 5b09466..49083ec 100644 --- a/src/pronouns/pages.clj +++ b/src/pronouns/pages.clj @@ -89,6 +89,18 @@ (possessive-pronoun-example possessive-pronoun) (reflexive-example subject reflexive)]])) +(defn assumed-block + [subject object possessive-determiner possessive-pronoun reflexive] + (let [sub-obj (s/join "/" [subject object]) + header-str (str "We have assumed a full usage of:")] + [:div {:class "section assumed"} + [:p header-str] + [:tt (str "https://pronoun.is/" (s/join "/" [subject + object + possessive-determiner + possessive-pronoun + reflexive]))]])) + (defn usage-block [] [:div {:class "section usage"} [:p "Full usage: " @@ -120,7 +132,8 @@ [pronoun-declensions] (let [sub-objs (map #(s/join "/" (take 2 %)) pronoun-declensions) title (str "Pronoun Island: " (prose-comma-list sub-objs) " examples") - examples (map #(apply examples-block %) pronoun-declensions)] + examples (map #(apply examples-block %) pronoun-declensions) + assumed (map #(apply assumed-block %) pronoun-declensions)] (html [:html [:head @@ -135,6 +148,7 @@ [:body (header-block title) examples + assumed (footer-block)]]))) (defn table-lookup* [pronouns-string]