2 <div class="p-author h-card">
3 <a class="u-url" rel="author noopener" href="<%= @author.ap_id %>">
5 <img src="<%= User.avatar_url(@author) |> MediaProxy.url %>" width="48" height="48" alt="">
7 <span class="display-name" style="padding-left: 0.5em;">
8 <bdi><%= raw (@author.name |> Formatter.emojify(@author.emoji)) %></bdi>
9 <span class="nickname">@<%= full_nickname(@author) %></span>
14 <div class="activity-content" >
15 <%= if status_title(@activity) != "" do %>
16 <details <%= if open_content?() do %>open<% end %>>
17 <summary><%= raw status_title(@activity) %></summary>
18 <div><%= activity_content(@activity) %></div>
21 <div><%= activity_content(@activity) %></div>
23 <%= for %{"name" => name, "url" => [url | _]} <- attachments(@activity) do %>
24 <div class="attachment">
25 <%= if sensitive?(@activity) do %>
26 <details class="nsfw">
27 <summary onClick="updateHeight()"><%= Gettext.gettext("sensitive media") %></summary>
28 <div class="nsfw-content">
29 <%= render("_attachment.html", %{name: name, url: url["href"],
30 mediaType: fetch_media_type(url)}) %>
34 <%= render("_attachment.html", %{name: name, url: url["href"],
35 mediaType: fetch_media_type(url)}) %>
41 <dl class="counts pull-right">
42 <dt><%= Gettext.gettext("replies") %></dt><dd><%= @counts.replies %></dd>
43 <dt><%= Gettext.gettext("announces") %></dt><dd><%= @counts.announces %></dd>
44 <dt><%= Gettext.gettext("likes") %></dt><dd><%= @counts.likes %></dd>
47 <p class="date pull-left">
48 <%= link published(@activity), to: activity_url(@author, @activity) %>
53 function updateHeight() {
54 window.requestAnimationFrame(function(){
55 var height = document.getElementsByTagName('html')[0].scrollHeight;
57 window.parent.postMessage({
58 type: 'setHeightPleromaEmbed',
65 window.addEventListener('message', function(e){
66 var data = e.data || {};
68 if (!window.parent || data.type !== 'setHeightPleromaEmbed') {
72 window.parentId = data.id