Commit Diff


commit - ce07a90dc563f88e847ac3aae9de323b3d7255f7
commit + ffd679de6fda2db566d9978abec61a4d20b9ff78
blob - 6a27802f54af129adb94ac76acbe2bc1ab7951f6
blob + 8497aaef430a88c0653bb04aebb740590056bde7
--- src/blog/http.clj
+++ src/blog/http.clj
@@ -85,12 +85,17 @@
     [:p.author "Written by " [:em "Omar Polo"] " on " (time/fmt-loc date)
      (list
       (when music
-        (list " while listening to " [:a {:href   (:url music)
-                                          :target "_blank"
-                                          :rel    "noopener"}
-                                      "“" [:em (:title music)] "”"
-                                      (when-let [by (:by music)]
-                                        (list " by " [:em by]))]))
+        (list " while listening to "
+              (let [b (list "“" [:em (:title music)] "”"
+                            (when-let [by (:by music)]
+                              (list " by " [:em by])))]
+                (list " while listening to "
+                      (if-let [url (:url music)]
+                        [:a {:href url
+                             :target "_blank"
+                             :rel    "noopener"}
+                         b]
+                        [:span b])))))
       ".")]
     [:ul.tags (map #(vector :li [:a {:href (str "/tag/" (name %) ".html")}
                                  (str "#" (name %))])