diff options
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/layouts/application.html.haml | 3 | ||||
-rw-r--r-- | app/views/profile/_status.html.haml | 7 | ||||
-rw-r--r-- | app/views/profile/_status_footer.html.haml | 7 | ||||
-rw-r--r-- | app/views/profile/_status_header.html.haml | 8 | ||||
-rw-r--r-- | app/views/profile/entry.html.haml | 2 | ||||
-rw-r--r-- | app/views/profile/show.html.haml | 10 |
6 files changed, 34 insertions, 3 deletions
diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index 0cb4e96e8..c46fb0b33 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -7,4 +7,5 @@ = javascript_include_tag 'application' = csrf_meta_tags %body - = yield + .container + = yield diff --git a/app/views/profile/_status.html.haml b/app/views/profile/_status.html.haml new file mode 100644 index 000000000..39e70b69c --- /dev/null +++ b/app/views/profile/_status.html.haml @@ -0,0 +1,7 @@ +%div.entry + .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/_status_footer.html.haml b/app/views/profile/_status_footer.html.haml new file mode 100644 index 000000000..0c47ade90 --- /dev/null +++ b/app/views/profile/_status_footer.html.haml @@ -0,0 +1,7 @@ +.counter.counter-retweets + %i.fa.fa-retweet + %span.num= status.reblogs.count + +.counter.counter-favourites + %i.fa.fa-star + %span.num= status.favourites.count diff --git a/app/views/profile/_status_header.html.haml b/app/views/profile/_status_header.html.haml new file mode 100644 index 000000000..6f0e8748e --- /dev/null +++ b/app/views/profile/_status_header.html.haml @@ -0,0 +1,8 @@ += link_to (status.account.local? ? profile_url(name: status.account.username) : status.account.url), class: 'name' do + %strong= status.account.display_name.blank? ? status.account.username : status.account.display_name + = "@#{status.account.acct}" + += link_to status.local? ? status_url(name: status.account.username, id: status.stream_entry.id) : status.url, class: 'time' do + %span{ title: status.created_at } + = time_ago_in_words(status.created_at) + ago diff --git a/app/views/profile/entry.html.haml b/app/views/profile/entry.html.haml new file mode 100644 index 000000000..8d0b23607 --- /dev/null +++ b/app/views/profile/entry.html.haml @@ -0,0 +1,2 @@ +%div.activity-stream + = render partial: @type, locals: { @type.to_sym => @entry.activity } diff --git a/app/views/profile/show.html.haml b/app/views/profile/show.html.haml index dcb5764ec..c84cb7e81 100644 --- a/app/views/profile/show.html.haml +++ b/app/views/profile/show.html.haml @@ -1,2 +1,8 @@ -%h1 Profile#show -%p Find me in app/views/profile/show.html.haml +%div.card + %h1.name + = @account.display_name.blank? ? @account.username : @account.display_name + %small= "@#{@account.username}" + +%div.activity-stream + - @account.statuses.order('id desc').each do |status| + = render partial: 'status', locals: { status: status } |