Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a block that shows the computed pronouns #139

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion src/pronouns/pages.clj
Original file line number Diff line number Diff line change
Expand Up @@ -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: "
Expand Down Expand Up @@ -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
Expand All @@ -135,6 +148,7 @@
[:body
(header-block title)
examples
assumed
(footer-block)]])))

(defn table-lookup* [pronouns-string]
Expand Down