-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhfeed.html
108 lines (107 loc) · 3.64 KB
/
hfeed.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<html>
<head><title>{{feed.title}}</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="styles/hfeed.css" media="all" rel="stylesheet" type="text/css" />
<script src="static/fragmention.js"></script>
</head>
<body class="h-feed">
<h1 class="p-name"><a class="u-url" href="{{feed.link}}">{{feed.title}}</a></h1>
{% if feed.subtitle_detail and feed.subtitle_detail.type=="text/plain" %}<h2 class="p-summary">{{feed.subtitle}}</h2>
{% else %}<h2 class="e-summary">{% autoescape false %}{{feed.subtitle}}{% endautoescape %}</h2>
{% endif %}
{% if feed.author_detail %}
<p class="p-author h-card">
{% if feed.image %}
<img src="{{feed.image.href}}" class="u-photo" />
{% endif %}
{% for link in feed.links %}
{% if link.type.split('/')[0] == 'image' and link.rel=='avatar' %}
<img alt="" class="u-photo" src="{{link.href}}" />
{% endif %}
{% endfor %}
<a href="{{feed.author_detail.href}}">{{feed.author_detail.name}}</a>
</p>
{% endif %}
{% for entry in entries %}
<details class="h-entry" {% if entry.link == entries[0].link %}open{% endif %}>
<summary class="p-name"><a class="u-url" href="{{entry.link}}">{% autoescape false %}{{entry.title}}{% endautoescape %}</a></summary>
<div class="e-content">
{% if entry.summary and entry.content %}
<span class="e-summary">
{% autoescape false %}
{{entry.summary}}
{% endautoescape %}
{% if entry.content[0].value.startswith(entry.summary) %}
{% autoescape false %}
{{entry.content[0].value.split(entry.summary)[1] }}
{% endautoescape %}
{% else %}
{% autoescape false %}
{{entry.content[0].value}}
{% endautoescape %}
{% endif %}
{% elif entry.content %}
{% autoescape false %}
{{entry.content[0].value}}
{% endautoescape %}
{% elif entry.summary %}
<span class="e-summary">
{% autoescape false %}
{{entry.summary}}
{% endautoescape %}
</span>
{% endif %}
{% for link in entry.links %}
{% if link.type == 'audio/mpeg' or link.type == 'audio/mp3' or (link.href and link.href.endswith(".mp3")) %}
<p><audio class="u-audio" src="{{link.href}}" controls preload=none ><a href="{{link.href}}">audio</a></audio>
{% endif %}
{% if link.type == 'video/x-m4v' or link.type == 'video/x-mp4' or link.type == 'video/mp4' %}
<p><video class="u-video" src="{{link.href}}" controls preload=none ><a href="{{link.href}}">video</a></video>
{% endif %}
{% if link.type and link.type.split('/')[0] == 'image' and link.rel not in ['avatar','header'] %}
<p><a href="{{link.href}}"><img alt="" class="u-photo" src="{{link.href}}" /></a>
{% endif %}
{% endfor %}
</div>
{% if entry.published %}
<p><time class="dt-published" datetime="{{entry.iso_published}}">Published: {{entry.human_published}}</time>
{% endif %}
{% if entry.updated %}
<p {% if entry.updated==entry.published %} style="display:none" {% endif %}><time class="dt-updated" datetime="{{entry.iso_updated}}">Updated: {{entry.human_updated}}</time>
{% endif %}
{% if entry.authors %}
<ul class="authors"> by
{% for author in entry.authors %}
<li class="p-author">{{author.name}}
{% endfor %}
</ul>
{% else %}
{% if entry.author_detail %}
{% if entry.author_detail.href %}
<p>by <a class="p-author h-card" href="{{entry.author_detail.href}}">
{% for link in entry.links %}
{% if link.type.split('/')[0] == 'image' and link.rel=='avatar' %}
<img alt="" class="u-photo" src="{{link.href}}" />
{% endif %}
{% endfor %}
{{entry.author_detail.name}}</a>
{% else %}
{% autoescape false %}
by <span class="p-author h-card">{{entry.author_detail.name}}</span>
{% endautoescape %}
{% endif %}
{% endif %}
{% endif %}
</details>
<hr>
{% endfor %}
{% if raw == 'on' %}
<code>{{feeds}}
<p>{{feed}}
<p>
{{entries}}
</code>
{% endif %}
</body>
</html>