diff options
author | William Pitcock <nenolod@dereferenced.org> | 2019-03-03 13:36:59 +0000 |
---|---|---|
committer | Phil Hagelberg <phil@hagelb.org> | 2019-11-09 18:06:51 -0800 |
commit | ca5ef201ef8397981acf0647fe5cffea66299bfa (patch) | |
tree | 50b32732fd6282d83e92e2e89117604c55c4378a /lib | |
parent | b33fbd58e3852fc9de58917fafbb2c575a21dde1 (diff) | |
download | pleroma-ca5ef201ef8397981acf0647fe5cffea66299bfa.tar.gz |
static fe: add remote follow button
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pleroma/web/static_fe/static_fe_view.ex | 1 | ||||
-rw-r--r-- | lib/pleroma/web/templates/layout/static_fe.html.eex | 9 | ||||
-rw-r--r-- | lib/pleroma/web/templates/static_fe/static_fe/profile.html.eex | 9 |
3 files changed, 18 insertions, 1 deletions
diff --git a/lib/pleroma/web/static_fe/static_fe_view.ex b/lib/pleroma/web/static_fe/static_fe_view.ex index 71e47d2c1..c01e8d40b 100644 --- a/lib/pleroma/web/static_fe/static_fe_view.ex +++ b/lib/pleroma/web/static_fe/static_fe_view.ex @@ -8,6 +8,7 @@ defmodule Pleroma.Web.StaticFE.StaticFEView do alias Pleroma.User alias Pleroma.Web.MediaProxy alias Pleroma.Formatter + alias Pleroma.Web.Router.Helpers import Phoenix.HTML diff --git a/lib/pleroma/web/templates/layout/static_fe.html.eex b/lib/pleroma/web/templates/layout/static_fe.html.eex index 40a560460..7ce9ead90 100644 --- a/lib/pleroma/web/templates/layout/static_fe.html.eex +++ b/lib/pleroma/web/templates/layout/static_fe.html.eex @@ -70,6 +70,15 @@ text-decoration: none; } + .pull-right { + float: right; + } + + .collapse { + margin: 0; + width: auto; + } + h1 { margin: 0; } diff --git a/lib/pleroma/web/templates/static_fe/static_fe/profile.html.eex b/lib/pleroma/web/templates/static_fe/static_fe/profile.html.eex index 9ae4139ed..47b7d5286 100644 --- a/lib/pleroma/web/templates/static_fe/static_fe/profile.html.eex +++ b/lib/pleroma/web/templates/static_fe/static_fe/profile.html.eex @@ -1,4 +1,11 @@ -<h1><%= raw (@data.user.name |> Formatter.emojify(emoji_for_user(@data.user))) %></h1> +<h1> + <form class="pull-right collapse" method="POST" action="<%= Helpers.util_path(@conn, :remote_subscribe) %>"> + <input type="hidden" name="nickname" value="<%= @data.user.nickname %>"> + <input type="hidden" name="profile" value=""> + <button type="submit" class="collapse">Remote follow</button> + </form> + <%= raw (@data.user.name |> Formatter.emojify(emoji_for_user(@data.user))) %> +</h1> <p><%= raw @data.user.bio %></p> <div class="activity-stream"> <%= for activity <- @data.timeline do %> |