diff options
author | Morgan Astra <m@morganastra.me> | 2017-03-08 22:48:40 -0800 |
---|---|---|
committer | Morgan Astra <m@morganastra.me> | 2017-03-08 22:48:40 -0800 |
commit | 368c73b55e1964834e562d7b5466506fb6ffc4bd (patch) | |
tree | 75c2e5c493397dc07b8ec897c66c1c3d42abf1b7 | |
parent | b16cf5d7c9f9f7ebfc7655da10355094eb58c660 (diff) |
put an icon on the page so preview cards can grab it for #56
-rw-r--r-- | resources/images/purple-flag64.png | bin | 0 -> 3717 bytes | |||
-rw-r--r-- | src/pronouns/pages.clj | 3 | ||||
-rw-r--r-- | src/pronouns/web.clj | 8 |
3 files changed, 9 insertions, 2 deletions
diff --git a/resources/images/purple-flag64.png b/resources/images/purple-flag64.png new file mode 100644 index 0000000..ba63aee --- /dev/null +++ b/resources/images/purple-flag64.png Binary files differdiff --git a/src/pronouns/pages.clj b/src/pronouns/pages.clj index 4940207..f9939c3 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] diff --git a/src/pronouns/web.clj b/src/pronouns/web.clj index e57d7ec..69ad6ae 100644 --- a/src/pronouns/web.clj +++ b/src/pronouns/web.clj @@ -18,11 +18,14 @@ (:require [compojure.core :refer [defroutes GET PUT POST DELETE ANY]] [compojure.handler :refer [site]] [compojure.route :as route] - [clojure.java.io :as io] [clojure.string :as s] + [clojure.java.io :as io] [ring.middleware.logger :as logger] [ring.middleware.stacktrace :as trace] [ring.middleware.params :as params] + [ring.middleware.resource :refer [wrap-resource]] + [ring.middleware.content-type :refer [wrap-content-type]] + [ring.middleware.not-modified :refer [wrap-not-modified]] [ring.adapter.jetty :as jetty] [environ.core :refer [env]] [pronouns.util :as u] @@ -58,6 +61,9 @@ (def app (-> app-routes + (wrap-resource "images") + wrap-content-type + wrap-not-modified logger/wrap-with-logger wrap-error-page trace/wrap-stacktrace |