blob: 23adb19e92fbe041af5ffe0b8ea2b7e9039ef8b7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
<!DOCTYPE html>
<html lang='en'>
<head>
<meta charset="UTF-8">
<title>pdp8 social</title>
<link rel="icon" type="image/png" href="https://pdp8.info/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>
<p>
<% if @type == 'create' %>
<h2>posts | <a href='/outbox/announce'>boosts</a></h2>
<% elsif @type == 'announce' %>
<h2><a href='/outbox/create'>posts</a> | boosts</h2>
<% end %>
<% @objects.each do |object|
object = fetch(object) if object.is_a? String
mention = mention object['attributedTo'] %>
<div class='pdp8'>
<p><b><a href='<%= object['attributedTo'] %>' target='_blank'><%= mention %></a></b>
<em><%= object['published'] %></em>
<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("'",''').gsub('"','"') if att['name'] %>'></a>
<% when /video/ %>
<br><video controls=''><source src='<%= att['url'] %>' type='<%= att['mediaType'] %>'></video>
<% end %>
<% end %>
<% end %>
</div>
<% end %>
</body>
</html>
|