-
Notifications
You must be signed in to change notification settings - Fork 3
/
index.php
327 lines (322 loc) · 19.6 KB
/
index.php
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
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
<?php
include("includes/constants.php");
?>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="A personalized newspaper based on Selfoss feed">
<meta name="author" content="Matthias Karl">
<title><?php echo $npName ?></title>
<!-- Bootstrap core CSS -->
<link href="/assets/bootstrap-4.5.2-dist/css/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous">
<link rel="icon" href="assets/ico/favicon.ico">
<script src="assets/js/jquery-1.12.4.min.js" integrity="sha384-nvAa0+6Qg9clwYCGGPpDQLVpLNn0fRaROjHqs13t4Ggj3Ez50XnGQqc/r8MhnRDZ" crossorigin="anonymous"></script>
<script src="assets/bootstrap-4.5.2-dist/js/bootstrap.min.js"></script>
<meta name="theme-color" content="#563d7c">
<style>
.bd-placeholder-img { font-size: 1.125rem; text-anchor: middle; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; }
@media (min-width: 768px) { .bd-placeholder-img-lg { font-size: 3.5rem; } }
</style>
<!-- Custom styles for this template -->
<link href="https://fonts.googleapis.com/css?family=Playfair+Display:700,900" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Quicksand&family=UnifrakturMaguntia&display=swap" rel="stylesheet">
<link href="/assets/css/blog.css" rel="stylesheet">
</head>
<body>
<div class="container">
<?php include("includes/news_header.php"); ?>
<!-- top start -->
<div class="jumbotron p-3 p-md-5 text-white rounded overflow-hidden bg-dark">
<div class="col-md-10 px-0">
<div><small><a id="<?php echo $tags[11][1] ?>link" href="<?php echo $tags[11][1] ?>" class="text-white" target="_blank"><span id="<?php echo $tags[11][1] ?>source"></span></a> - <span class="mb-1 text-muted" id="<?php echo $tags[11][1] ?>updatetime"></span></small></div>
<h1 class="display-4 font-italic"><a href="#" id="<?php echo $tags[11][1] ?>title" class="text-white"></a></h1>
<p class="lead my-3" id="<?php echo $tags[11][1] ?>content"></p>
<p class="lead mb-0"><a id="<?php echo $tags[11][1] ?>id" href="#" class="text-white font-weight-bold">Continue reading...</a></p>
</div>
</div>
<!-- top end -->
<!-- Cat 1-4 start -->
<div class="row mb-2">
<div class="col-md-3">
<div class="row no-gutters border rounded overflow-hidden flex-md-row mb-2 shadow-sm position-relative">
<div class="row no-gutters overflow-hidden flex-md-row mb-2 h-md-400 position-relative">
<div class="col p-3 d-flex flex-column position-static">
<strong class="d-inline-block mb-2 text-body"><a href="tag.php?t=<?php echo $tags[0][1] ?>" class="text-body"><?php echo $tags[0][0] ?></a></strong>
<div><small><a id="<?php echo $tags[0][1] ?>link" href="<?php echo $tags[0][1] ?>" target="_blank"><span id="<?php echo $tags[0][1] ?>source"></span></a> - <span class="mb-1 text-muted" id="<?php echo $tags[0][1] ?>updatetime"></span></small></div>
<h4 class="mb-0"><a href="#" id="<?php echo $tags[0][1] ?>title" class="text-dark"></a></h4>
<p class="card-text mb-auto" id="<?php echo $tags[0][1] ?>content"></p>
</div>
</div>
</div>
</div>
<div class="col-md-3">
<div class="row no-gutters border rounded overflow-hidden flex-md-row mb-2 shadow-sm position-relative">
<div class="row no-gutters overflow-hidden flex-md-row mb-2 h-md-400 position-relative">
<div class="col p-3 d-flex flex-column position-static">
<strong class="d-inline-block mb-2 text-danger"><a href="tag.php?t=<?php echo $tags[1][1] ?>" class="text-danger"><?php echo $tags[1][0] ?></a></strong>
<div><small><a id="<?php echo $tags[1][1] ?>link" href="<?php echo $tags[1][1] ?>" target="_blank"><span id="<?php echo $tags[1][1] ?>source"></span></a> - <span class="mb-1 text-muted" id="<?php echo $tags[1][1] ?>updatetime"></span></small></div>
<h4 class="mb-0"><a href="#" id="<?php echo $tags[1][1] ?>title" class="text-dark"></a></h4>
<p class="mb-auto" id="<?php echo $tags[1][1] ?>content"></p>
</div>
</div>
</div>
</div>
<div class="col-md-3">
<div class="row no-gutters border rounded overflow-hidden flex-md-row mb-2 shadow-sm position-relative">
<div class="row no-gutters overflow-hidden flex-md-row mb-2 h-md-400 position-relative">
<div class="col p-3 d-flex flex-column position-static">
<strong class="d-inline-block mb-2 text-success"><a href="tag.php?t=<?php echo $tags[2][1] ?>" class="text-success"><?php echo $tags[2][0] ?></a></strong>
<div><small><a id="<?php echo $tags[2][1] ?>link" href="<?php echo $tags[2][1] ?>" target="_blank"><span id="<?php echo $tags[2][1] ?>source"></span></a> - <span class="mb-1 text-muted" id="<?php echo $tags[2][1] ?>updatetime"></span></small></div>
<h4 class="mb-0"><a href="#" id="<?php echo $tags[2][1] ?>title" class="text-dark"></a></h4>
<p class="mb-auto" id="<?php echo $tags[2][1] ?>content"></p>
</div>
</div>
</div>
</div>
<div class="col-md-3">
<div class="row no-gutters border rounded overflow-hidden flex-md-row mb-2 shadow-sm position-relative">
<div class="row no-gutters overflow-hidden flex-md-row mb-2 h-md-400 position-relative">
<div class="col p-3 d-flex flex-column position-static">
<strong class="d-inline-block mb-2 text-primary"><a href="tag.php?t=<?php echo $tags[3][1] ?>" class="text-primary"><?php echo $tags[3][0] ?></a></strong>
<div><small><a id="<?php echo $tags[3][1] ?>link" href="<?php echo $tags[3][1] ?>" target="_blank"><span id="<?php echo $tags[3][1] ?>source"></span></a> - <span class="mb-1 text-muted" id="<?php echo $tags[3][1] ?>updatetime"></span></small></div>
<h4 class="mb-0"><a href="#" id="<?php echo $tags[3][1] ?>title" class="text-dark"></a></h4>
<p class="mb-auto" id="<?php echo $tags[3][1] ?>content"></p>
</div>
</div>
</div>
</div>
</div>
<!-- Cat 1-4 end -->
<!-- Cat 5-8 start -->
<div class="row mb-2">
<div class="col-md-3">
<div class="row no-gutters border rounded overflow-hidden flex-md-row mb-2 shadow-sm position-relative">
<div class="row no-gutters overflow-hidden flex-md-row mb-2 h-md-400 position-relative">
<div class="col p-3 d-flex flex-column position-static">
<strong class="d-inline-block mb-2 text-body"><a href="tag.php?t=<?php echo $tags[4][1] ?>" class="text-body"><?php echo $tags[4][0] ?></a></strong>
<div><small><a id="<?php echo $tags[4][1] ?>link" href="<?php echo $tags[4][1] ?>" target="_blank"><span id="<?php echo $tags[4][1] ?>source"></span></a> - <span class="mb-1 text-muted" id="<?php echo $tags[4][1] ?>updatetime"></span></small></div>
<h4 class="mb-0"><a href="#" id="<?php echo $tags[4][1] ?>title" class="text-dark"></a></h4>
<p class="card-text mb-auto" id="<?php echo $tags[4][1] ?>content"></p>
</div>
</div>
</div>
</div>
<div class="col-md-3">
<div class="row no-gutters border rounded overflow-hidden flex-md-row mb-2 shadow-sm position-relative">
<div class="row no-gutters overflow-hidden flex-md-row mb-2 h-md-400 position-relative">
<div class="col p-3 d-flex flex-column position-static">
<strong class="d-inline-block mb-2 text-danger"><a href="tag.php?t=<?php echo $tags[5][1] ?>" class="text-danger"><?php echo $tags[5][0] ?></a></strong>
<div><small><a id="<?php echo $tags[5][1] ?>link" href="<?php echo $tags[5][1] ?>" target="_blank"><span id="<?php echo $tags[5][1] ?>source"></span></a> - <span class="mb-1 text-muted" id="<?php echo $tags[5][1] ?>updatetime"></span></small></div>
<h4 class="mb-0"><a href="#" id="<?php echo $tags[5][1] ?>title" class="text-dark"></a></h4>
<p class="mb-auto" id="<?php echo $tags[5][1] ?>content"></p>
</div>
</div>
</div>
</div>
<div class="col-md-3">
<div class="row no-gutters border rounded overflow-hidden flex-md-row mb-2 shadow-sm position-relative">
<div class="row no-gutters overflow-hidden flex-md-row mb-2 h-md-400 position-relative">
<div class="col p-3 d-flex flex-column position-static">
<strong class="d-inline-block mb-2 text-success"><a href="tag.php?t=<?php echo $tags[6][1] ?>" class="text-success"><?php echo $tags[6][0] ?></a></strong>
<div><small><a id="<?php echo $tags[6][1] ?>link" href="<?php echo $tags[6][1] ?>" target="_blank"><span id="<?php echo $tags[6][1] ?>source"></span></a> - <span class="mb-1 text-muted" id="<?php echo $tags[6][1] ?>updatetime"></span></small></div>
<h4 class="mb-0"><a href="#" id="<?php echo $tags[6][1] ?>title" class="text-dark"></a></h4>
<p class="mb-auto" id="<?php echo $tags[6][1] ?>content"></p>
</div>
</div>
</div>
</div>
<div class="col-md-3">
<div class="row no-gutters border rounded overflow-hidden flex-md-row mb-2 shadow-sm position-relative">
<div class="row no-gutters overflow-hidden flex-md-row mb-2 h-md-400 position-relative">
<div class="col p-3 d-flex flex-column position-static">
<strong class="d-inline-block mb-2 text-primary"><a href="tag.php?t=<?php echo $tags[7][1] ?>" class="text-primary"><?php echo $tags[7][0] ?></a></strong>
<div><small><a id="<?php echo $tags[7][1] ?>link" href="<?php echo $tags[7][1] ?>" target="_blank"><span id="<?php echo $tags[7][1] ?>source"></span></a> - <span class="mb-1 text-muted" id="<?php echo $tags[7][1] ?>updatetime"></span></small></div>
<h4 class="mb-0"><a href="#" id="<?php echo $tags[7][1] ?>title" class="text-dark"></a></h4>
<p class="mb-auto" id="<?php echo $tags[7][1] ?>content"></p>
</div>
</div>
</div>
</div>
</div>
<!-- Cat 5-8 end -->
<!-- Cat 1-4 list start -->
<div class="row mb-2">
<div class="col-md-3">
<div class="row no-gutters border rounded overflow-hidden flex-md-row mb-2 shadow-sm position-relative">
<div class="row no-gutters overflow-hidden flex-md-row mb-2 position-relative">
<div class="col p-2 d-flex flex-column position-static">
<strong class="d-inline-block mb-2 text-body"><a href="tag.php?t=<?php echo $tags[0][1] ?>" class="text-body"><?php echo $tags[0][0] ?></a></strong>
<div id="<?php echo $tags[0][1] ?>news0"></div>
</div>
</div>
</div>
</div>
<div class="col-md-3">
<div class="row no-gutters border rounded overflow-hidden flex-md-row mb-2 shadow-sm position-relative">
<div class="row no-gutters overflow-hidden flex-md-row mb-2 position-relative">
<div class="col p-2 d-flex flex-column position-static">
<strong class="d-inline-block mb-2 text-danger"><a href="tag.php?t=<?php echo $tags[1][1] ?>" class="text-danger"><?php echo $tags[1][0] ?></a></strong>
<div id="<?php echo $tags[1][1] ?>news0"></div>
</div>
</div>
</div>
</div>
<div class="col-md-3">
<div class="row no-gutters border rounded overflow-hidden flex-md-row mb-2 shadow-sm position-relative">
<div class="row no-gutters overflow-hidden flex-md-row mb-2 position-relative">
<div class="col p-2 d-flex flex-column position-static">
<strong class="d-inline-block mb-2 text-success"><a href="tag.php?t=<?php echo $tags[2][1] ?>" class="text-success"><?php echo $tags[2][0] ?></a></strong>
<div id="<?php echo $tags[2][1] ?>news0"></div>
</div>
</div>
</div>
</div>
<div class="col-md-3">
<div class="row no-gutters border rounded overflow-hidden flex-md-row mb-2 shadow-sm position-relative">
<div class="row no-gutters overflow-hidden flex-md-row mb-2 position-relative">
<div class="col p-2 d-flex flex-column position-static">
<strong class="d-inline-block mb-2 text-primary"><a href="tag.php?t=<?php echo $tags[3][1] ?>" class="text-primary"><?php echo $tags[3][0] ?></a></strong>
<div id="<?php echo $tags[3][1] ?>news0"></div>
</div>
</div>
</div>
</div>
</div>
<!-- Cat 1-4 list end -->
<!-- Cat 5-6 list start -->
<div class="row mb-2">
<div class="col-md-3">
<div class="row no-gutters border rounded overflow-hidden flex-md-row mb-2 shadow-sm position-relative">
<div class="row no-gutters overflow-hidden flex-md-row mb-2 position-relative">
<div class="col p-2 d-flex flex-column position-static">
<strong class="d-inline-block mb-2 text-body"><a href="tag.php?t=<?php echo $tags[4][1] ?>" class="text-body"><?php echo $tags[4][0] ?></a></strong>
<div id="<?php echo $tags[4][1] ?>news0"></div>
</div>
</div>
</div>
</div>
<div class="col-md-3">
<div class="row no-gutters border rounded overflow-hidden flex-md-row mb-2 shadow-sm position-relative">
<div class="row no-gutters overflow-hidden flex-md-row mb-2 position-relative">
<div class="col p-2 d-flex flex-column position-static">
<strong class="d-inline-block mb-2 text-danger"><a href="tag.php?t=<?php echo $tags[5][1] ?>" class="text-danger"><?php echo $tags[5][0] ?></a></strong>
<div id="<?php echo $tags[5][1] ?>news0"></div>
</div>
</div>
</div>
</div>
<div class="col-md-3">
<div class="row no-gutters border rounded overflow-hidden flex-md-row mb-2 shadow-sm position-relative">
<div class="row no-gutters overflow-hidden flex-md-row mb-2 position-relative">
<div class="col p-2 d-flex flex-column position-static">
<strong class="d-inline-block mb-2 text-success"><a href="tag.php?t=<?php echo $tags[6][1] ?>" class="text-success"><?php echo $tags[6][0] ?></a></strong>
<div id="<?php echo $tags[6][1] ?>news0"></div>
</div>
</div>
</div>
</div>
<div class="col-md-3">
<div class="row no-gutters border rounded overflow-hidden flex-md-row mb-2 shadow-sm position-relative">
<div class="row no-gutters overflow-hidden flex-md-row mb-2 position-relative">
<div class="col p-2 d-flex flex-column position-static">
<strong class="d-inline-block mb-2 text-primary"><a href="tag.php?t=<?php echo $tags[7][1] ?>" class="text-primary"><?php echo $tags[7][0] ?></a></strong>
<div id="<?php echo $tags[7][1] ?>news0"></div>
</div>
</div>
</div>
</div>
</div>
<!-- Cat 5-6 list end -->
</div><!-- end container -->
<!-- Three categories with one full article -->
<main role="main" class="container">
<!-- Category 8 -->
<div class="row">
<div class="col-md-12 blog-main">
<h3 class="pb-4 mb-2 font-italic border-bottom alert-primary">
<a href="tag.php?t=<?php echo $tags[8][1] ?>" class="text-primary"><?php echo $tags[8][0] ?></a>
</h3>
</div>
</div>
<div class="row">
<div class="col-md-8 overflow-hidden blog-main">
<div class="blog-post">
<div><small><a id="<?php echo $tags[8][1] ?>link" href="#"><span id="<?php echo $tags[8][1] ?>source"></span></a> - <span class="mb-1 text-muted" id="<?php echo $tags[8][1] ?>updatetime"></span></small></div>
<h2 class="blog-post-title"><a href="#" id="<?php echo $tags[8][1] ?>title" class="text-dark"></a></h2>
<p id="<?php echo $tags[8][1] ?>content"></p>
</div><!-- /.blog-post -->
</div>
<div class="col-md-4 blog-main">
<div id="<?php echo $tags[8][1] ?>news0"></div>
</div>
</div>
<!-- Category 10 -->
<div class="row">
<div class="col-md-12 blog-main">
<h3 class="pb-4 mb-2 font-italic border-bottom alert-secondary">
<a href="tag.php?t=<?php echo $tags[10][1] ?>" class="text-secondary"><?php echo $tags[10][0] ?></a>
</h3>
</div>
</div>
<div class="row">
<div class="col-md-8 overflow-hidden blog-main">
<div class="blog-post">
<div><small><a id="<?php echo $tags[10][1] ?>link" href="#"><span id="<?php echo $tags[10][1] ?>source"></span></a> - <span class="mb-1 text-muted" id="<?php echo $tags[10][1] ?>updatetime"></span></small></div>
<h2 class="blog-post-title"><a href="#" id="<?php echo $tags[10][1] ?>title" class="text-dark"></a></h2>
<p id="<?php echo $tags[10][1] ?>content"></p>
</div><!-- /.blog-post -->
</div>
<div class="col-md-4 blog-main">
<div id="<?php echo $tags[10][1] ?>news0"></div>
</div>
</div>
<!-- Category 9 -->
<div class="row">
<div class="col-md-12 blog-main">
<h3 class="pb-4 mb-2 font-italic border-bottom alert-success">
<a href="tag.php?t=<?php echo $tags[9][1] ?>" class="text-success"><?php echo $tags[9][0] ?></a>
</h3>
</div>
</div>
<div class="row">
<div class="col-md-8 overflow-hidden blog-main">
<div class="blog-post">
<div><small><a id="<?php echo $tags[9][1] ?>link" href="#"><span id="<?php echo $tags[9][1] ?>source"></span></a> - <span class="mb-1 text-muted" id="<?php echo $tags[9][1] ?>updatetime"></span></small></div>
<h2 class="blog-post-title"><a href="#" id="<?php echo $tags[9][1] ?>title" class="text-dark"></a></h2>
<p id="<?php echo $tags[9][1] ?>content"></p>
</div><!-- /.blog-post -->
</div>
<div class="col-md-4 blog-main">
<div id="<?php echo $tags[9][1] ?>news0"></div>
</div>
</div><!-- /.blog-main -->
</main><!-- /.container -->
<!-- Toast start -->
<div id="toast-wrapper" class="toast text-white" role="alert" aria-live="assertive" aria-atomic="true" data-delay="8000" style="position: fixed; bottom: 5px; right: 5px;">
<div class="toast-body lead p-2" id="toast-body"></div>
</div>
<!-- Toast end -->
<!-- Placed at the end of the document so the pages load faster -->
<script language="JavaScript" type="text/javascript" src="assets/js/news.js"></script>
<script type="text/javascript">
var imto = <?php echo $imto ?>;
var jTags = <?php echo $jTags; ?>
var cntNews = 0;
$(document).ready(function(){
jTags.forEach(function(aRec) {
getNews(aRec.tag, aRec.mlen, aRec.nrec, 'c='+cntNews+'&', 'news', cntNews);
setInterval(function() { getNews(aRec.tag, aRec.mlen, aRec.nrec, 'c='+cntNews+'&', 'news', cntNews); }, aRec.itv * 1000);
});
});
$('body').on('click', 'button', function(){
$(this).off('click');
let vid = $(this).attr('id');
let hid = vid.substr(4,vid.length);
hideArticle(hid);
});
</script>
<?php include("includes/news_footer.php"); ?>
</body>
</html>