diff --git a/resources/public/css/style.css b/resources/public/css/style.css index 9756cf8..84f7027 100644 --- a/resources/public/css/style.css +++ b/resources/public/css/style.css @@ -28,12 +28,15 @@ nav.pagination { font-size: 0.75rem; } -.userinfo avatar-.title { +.userinfo .avatar-title { + display: flex; + flex-direction: column; margin-top: 1rem; font-size: inherit; font-weight: inherit; line-height: inherit; } +.userinfo .avatar-title img.img { flex: 1; } .content .bbc-block > h4 { font-size: 1rem; diff --git a/src/clojsa/saparser.clj b/src/clojsa/saparser.clj index 9e10088..fc0bb1c 100644 --- a/src/clojsa/saparser.clj +++ b/src/clojsa/saparser.clj @@ -46,7 +46,7 @@ :regdate regdate :avatar-title (hickory-to-hiccup (hickory-div (:content title) "avatar-title")) - :avatar (hickory-to-hiccup avatar)})) + :avatar (when avatar (hickory-to-hiccup avatar))})) (defn parse-pd [pd] (string/trim (last (hickory-to-hiccup pd)))) diff --git a/src/clojsa/views.clj b/src/clojsa/views.clj index fe2f800..1bea344 100644 --- a/src/clojsa/views.clj +++ b/src/clojsa/views.clj @@ -110,8 +110,9 @@ (let [{:keys [author regdate avatar avatar-title]} (:ui post)] (list [:div.media - [:div.media-left.is-hidden-tablet - [:figure.image.is-64x64 avatar]] + (when avatar + [:div.media-left.is-hidden-tablet + [:figure.image.is-64x64 avatar]]) [:div.media-content [:p.author.title.is-4 author] [:p.regdate.subtitle.is-6 regdate]]]