mirror of
https://git.pleroma.social/pleroma/pleroma.git
synced 2024-12-22 16:16:34 +00:00
Visually separate header.
This commit is contained in:
parent
2ac1ece652
commit
274cc18e8a
5 changed files with 45 additions and 30 deletions
|
@ -34,17 +34,17 @@ defmodule Pleroma.Web.StaticFE.StaticFEController do
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
def represent(%Activity{} = activity, selected) do
|
def represent(%Activity{object: %Object{data: data}} = activity, selected) do
|
||||||
{:ok, user} = User.get_or_fetch(activity.object.data["actor"])
|
{:ok, user} = User.get_or_fetch(activity.object.data["actor"])
|
||||||
|
|
||||||
%{
|
%{
|
||||||
user: user,
|
user: user,
|
||||||
title: get_title(activity.object),
|
title: get_title(activity.object),
|
||||||
content: activity.object.data["content"] || nil,
|
content: data["content"] || nil,
|
||||||
attachment: activity.object.data["attachment"],
|
attachment: data["attachment"],
|
||||||
link: Helpers.o_status_url(Pleroma.Web.Endpoint, :notice, activity.id),
|
link: Helpers.o_status_url(Pleroma.Web.Endpoint, :notice, activity.id),
|
||||||
published: activity.object.data["published"],
|
published: data["published"],
|
||||||
sensitive: activity.object.data["sensitive"],
|
sensitive: data["sensitive"],
|
||||||
selected: selected,
|
selected: selected,
|
||||||
counts: get_counts(activity)
|
counts: get_counts(activity)
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,6 +8,7 @@ defmodule Pleroma.Web.StaticFE.StaticFEView do
|
||||||
alias Calendar.Strftime
|
alias Calendar.Strftime
|
||||||
alias Pleroma.Emoji.Formatter
|
alias Pleroma.Emoji.Formatter
|
||||||
alias Pleroma.User
|
alias Pleroma.User
|
||||||
|
alias Pleroma.Web.Endpoint
|
||||||
alias Pleroma.Web.Gettext
|
alias Pleroma.Web.Gettext
|
||||||
alias Pleroma.Web.MediaProxy
|
alias Pleroma.Web.MediaProxy
|
||||||
alias Pleroma.Formatter
|
alias Pleroma.Formatter
|
||||||
|
|
|
@ -1,7 +1,11 @@
|
||||||
<h1><%= link @instance_name, to: "/" %></h1>
|
<header>
|
||||||
|
<h1><%= link @instance_name, to: "/" %></h1>
|
||||||
|
</header>
|
||||||
|
|
||||||
<div class="conversation">
|
<main>
|
||||||
<%= for activity <- @activities do %>
|
<div class="conversation">
|
||||||
<%= render("_notice.html", activity) %>
|
<%= for activity <- @activities do %>
|
||||||
<% end %>
|
<%= render("_notice.html", activity) %>
|
||||||
</div>
|
<% end %>
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
|
|
@ -1,16 +1,22 @@
|
||||||
<h1><%= link @instance_name, to: "/" %></h1>
|
<header>
|
||||||
|
<h1><%= link @instance_name, to: "/" %></h1>
|
||||||
|
|
||||||
<h3>
|
<h3>
|
||||||
<form class="pull-right collapse" method="POST" action="<%= Helpers.util_path(@conn, :remote_subscribe) %>">
|
<form class="pull-right collapse" method="POST" action="<%= Helpers.util_path(@conn, :remote_subscribe) %>">
|
||||||
<input type="hidden" name="nickname" value="<%= @user.nickname %>">
|
<input type="hidden" name="nickname" value="<%= @user.nickname %>">
|
||||||
<input type="hidden" name="profile" value="">
|
<input type="hidden" name="profile" value="">
|
||||||
<button type="submit" class="collapse">Remote follow</button>
|
<button type="submit" class="collapse">Remote follow</button>
|
||||||
</form>
|
</form>
|
||||||
<%= raw (@user.name |> Formatter.emojify(emoji_for_user(@user))) %>
|
<%= raw Formatter.emojify(@user.name, emoji_for_user(@user)) %> |
|
||||||
</h3>
|
<%= link "@#{@user.nickname}@#{Endpoint.host()}", to: User.profile_url(@user) %>
|
||||||
<p><%= raw @user.bio %></p>
|
</h3>
|
||||||
<div class="activity-stream">
|
<p><%= raw @user.bio %></p>
|
||||||
<%= for activity <- @timeline do %>
|
</header>
|
||||||
<%= render("_notice.html", Map.put(activity, :selected, false)) %>
|
|
||||||
<% end %>
|
<main>
|
||||||
</div>
|
<div class="activity-stream">
|
||||||
|
<%= for activity <- @timeline do %>
|
||||||
|
<%= render("_notice.html", Map.put(activity, :selected, false)) %>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
|
|
@ -4,7 +4,7 @@ body {
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container {
|
main {
|
||||||
margin: 50px auto;
|
margin: 50px auto;
|
||||||
max-width: 960px;
|
max-width: 960px;
|
||||||
padding: 40px;
|
padding: 40px;
|
||||||
|
@ -13,7 +13,11 @@ body {
|
||||||
}
|
}
|
||||||
|
|
||||||
header {
|
header {
|
||||||
border-bottom: 2em solid #282c37;
|
margin: 50px auto;
|
||||||
|
max-width: 960px;
|
||||||
|
padding: 40px;
|
||||||
|
background-color: #313543;
|
||||||
|
border-radius: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.activity {
|
.activity {
|
||||||
|
@ -57,11 +61,11 @@ a {
|
||||||
margin-bottom: 8px;
|
margin-bottom: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.h-card a {
|
header a, .h-card a {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.h-card a:hover {
|
header a:hover, .h-card a:hover {
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue