summaryrefslogtreecommitdiff
path: root/views/outbox.erb
diff options
context:
space:
mode:
authorpdp8 <pdp8@pdp8.info>2023-09-14 20:20:26 +0200
committerpdp8 <pdp8@pdp8.info>2023-09-14 20:20:26 +0200
commit44967ae9f605ca37b6d88e4e8b11a9cf1fdc2b57 (patch)
tree0060d8c1f44a202dc145c211ea7b2230f686acbf /views/outbox.erb
parent49de4bbdf6d68fef2133f1399131286decae3039 (diff)
note objects fixed, verify reactivated
Diffstat (limited to 'views/outbox.erb')
-rw-r--r--views/outbox.erb41
1 files changed, 41 insertions, 0 deletions
diff --git a/views/outbox.erb b/views/outbox.erb
new file mode 100644
index 0000000..db840f4
--- /dev/null
+++ b/views/outbox.erb
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<html lang='en'>
+ <head>
+ <meta charset="UTF-8">
+ <title>pdp8 social</title>
+ <link rel="icon" type="image/png" href="/pdp8.png">
+ <link rel='stylesheet' type='text/css' href='/style.css'>
+ </head>
+ <body>
+ <h1><a href="https://social.pdp8.info/pdp8">pdp8@social.pdp8.info</a></h1>
+ music, pictures and videos: <a href="https://pdp8.info">https://pdp8.info</a>
+ <% @activities.each do |activity|
+ file = find_file activity['object']['id']
+ @object = JSON.load_file file if file and File.exists? file
+ if @object
+ mention = mention @object['attributedTo'] %>
+ <div class='pdp8'>
+ <p><b><a href='<%= @object['attributedTo'] %>' target='_blank'><%= mention %></a></b>&nbsp;
+ <em><%= @object['published'] %></em>
+ <% if activity['type'] == 'Announce' %>
+ &nbsp;(<em>announced</em>)
+ <% end %>
+ <p>
+ <%= @object['content']%>
+ <% if @object['attachment']
+ @object['attachment'].each do |att|
+ case att['mediaType']
+ when /audio/ %>
+ <br><audio controls=''><source src='<%= att['url'] %>' type='<%= att['mediaType'] %>'></audio>
+ <% when /image/ %>
+ <br><a href='<%= att['url'] %>'><img src='<%= att['url'] %>' alt='<%= att['name'].gsub("'",'&apos;').gsub('"','&quot;') if att['name'] %>'></a>
+ <% when /video/ %>
+ <br><video controls=''><source src='<%= att['url'] %>' type='<%= att['mediaType'] %>'></video>
+ <% end %>
+ <% end %>
+ <% end %>
+ </div>
+ <% end %>
+ <% end %>
+ </body>
+</html>