diff options
Diffstat (limited to 'src/pronouns/pages.clj')
-rw-r--r-- | src/pronouns/pages.clj | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/src/pronouns/pages.clj b/src/pronouns/pages.clj index 62007bc..56830d0 100644 --- a/src/pronouns/pages.clj +++ b/src/pronouns/pages.clj @@ -19,6 +19,7 @@ [pronouns.config :refer [*pronouns-table*]] [pronouns.util :as u] [hiccup.core :refer :all] + [hiccup.element :as e] [hiccup.util :refer [escape-html]])) (defn prose-comma-list @@ -70,7 +71,7 @@ (defn header-block [header] [:div {:class "section title"} - (href "/" [:h1 header])]) + (href "/" [:h1 (e/image "/purple-flag64.png" "flag logo") header])]) (defn examples-block [subject object possessive-determiner possessive-pronoun reflexive] @@ -111,19 +112,31 @@ (defn footer-block [] [:footer (usage-block) (contact-block)]) +;; <meta name="twitter:card" content="summary" /> +;; <meta name="twitter:site" content="@flickr" /> +;; <meta name="twitter:title" content="Small Island Developing States Photo Submission" /> +;; <meta name="twitter:description" content="View the album on Flickr." /> +;; <meta name="twitter:image" content="https://farm6.staticflickr.com/5510/14338202952_93595258ff_z.jpg" /> +;; not all of these are required! + (defn format-pronoun-examples [pronoun-declensions] (let [sub-objs (map #(s/join "/" (take 2 %)) pronoun-declensions) - title (str "Pronoun Island: " (prose-comma-list sub-objs) " examples")] + title (str "Pronoun Island: " (prose-comma-list sub-objs) " examples") + examples (map #(apply examples-block %) pronoun-declensions)] (html [:html [:head [:title title] [:meta {:name "viewport" :content "width=device-width"}] + [:meta {:name "description" :content (u/strip-markup examples)}] + [:meta {:name "twitter:card" :content "summary"}] + [:meta {:name "twitter:title" :content title}] + [:meta {:name "twitter:description" :content (u/strip-markup examples)}] [:link {:rel "stylesheet" :href "/pronouns.css"}]] [:body (header-block title) - (map #(apply examples-block %) pronoun-declensions) + examples (footer-block)]]))) (defn lookup-pronouns [pronouns-string] |