Apply all suggested changes from reviewers.
[akkoma] / lib / pleroma / web / templates / static_fe / static_fe / _notice.html.eex
1 <div class="activity" <%= if @data[:selected] do %> id="selected" <% end %>>
2 <p class="pull-right">
3 <%= link @data.published, to: @data.link, class: "activity-link" %>
4 </p>
5 <%= render("user_card.html", %{user: @data.user}) %>
6 <div class="activity-content">
7 <%= if @data.title != "" do %>
8 <details>
9 <summary><%= raw @data.title %></summary>
10 <div class="e-content"><%= raw @data.content %></div>
11 </details>
12 <% else %>
13 <div class="e-content"><%= raw @data.content %></div>
14 <% end %>
15 <%= for %{"name" => name, "url" => [url | _]} <- @data.attachment do %>
16 <%= if @data.sensitive do %>
17 <details class="nsfw">
18 <summary>sensitive media</summary>
19 <div>
20 <%= render("_attachment.html", %{name: name, url: url["href"],
21 mediaType: fetch_media_type(url)}) %>
22 </div>
23 </details>
24 <% else %>
25 <%= render("_attachment.html", %{name: name, url: url["href"],
26 mediaType: fetch_media_type(url)}) %>
27 <% end %>
28 <% end %>
29 </div>
30 </div>