 
   (def note "Hi all, here’s the latest info. Recruiting efforts paid off! Retention is down though, we’ll fix it. Let me know if you want to discuss before we meet next week.")
   (def snapshot (json/decode (slurp "./opt/samples/snapshots/green-labs.json")))
-  (spit "./hiccup.html" (content/snapshot-html (-> snapshot (assoc :note note) (assoc :company-slug "green-labs"))))
+  (spit "./hiccup.html" (content/snapshot-link-html (-> snapshot (assoc :note note) (assoc :company-slug "green-labs"))))
+
+  (spit "./hiccup.html" (content/snapshot-link-html (-> snapshot (assoc :note note) (assoc :company-slug "green-labs"))))
 
   (def note "Hi all, here’s the latest info. Recruiting efforts paid off! Retention is down though, we’ll fix it. Let me know if you want to discuss before we meet next week.")
   (def snapshot (json/decode (slurp "./opt/samples/snapshots/buff.json")))

                (spacer 28 "footer")]]]]]]])

(defn- body [data]
  (let [type (:type data)]
    [:body
      [:table {:class "body"}
        [:tr
          [:td {:class "float-center", :align "center", :valign "top"}
            (when-not (s/blank? (:note data)) (note data))
            [:center
              [:table {:class "container"}
                [:tr
                  (case type
                    :snapshot (snapshot-content data)
                    :snapshot-link (snapshot-link-content data)
                    :invite (invite-content data))]]]
            (when (= type :snapshot) (footer))]]]]))

(defn- head [data]

      (paragraph tagline)]))

(defn- snapshot-link-content [snapshot]
  (let [company-name (:name snapshot)
        company-name? (not (s/blank? company-name))
        title (:title snapshot)
        title? (not (s/blank? title))
        link-title (if title? title (str company-name " Update"))
        company-slug (:company-slug snapshot)
        update-slug (:slug snapshot)
        origin-url (:origin-url snapshot)
        created-at (format/parse iso-format (:created-at snapshot))
        update-time (format/unparse link-format created-at)
        update-url (s/join "/" [origin-url company-slug "updates" update-time update-slug])]
    [:table {:class "note"}
      [:tr
        [:td 
          [:table {:class "row note"}
            [:tr
              [:th {:class "small-12 large-12 first last columns note"}
                "Check out the latest"
                (when company-name? (str " from " company-name))
                ": " [:a {:href update-url} link-title]]]]]]]))

(defn- note 
  [snapshot trail-space?]
  [:table {:class "note"}
    [:tr
      [:td
        (spacer 15 "note")
        (message snapshot)
        (when trail-space? (spacer 22 "note"))]]])

(defn- footer []
  [:table {:class "footer"}
