fix avatars

This commit is contained in:
rdiedrich 2020-06-29 15:38:39 +02:00
parent 352f058175
commit 9774ef6afc
3 changed files with 8 additions and 4 deletions

View File

@ -28,12 +28,15 @@ nav.pagination {
font-size: 0.75rem; font-size: 0.75rem;
} }
.userinfo avatar-.title { .userinfo .avatar-title {
display: flex;
flex-direction: column;
margin-top: 1rem; margin-top: 1rem;
font-size: inherit; font-size: inherit;
font-weight: inherit; font-weight: inherit;
line-height: inherit; line-height: inherit;
} }
.userinfo .avatar-title img.img { flex: 1; }
.content .bbc-block > h4 { .content .bbc-block > h4 {
font-size: 1rem; font-size: 1rem;

View File

@ -46,7 +46,7 @@
:regdate regdate :regdate regdate
:avatar-title (hickory-to-hiccup :avatar-title (hickory-to-hiccup
(hickory-div (:content title) "avatar-title")) (hickory-div (:content title) "avatar-title"))
:avatar (hickory-to-hiccup avatar)})) :avatar (when avatar (hickory-to-hiccup avatar))}))
(defn parse-pd [pd] (defn parse-pd [pd]
(string/trim (last (hickory-to-hiccup pd)))) (string/trim (last (hickory-to-hiccup pd))))

View File

@ -110,8 +110,9 @@
(let [{:keys [author regdate avatar avatar-title]} (:ui post)] (let [{:keys [author regdate avatar avatar-title]} (:ui post)]
(list (list
[:div.media [:div.media
(when avatar
[:div.media-left.is-hidden-tablet [:div.media-left.is-hidden-tablet
[:figure.image.is-64x64 avatar]] [:figure.image.is-64x64 avatar]])
[:div.media-content [:div.media-content
[:p.author.title.is-4 author] [:p.author.title.is-4 author]
[:p.regdate.subtitle.is-6 regdate]]] [:p.regdate.subtitle.is-6 regdate]]]