about summary refs log tree commit diff
path: root/app/views
diff options
context:
space:
mode:
Diffstat (limited to 'app/views')
-rw-r--r--app/views/accounts/_header.html.haml7
-rw-r--r--app/views/layouts/public.html.haml3
2 files changed, 10 insertions, 0 deletions
diff --git a/app/views/accounts/_header.html.haml b/app/views/accounts/_header.html.haml
index 371bc62c3..fb9abd691 100644
--- a/app/views/accounts/_header.html.haml
+++ b/app/views/accounts/_header.html.haml
@@ -1,4 +1,11 @@
 .card{ style: "background-image: url(#{@account.header.url(:medium)})" }
+  - if user_signed_in? && current_account.id != @account.id
+    .controls
+      - if current_account.following?(@account)
+        = link_to 'Unfollow', unfollow_account_path(@account), data: { method: :post }, class: 'button'
+      - else
+        = link_to 'Follow', follow_account_path(@account), data: { method: :post }, class: 'button'
+
   .avatar= image_tag @account.avatar.url(:large)
   %h1.name
     = display_name(@account)
diff --git a/app/views/layouts/public.html.haml b/app/views/layouts/public.html.haml
index 056393bba..0e56bef1f 100644
--- a/app/views/layouts/public.html.haml
+++ b/app/views/layouts/public.html.haml
@@ -1,3 +1,6 @@
+- content_for :header_tags do
+  = javascript_include_tag 'application_public'
+
 - content_for :content do
   .container= yield
   .footer