                  :href (link-or-pathcat path-to-root %)})
        stylesheets))
 
-(defn header [{:keys [favicon path-to-root rss scripts stylesheets title]}]
+(defn header
+  "Creates an HTML `head` element containing various metadata, `scripts` & `stylesheets`."
+  [{:keys [favicon path-to-root rss scripts stylesheets title]}]
   (t/head (t/meta {:charset :utf-8})
           (t/title title)
           (css path-to-root stylesheets)

          (t/meta {:name :generator
                   :content (str "λ-blog v." (System/getProperty "lambda-blog.version"))})))

(defn banner [{:keys [banner-template] :as ent}]
  (t/header {:class :page-header}
            (banner-template ent)))

(defn powered-by []
  (t/p "Powered by "
       (t/a {:href "https://github.com/Idorobots/lambda-blog"}
            "λ-blog")
       "."))

(defn footer [{:keys [footer-scripts footer-template path-to-root] :as ent}]
  [(t/footer (t/hr)
             (row (footer-template ent)
                  (text-centered (powered-by))))
   (javascripts path-to-root footer-scripts)])

(defn navigation [{:keys [brand brand-logo navigation-template path-to-root] :as ent}]
  (let [l (div (when brand-logo
                 (t/img {:src (pathcat path-to-root brand-logo)}))
               brand)]

(ns lambda-blog.templates.page
  "Generic HTML page templates."
  (:refer-clojure :exclude [meta])
  (:require [lambda-blog.templates.bits :refer [javascript row text-centered]]
            [lambda-blog.utils :refer [pathcat]]
