forked from n8fr8/AnyNews-Prototype
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
174 lines (151 loc) · 6.97 KB
/
index.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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="A layout example that shows off a blog page with a list of posts.">
<link rel="manifest" href="/manifest.json">
<link rel="stylesheet" href="css/pure/pure-min.css">
<link rel="stylesheet" href="css/lightbox.min.css">
<script src='js/jquery-3.3.1.min.js'></script>
<script src='js/jsrender.min.js'></script>
<script src='js/anynews.js'></script>
<script src='js/lightbox.min.js'></script>
<title>The News</title>
<!--[if lte IE 8]>
<link rel="stylesheet" href="css/pure/grids-responsive-old-ie-min.css">
<![endif]-->
<!--[if gt IE 8]><!-->
<link rel="stylesheet" href="css/pure/grids-responsive-min.css">
<!--<![endif]-->
<!--[if lte IE 8]>
<link rel="stylesheet" href="css/layouts/blog-old-ie.css">
<![endif]-->
<!--[if gt IE 8]><!-->
<link rel="stylesheet" href="css/layouts/blog.css">
<!--<![endif]-->
</head>
<body>
<div id="layout" class="pure-g">
<div class="sidebar pure-u-1 pure-u-md-1-4">
<div class="header">
<h1 id="site-title" class="brand-title">The News</h1>
<h2 id="site-description" class="brand-tagline">Direct to you!</h2>
<nav class="nav">
<ul class="nav-list">
<li class="nav-item">
<a class="pure-button" href="#" onClick="loadFeed('feed/rfa/index.xml','#postTemplate')">RFA News</a>
</li>
<li class="nav-item">
<a class="pure-button" href="#" onClick="loadFeed('feed/tibet/rss2.xml','#postTemplate')">Tibetan News</a>
</li>
<li class="nav-item">
<a class="pure-button" href="#" onClick="loadFeed('feed/uyghur/rss2.xml','#postTemplate')">Uyghur News</a>
</li>
<li class="nav-item">
<a class="pure-button" href="#" onClick="loadFeed('feed/urduvoa/index.xml','#postTemplate')">پاکستان - وائس آف امریکہ</a>
</li>
<li class="nav-item">
<a class="pure-button" href="#" onClick="loadFeed('feed/podcast/cantonese.xml','#podcastTemplate')">自由亞洲電台粵語部廣播 (Cantonese Podcast)</a>
</li>
<li class="nav-item">
<a class="pure-button" href="#" onClick="loadFeed('feed/rfa/index.xml','#imageTemplate')">Photo Feed</a>
</li>
<li class="nav-item">
<a class="pure-button" href="#" onClick="loadFeed('feed/rfa/index.xml','#headlineTemplate')">Headlines Only</a>
</li>
</ul>
</nav>
<div id="add-app" style="display:none;margin:10px">
<a class="pure-button" href="#" onClick="showAddAppPrompt()">Activate App Mode</a>
</div>
</div>
</div>
<div class="content pure-u-1 pure-u-md-3-4">
<div>
<div class="posts" id="latest-news">
<h1 class="content-subhead">Latest News</h1>
<div id="output"></div>
</div>
<script id="imageTemplate" type="text/x-jsrender">
<section class="post">
<div class="pure-u-1 pure-u-md-1-2" >
<a href="{{:imageSrc}}" data-lightbox="news" data-title="{{:imageDesc}}">
<img alt="{{:imageDesc}}"
class="pure-img-responsive"
src="{{:imageSrc}}">
</a>
<div class="post-image-meta">
<h3>{{:imageDesc}}</h3>
</div>
</div>
</section>
</script>
<script id="headlineTemplate" type="text/x-jsrender">
<header class="post-header">
<img alt="{{:imageDesc}}" class="pure-img-responsive" src="{{:imageSrc}}" width="128px" style="float:left;margin:6px;">
<h3 class="post-title" style="font-size:18pt" onClick="$('#{{:index}}').show()">{{:title}}</h3>
<div class="post-description"><p>{{:pubDate}}</p></div>
</header>
<div id="{{:index}}" class="post-description" style="display:none;"><p>{{:content}}</p></div>
</script>
<script id="podcastTemplate" type="text/x-jsrender">
<section class="post"><header class="post-header">
<h2 class="post-title">{{:title}}</h2>
<p class="post-meta"><a class="post-author" href="#">{{:author}}</a> {{:category}} {{:pubDate}}</p>
</header>
<div class="post-description"><p>{{:description}}</p></div>
<div class="post-description"> <audio controls>
<source src="{{:enclosure}}" type="audio/mpeg">
Your browser does not support the audio element.
</audio> </div>
</section>
</script>
<script id="postTemplate" type="text/x-jsrender">
<section class="post"><header class="post-header">
<h2 class="post-title">{{:title}}</h2>
<p class="post-meta"><a class="post-author" href="#">{{:author}}</a> {{:category}} {{:pubDate}} <a href="{{:link}}">🌐</a></p>
</header>
<div class="post-description"><p>{{:description}}</p></div>
<div class="post-description">
{{if imageSrc && imageSrc.length}}
<div class="post-images pure-g">
<div class="pure-u-1 pure-u-md-1-2">
<a href="{{:imageSrc}}" data-lightbox="news" data-title="{{:imageDesc}}">
<img alt="{{:imageDesc}}"
class="pure-img-responsive"
src="{{:imageSrc}}">
</a>
<div class="post-image-meta">
<h3>{{:imageDesc}}</h3>
</div>
</div>
</div>
</div>
{{else}}
{{/if}}
{{if enclosure && enclosure.length}}
<div class="post-description"> <audio controls>
<source src="{{:enclosure}}" type="audio/mpeg">
Your browser does not support the audio element.
</audio> </div>
{{else}}
{{/if}}
<div class="post-description"><p>{{:content}}</p></div>
</section>
</script>
<div class="footer">
<div class="pure-menu pure-menu-horizontal">
<ul>
<li class="pure-menu-item"><a href="#" class="pure-menu-link">About</a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
<script>
loadFeed('feed/rfa/index.xml','#imageTemplate')
</script>
</body>
</html>