From 5ae54f9e364880e1350ddcc8251a23cf79ae55fc Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Sun, 28 Feb 2016 00:51:05 +0100 Subject: Adding avatars to profile page and statuses --- app/views/profile/_status.html.haml | 16 ++++++++++------ app/views/profile/show.html.haml | 12 +++++++----- 2 files changed, 17 insertions(+), 11 deletions(-) (limited to 'app/views') 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 } -- cgit