From abad279fd6247b81e04efd9110ffe221bb096708 Mon Sep 17 00:00:00 2001 From: Guillermo Ramos Date: Tue, 11 Feb 2020 17:08:42 +0100 Subject: CSS cleanup --- assets/css/app.css | 32 +++++++++++++------------- lib/waev_web/templates/exports/show.html.eex | 34 ++++++++++------------------ lib/waev_web/views/exports_view.ex | 22 ++++++++++++++++++ 3 files changed, 50 insertions(+), 38 deletions(-) diff --git a/assets/css/app.css b/assets/css/app.css index e7f42f7..4bfd6cb 100644 --- a/assets/css/app.css +++ b/assets/css/app.css @@ -14,67 +14,67 @@ body { width: 100%; } -.wa-avatars { +.parties { display: flex; flex-direction: row; align-items: center; } -.wa-avatars .wa-avatar { +.party-peek { flex: 0 0 50%; text-align: center; padding: 16px 40px 12px 40px; } -.wa-avatars .wa-avatar figure { +.party-peek figure { margin: 0; } -.wa-avatar img { - max-height: 140px; +.avatar { border-radius: 50%; } - -.wa-avatar--tiny { +.avatar--big { + max-height: 140px; +} +.avatar--tiny { max-height: 42px; - border-radius: 50%; } -.wa-row { +.row { margin-top: 10px; display: flex; align-items: center; } -.wa-row-left { +.row-left { flex-direction: row; } -.wa-row-right { +.row-right { flex-direction: row-reverse; } -.wa-white-box { +.white-box { background-color: white; border-radius: 5px; box-shadow: 1px 1px 2px grey; } /* Message box */ -.wa-message { +.message { padding: 0px !important; margin: 0 10px 0 10px; max-width: 65%; } -.wa-message-photo { +.message-photo { border-radius: 5px 5px 0 0; max-height: 600px; } -.wa-message-box { +.message-box { padding: 0 10px 0 10px; margin-top: 5px; overflow-wrap: break-word; } -.wa-message-date { +.message-date { text-align: right; color: grey; font-size: 12px; diff --git a/lib/waev_web/templates/exports/show.html.eex b/lib/waev_web/templates/exports/show.html.eex index 501f3c2..9ac011e 100644 --- a/lib/waev_web/templates/exports/show.html.eex +++ b/lib/waev_web/templates/exports/show.html.eex @@ -1,43 +1,33 @@ -
-
-
- <%= @export.left.name %> -
<%= @export.left.name %>
-
-
-
-
- <%= @export.right.name %> -
<%= @export.right.name %>
-
-
+
+ <%= party_peek(assigns, @export.left) %> + <%= party_peek(assigns, @export.right) %>
<%= for message <- @export.messages do %> <%= case message.side do %> <% :left -> %> -
- +
+ <%= party_avatar(assigns, @export.left, :tiny) %> <% :right -> %> -