diff --git a/assets/css/views/communications.css b/assets/css/views/communications.css index 87453f9e..62eb88aa 100644 --- a/assets/css/views/communications.css +++ b/assets/css/views/communications.css @@ -108,6 +108,11 @@ span.communication__sender__stats, background-color: var(--destroyed-content-color); } +.communication__body__avatar { + flex: 0 0 auto; + margin-right: 12px; +} + /* Mobile layout fixes */ @media (max-width: $min-desktop-width) { .communication__body { @@ -116,7 +121,7 @@ span.communication__sender__stats, grid-template-rows: repeat(2, auto) repeat(3, 1fr); } - .communication__body:first-child { + .communication__body__avatar { grid-area: 1 / 1 / 2 / 2; } diff --git a/lib/philomena_web/templates/admin/report/show.html.slime b/lib/philomena_web/templates/admin/report/show.html.slime index 0acf02e9..35bf25a0 100644 --- a/lib/philomena_web/templates/admin/report/show.html.slime +++ b/lib/philomena_web/templates/admin/report/show.html.slime @@ -4,10 +4,10 @@ p article.block.communication .block__content.flex.flex--no-wrap - .flex__fixed.spacing-right.hide-mobile + .communication__body__avatar.hide-mobile = render PhilomenaWeb.UserAttributionView, "_anon_user_avatar.html", object: @report, conn: @conn .flex__grow.communication__body - .flex__fixed.spacing-right.hide-desktop + .communication__body__avatar.hide-desktop = render PhilomenaWeb.UserAttributionView, "_anon_user_avatar.html", object: @report, conn: @conn .communication__body__sender span.communication__body__sender-name = render PhilomenaWeb.UserAttributionView, "_anon_user.html", object: @report, awards: true, conn: @conn diff --git a/lib/philomena_web/templates/comment/_comment.html.slime b/lib/philomena_web/templates/comment/_comment.html.slime index 982099da..de82e79c 100644 --- a/lib/philomena_web/templates/comment/_comment.html.slime +++ b/lib/philomena_web/templates/comment/_comment.html.slime @@ -22,10 +22,10 @@ article.block.communication id="comment_#{@comment.id}" = submit "Delete", class: "button" .block__content.flex.flex--no-wrap class=communication_body_class(@comment) - .flex__fixed.spacing-right.hide-mobile + .communication__body__avatar.hide-mobile = render PhilomenaWeb.UserAttributionView, "_anon_user_avatar.html", object: @comment, conn: @conn .flex__grow.communication__body - .flex__fixed.spacing-right.hide-desktop + .communication__body__avatar.hide-desktop = render PhilomenaWeb.UserAttributionView, "_anon_user_avatar.html", object: @comment, conn: @conn .communication__body__sender span.communication__body__sender-name = render PhilomenaWeb.UserAttributionView, "_anon_user.html", object: @comment, awards: true, conn: @conn diff --git a/lib/philomena_web/templates/comment/_comment_with_image.html.slime b/lib/philomena_web/templates/comment/_comment_with_image.html.slime index d5898685..c82885cd 100644 --- a/lib/philomena_web/templates/comment/_comment_with_image.html.slime +++ b/lib/philomena_web/templates/comment/_comment_with_image.html.slime @@ -1,11 +1,11 @@ article.block.communication id="comment_#{@comment.id}" .block__content.flex.flex--no-wrap class=communication_body_class(@comment) - .flex__fixed.spacing-right.hide-mobile + .communication__body__avatar.hide-mobile .post-image-container = render PhilomenaWeb.ImageView, "_image_container.html", image: @comment.image, size: :thumb_tiny, conn: @conn .flex__grow.communication__body - .flex__fixed.spacing-right.hide-desktop + .communication__body__avatar.hide-desktop .post-image-container = render PhilomenaWeb.ImageView, "_image_container.html", image: @comment.image, size: :thumb_tiny, conn: @conn .communication__body__sender diff --git a/lib/philomena_web/templates/image/comment/history/index.html.slime b/lib/philomena_web/templates/image/comment/history/index.html.slime index 2d392b3b..b850c552 100644 --- a/lib/philomena_web/templates/image/comment/history/index.html.slime +++ b/lib/philomena_web/templates/image/comment/history/index.html.slime @@ -9,11 +9,11 @@ h1 = for version <- @versions do article.block.communication .block__content.flex.flex--no-wrap - .flex__fixed.spacing-right.hide-mobile + .communication__body__avatar.hide-mobile = render PhilomenaWeb.UserAttributionView, "_anon_user_avatar.html", object: @comment, conn: @conn .flex__grow.communication__body - .flex__fixed.spacing-right.hide-desktop + .communication__body__avatar.hide-desktop = render PhilomenaWeb.UserAttributionView, "_anon_user_avatar.html", object: @comment, conn: @conn .communication__body__sender span.communication__body__sender-name = render PhilomenaWeb.UserAttributionView, "_anon_user.html", object: @comment, awards: true, conn: @conn diff --git a/lib/philomena_web/templates/message/_message.html.slime b/lib/philomena_web/templates/message/_message.html.slime index 8701d538..87393460 100644 --- a/lib/philomena_web/templates/message/_message.html.slime +++ b/lib/philomena_web/templates/message/_message.html.slime @@ -14,11 +14,11 @@ article.block.communication ' Approve .block__content.flex.flex--no-wrap - .flex__fixed.spacing-right.hide-mobile + .communication__body__avatar.hide-mobile = render PhilomenaWeb.UserAttributionView, "_user_avatar.html", object: %{user: @message.from}, conn: @conn, class: "avatar--100px" .flex__grow.communication__body - .flex__fixed.spacing-right.hide-desktop + .communication__body__avatar.hide-desktop = render PhilomenaWeb.UserAttributionView, "_user_avatar.html", object: %{user: @message.from}, conn: @conn, class: "avatar--100px" .communication__body__sender span.communication__body__sender-name = render PhilomenaWeb.UserAttributionView, "_user.html", object: %{user: @message.from}, badges: true, conn: @conn diff --git a/lib/philomena_web/templates/post/_post.html.slime b/lib/philomena_web/templates/post/_post.html.slime index ab5adcd7..f4a8aa0b 100644 --- a/lib/philomena_web/templates/post/_post.html.slime +++ b/lib/philomena_web/templates/post/_post.html.slime @@ -22,10 +22,10 @@ article.block.communication id="post_#{@post.id}" = submit "Delete", class: "button" .block__content.flex.flex--no-wrap class=communication_body_class(@post) - .flex__fixed.spacing-right.hide-mobile + .communication__body__avatar.hide-mobile = render PhilomenaWeb.UserAttributionView, "_anon_user_avatar.html", object: @post, conn: @conn .flex__grow.communication__body - .flex__fixed.spacing-right.hide-desktop + .communication__body__avatar.hide-desktop = render PhilomenaWeb.UserAttributionView, "_anon_user_avatar.html", object: @post, conn: @conn .communication__body__sender span.communication__body__sender-name = render PhilomenaWeb.UserAttributionView, "_anon_user.html", object: @post, awards: true, conn: @conn diff --git a/lib/philomena_web/templates/post/preview/create.html.slime b/lib/philomena_web/templates/post/preview/create.html.slime index 452cda34..cc36ffbc 100644 --- a/lib/philomena_web/templates/post/preview/create.html.slime +++ b/lib/philomena_web/templates/post/preview/create.html.slime @@ -1,9 +1,9 @@ .block.flex - .flex__fixed.spacing-right.hide-mobile + .communication__body__avatar.hide-mobile = render PhilomenaWeb.UserAttributionView, "_anon_user_avatar.html", object: @post, conn: @conn .flex__grow.communication__body - .flex__fixed.spacing-right.hide-desktop + .communication__body__avatar.hide-desktop = render PhilomenaWeb.UserAttributionView, "_anon_user_avatar.html", object: @post, conn: @conn .communication__body__sender span.communication__body__sender-name diff --git a/lib/philomena_web/templates/topic/post/history/index.html.slime b/lib/philomena_web/templates/topic/post/history/index.html.slime index 25625f00..4048f99e 100644 --- a/lib/philomena_web/templates/topic/post/history/index.html.slime +++ b/lib/philomena_web/templates/topic/post/history/index.html.slime @@ -8,11 +8,11 @@ h1 = for version <- @versions do article.block.communication .block__content.flex.flex--no-wrap - .flex__fixed.spacing-right.hide-mobile + .communication__body__avatar.hide-mobile = render PhilomenaWeb.UserAttributionView, "_anon_user_avatar.html", object: @post, conn: @conn .flex__grow.communication__body - .flex__fixed.spacing-right.hide-desktop + .communication__body__avatar.hide-desktop = render PhilomenaWeb.UserAttributionView, "_anon_user_avatar.html", object: @post, conn: @conn .communication__body__sender span.communication__body__sender-name = render PhilomenaWeb.UserAttributionView, "_anon_user.html", object: @post, awards: true, conn: @conn