-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhfeedmasto.html
65 lines (64 loc) · 2.37 KB
/
hfeedmasto.html
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<html>
<head><title>{{feed.title}}</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="styles/mastoview.css" media="all" rel="stylesheet" type="text/css" />
<script src="static/fragmention.js"></script>
<link rel="stylesheet" href="styles/awesomplete.css" />
<script src="/static/awesomplete.min.js" async></script>
</head>
<body class="h-feed">
<div class="top">
<form action="/mastoview" method="get">
<input name="url" class="awesomplete" list="mylist" value="{{domain}}" data-minchars=1 data-maxitems=20/>
<datalist id="mylist">
{% for instance in instances %}
<option>{{instance["name"]}}</option>
{% endfor %}
</datalist>
<select name="view">
<option value="local" {% if view=="local" %}selected {% endif %}>Local</option>
<option value="federated" {% if view=="federated" %}selected {% endif %}>Federated</option>
</select>
<button type="submit" value="preview">Preview</button>
</form>
<a href="/mastoview?random=1"><button>random instance</button></a>
<h1 class="p-name"><a class="u-url" href="{{feed.url}}">{{feed.name}}</a></h1>
</div>
<h2>{{error}}</h2>
<div class="entries">
{% for entry in entries %}
<div class="h-entry entry">
<div class="p-author h-card header">
<img src="{{entry.account.avatar}}" class="u-photo" />
<a class="p-name" href="{{entry.account.url}}">{{entry.account.display_name or entry.account.username}}</a> @<span class="p-nickname">{% autoescape false %}{{entry.account.acct}}{% endautoescape %}</span>
</div>
{% if entry.spoiler_text!="" %}
<details>
<summary class="p-summary">{% autoescape false %}{{entry.spoiler_text}}{% endautoescape %} <span class="showmore">Show More</span></summary>
{% endif %}
<div class="e-content content">
{% if entry.content %}
{% autoescape false %}
{{entry.content}}
{% endautoescape %}
{% endif %}
</div>
{% if entry.nsfw_hide_media and entry.media_attachments %}
<details><summary>Show NSFW media</summary>
{% endif %}
{% for media in entry.media_attachments %}
<figure ><img class="u-photo" src="{{media.preview_url}}" /></figure>
{% endfor %}
{% if entry.nsfw_hide_media %}
</details>
{% endif %}
{% if entry.spoiler_text!="" %}
</details>
{% endif %}
<div class="footer"><a class="u-url" href="{{entry.url}}"><time class="dt-published" datetime="{{entry.created_at}}">{{entry.humancreated}}</time></a></div>
</div>
{% endfor %}
</div>
</body>
</html>