about summary refs log tree commit diff
path: root/app/views
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-02-28 00:51:05 +0100
committerEugen Rochko <eugen@zeonfederated.com>2016-02-28 00:51:05 +0100
commit5ae54f9e364880e1350ddcc8251a23cf79ae55fc (patch)
tree9dbf55bae26ad0dfb9ecd9f39d68aeb32188cc0e /app/views
parent2c70f0ecaa507427d2592434cb4a516bcedd5039 (diff)
Adding avatars to profile page and statuses
Diffstat (limited to 'app/views')
-rw-r--r--app/views/profile/_status.html.haml16
-rw-r--r--app/views/profile/show.html.haml12
2 files changed, 17 insertions, 11 deletions
diff --git a/app/views/profile/_status.html.haml b/app/views/profile/_status.html.haml
index 44c58b84e..c2033b4f7 100644
--- a/app/views/profile/_status.html.haml
+++ b/app/views/profile/_status.html.haml
@@ -4,9 +4,13 @@
       %i.fa.fa-retweet
       Shared by
       = link_to display_name(status.account), profile_url(status.account), class: 'name'
-  .header
-    = render partial: 'status_header', locals: { status: status.reblog? ? status.reblog : status }
-  .content
-    = status.content
-  .counters
-    = render partial: 'status_footer', locals: { status: status.reblog? ? status.reblog : status }
+  .entry-container
+    .avatar
+      = image_tag status.reblog? ? status.reblog.account.avatar.url(:small) : status.account.avatar.url(:small)
+    .container
+      .header
+        = render partial: 'status_header', locals: { status: status.reblog? ? status.reblog : status }
+      .content
+        = status.content
+      .counters
+        = render partial: 'status_footer', locals: { status: status.reblog? ? status.reblog : status }
diff --git a/app/views/profile/show.html.haml b/app/views/profile/show.html.haml
index c84cb7e81..b93791734 100644
--- a/app/views/profile/show.html.haml
+++ b/app/views/profile/show.html.haml
@@ -1,8 +1,10 @@
-%div.card
-  %h1.name
-    = @account.display_name.blank? ? @account.username : @account.display_name
-    %small= "@#{@account.username}"
+.card
+  .avatar= image_tag @account.avatar.url(:medium)
+  .bio
+    %h1.name
+      = @account.display_name.blank? ? @account.username : @account.display_name
+      %small= "@#{@account.username}"
 
-%div.activity-stream
+.activity-stream
   - @account.statuses.order('id desc').each do |status|
     = render partial: 'status', locals: { status: status }