about summary refs log tree commit diff
path: root/app/views/profile
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/profile')
-rw-r--r--app/views/profile/_status.html.haml7
-rw-r--r--app/views/profile/_status_footer.html.haml7
-rw-r--r--app/views/profile/_status_header.html.haml8
-rw-r--r--app/views/profile/entry.html.haml2
-rw-r--r--app/views/profile/show.html.haml10
5 files changed, 32 insertions, 2 deletions
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 }