add 'section' CSS class for repeated declarations

This commit is contained in:
Morgan Astra 2016-09-20 16:17:58 -07:00
parent 364552f49a
commit 93c3797168
2 changed files with 11 additions and 21 deletions

View File

@ -3,32 +3,23 @@ body {
background-color: #F6CEFC; background-color: #F6CEFC;
} }
.examples { .section {
margin: 8px; margin: 8px;
padding: 4px 6px 4px 6px; padding: 4px 6px 4px 6px;
border: 4px solid #eeeeee; border: 4px solid #eeeeee;
} }
.examples {
}
.title { .title {
margin: 8px;
padding: 4px 6px 4px 6px;
border: 4px solid #eeeeee;
} }
.about { .about {
margin: 8px;
padding: 4px 6px 4px 6px;
border: 4px solid #eeeeee;
} }
.contact { .contact {
margin: 8px;
padding: 4px 6px 4px 6px;
border: 4px solid #eeeeee;
} }
.table { .table {
margin: 8px;
padding: 4px 6px 4px 6px;
border: 4px solid #eeeeee;
} }

View File

@ -59,7 +59,7 @@
".")) "."))
(defn title-block [title] (defn title-block [title]
[:div {:class "title"} [:div {:class "section title"}
[:h1 title]]) [:h1 title]])
(defn examples-block (defn examples-block
@ -68,7 +68,7 @@
header-str (str "Here are some usage examples for my " header-str (str "Here are some usage examples for my "
sub-obj sub-obj
" pronouns")] " pronouns")]
[:div {:class "examples"} [:div {:class "section examples"}
[:p [:h2 header-str]] [:p [:h2 header-str]]
(subject-example subject) (subject-example subject)
(object-example object) (object-example object)
@ -77,7 +77,7 @@
(reflexive-example subject reflexive)])) (reflexive-example subject reflexive)]))
(defn about-block [] (defn about-block []
[:div {:class "about"} [:div {:class "section about"}
[:p "Full usage: " [:p "Full usage: "
[:tt "http://pronoun.is/subject-pronoun/object-pronoun/possessive-determiner/possessive-pronoun/reflexive"] [:tt "http://pronoun.is/subject-pronoun/object-pronoun/possessive-determiner/possessive-pronoun/reflexive"]
" displays examples of your pronouns."] " displays examples of your pronouns."]
@ -86,7 +86,7 @@
(defn contact-block [] (defn contact-block []
(let [twitter-name (fn [handle] (href (str "https://www.twitter.com/" handle) (let [twitter-name (fn [handle] (href (str "https://www.twitter.com/" handle)
(str "@" handle)))] (str "@" handle)))]
[:div {:class "contact"} [:div {:class "section contact"}
[:p [:p
"Written by " "Written by "
(twitter-name "morganastra") (twitter-name "morganastra")
@ -131,8 +131,7 @@
[:li (href link label)])) [:li (href link label)]))
(defn front [] (defn front []
(let [blah (println *pronouns-table*) (let [abbreviations (u/abbreviate *pronouns-table*)
abbreviations (u/abbreviate *pronouns-table*)
links (map make-link abbreviations) links (map make-link abbreviations)
title "Pronoun Island"] title "Pronoun Island"]
(html (html
@ -143,7 +142,7 @@
[:link {:rel "stylesheet" :href "/pronouns.css"}]] [:link {:rel "stylesheet" :href "/pronouns.css"}]]
[:body [:body
(title-block title) (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 "pronoun.is is a www site for showing people how to use pronouns in English."]
[:p "here are some pronouns the site knows about:"] [:p "here are some pronouns the site knows about:"]
[:ul links]]] [:ul links]]]
@ -159,7 +158,7 @@
[:link {:rel "stylesheet" :href "/pronouns.css"}]] [:link {:rel "stylesheet" :href "/pronouns.css"}]]
[:body [:body
(title-block title) (title-block title)
[:div {:class "examples"} [:div {:class "section examples"}
[:p [:h2 (str "We couldn't find those pronouns in our database." [:p [:h2 (str "We couldn't find those pronouns in our database."
"If you think we should have them, please reach out!")]]] "If you think we should have them, please reach out!")]]]
(about-block) (about-block)