From 35613d9c86eaaf427a3330eed2a4b90424b944a4 Mon Sep 17 00:00:00 2001 From: Sol Fisher Romanoff Date: Tue, 25 Oct 2022 00:26:13 +0300 Subject: [PATCH] Add fontawesome icons --- .../web/static_fe/static_fe_controller.ex | 3 +- .../static_fe/static_fe/_notice.html.eex | 32 +++++++++++++++++-- .../static_fe/static_fe/profile.html.eex | 6 ++++ priv/static/static-fe/static-fe.css | 20 +++++++++++- 4 files changed, 56 insertions(+), 5 deletions(-) diff --git a/lib/pleroma/web/static_fe/static_fe_controller.ex b/lib/pleroma/web/static_fe/static_fe_controller.ex index 97c41c6f9..0d54b03c6 100644 --- a/lib/pleroma/web/static_fe/static_fe_controller.ex +++ b/lib/pleroma/web/static_fe/static_fe_controller.ex @@ -160,7 +160,8 @@ defp represent(%Activity{object: %Object{data: data}} = activity, selected) do sensitive: data["sensitive"], selected: selected, counts: get_counts(activity), - id: activity.id + id: activity.id, + visibility: Visibility.get_visibility(activity.object) } end diff --git a/lib/pleroma/web/templates/static_fe/static_fe/_notice.html.eex b/lib/pleroma/web/templates/static_fe/static_fe/_notice.html.eex index 572025caa..ead9134c8 100644 --- a/lib/pleroma/web/templates/static_fe/static_fe/_notice.html.eex +++ b/lib/pleroma/web/templates/static_fe/static_fe/_notice.html.eex @@ -29,6 +29,17 @@ <%= time_ago(@published) %> + <%= if @visibility == "public" do %> + + + + <% else %> + <%= if @visibility == "unlisted" do %> + + + + <% end %> + <% end %>
@@ -54,9 +65,24 @@
-
<%= @counts.replies %>
-
<%= @counts.announces %>
-
<%= @counts.likes %>
+
+ + + + <%= @counts.replies %> +
+
+ + + + <%= @counts.announces %> +
+
+ + + + <%= @counts.likes %> +
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 eecb09a18..dd306aa1e 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 @@ -29,6 +29,12 @@ <%= if @user.actor_type == "Service" do %> Bot <% end %> + <%= if @user.is_locked do %> + + + + + <% end %> diff --git a/priv/static/static-fe/static-fe.css b/priv/static/static-fe/static-fe.css index 280e603e3..803056480 100644 --- a/priv/static/static-fe/static-fe.css +++ b/priv/static/static-fe/static-fe.css @@ -1,5 +1,6 @@ /* pleroma-light and pleroma-dark themes from pleroma-fe */ :root { + --icon: rgba(100, 103, 108, 1); --alertNeutral: rgba(185, 185, 186, 0.5); --wallpaper: rgba(11, 16, 23, 1); --alertNeutralText: rgba(255, 255, 255, 1); @@ -171,6 +172,11 @@ .heading-left { display: flex; } +.heading-right { + display: flex; + align-items: center; +} + .status-container .account-name { min-width: 1.6em; margin-right: 0.4em; @@ -228,7 +234,8 @@ .status-actions { } .status-actions > * { max-width: 4em; - flex: 1 + flex: 1; + display: flex; } .status-summary { @@ -446,3 +453,14 @@ .attachment > * { .attachment:not(:last-child) { margin-right: 0.5em; } + +.fa-icon { + height: 0.875em; + margin-left: 0.5em; + margin-right: 0.3em; + fill: var(--icon); +} + +.status-actions .fa-icon { + height: 1.1em; +}