This repository has been archived by the owner on Jun 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 17
/
feed.tmpl
190 lines (185 loc) · 9.98 KB
/
feed.tmpl
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=yes">
<link rel="icon" href="favicon.ico">
<title>Naarad - KGP Trends</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.5/css/bootstrap.min.css" integrity="sha384-AysaV+vQoT3kOAXZkl02PThvDr8HYKPZhNT5h/CXfBThSRXQ6jW5DO2ekP5ViFdi" crossorigin="anonymous">
<link rel="stylesheet" href="https://opensource.keycdn.com/fontawesome/4.6.3/font-awesome.min.css" integrity="sha384-Wrgq82RsEean5tP3NK3zWAemiNEXofJsTwTyHmNb/iL3dP/sZJ4+7sOld1uqYJtE" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.5.2/animate.min.css">
<link rel="stylesheet" href="https://cdn.datatables.net/1.10.13/css/dataTables.bootstrap4.min.css">
<style>
.modal-body {
max-height: calc(100vh - 210px);
overflow-y: auto;
}
body {
font-family: 'Linux Libertine'; /* normal */
src: url('fonts/LinLibertine_R.woff') format('woff');
font-weight: normal;
font-style: normal;
}
</style>
</head>
<body>
<nav class="navbar navbar-fixed-top navbar-dark" style="background: #060713;">
<!Time stamp here>
<a class="navbar-brand" href="#" style="margin-top:-10px;">
<i class="fa fa-slack"></i> NAARAD
</a>
<ul class="nav navbar-nav float-xs-right">
<li class="nav-item active">
<a class="nav-link" href="https://wiki.metakgp.org/w/Main_Page" target="_blank"><i class="fa fa-wikipedia-w fa-lg"></i></a>
</li>
<li class="nav-item active">
<a class="nav-link" href="https://www.facebook.com/metakgp/?fref=ts" target="_blank"><i class="fa fa-facebook-official fa-lg"></i></a>
</li>
<li class="nav-item active">
<a class="nav-link" href="https://github.com/metakgp" target="_blank"><i class="fa fa-github fa-lg"></i></a>
</li>
</ul>
</nav>
<br><br><br><br>
<div class="container">
<table id="feed" class="table table-striped table-bordered" cellspacing="0" width="100%">
<thead>
<tr>
<th style="text-align:center;">KGPian Newsfeed</th>
</tr>
</thead>
<tbody>
{% for post in data %}
<tr>
<td>
<div class="card text-xs-center animated bounceInUp" style="visibility: visible; animation-name: bounceInUp;">
<div class="card-header" style="background: #3E4450; color: white;">
{{post['source']}}
</div>
{% if post['pic'] %}
<div class="col-lg-2">
<img class="card-img-top img-fluid b-lazy" src="ripple.gif" data-src="{{ post['pic'] }}">
</div>
{% endif %}
<div class="card-block">
<p class="card-text">
{{post['short_message'] }}
{% if post['read_more'] %}
{% if post['pic'] %}
<a href="#" data-toggle="modal" data-target="#big" data-source=" {{post['source']}} " data-message=" {{post['message']}} " data-img = "{{post['pic']}}" class="card-link"> [...]</a>
{% else %}
<a href="#" data-toggle="modal" data-target="#big" data-source=" {{post['source']}} " data-message=" {{post['message']}} " data-img = "0" class="card-link"> [...]</a>
{% endif %}
{% endif %}
</p>
{% if post['read_more'] %}
{% if post['pic'] %}
<a href="#" data-toggle="modal" data-target="#big" data-source=" {{post['source']}} " data-message=" {{post['message']}} " data-img = "{{post['pic']}}" class="card-link"><i class="fa fa-book fa-lg"></i> Read more</a>
{% else %}
<a href="#" data-toggle="modal" data-target="#big" data-source=" {{post['source']}} " data-message=" {{post['message']}} " data-img = "0" class="card-link"><i class="fa fa-book fa-lg"></i> Read more</a>
{% endif %}
{% endif %}
<a href="https://www.facebook.com/{{ post['id'] }}" target="_blank" class="card-link"><i class="fa fa-facebook-official fa-lg"></i> View post</a>
</div>
<div class="card-footer" style="background: #3E4450; color: white;">
<h6 class="card-subtitle small">Posted on {{ post['real_date'] }} at {{ post['real_time'] }}</h6>
</div>
</div>
</td>
</tr>
{% endfor %}
</tbody>
</table>
<div class="bd-example">
<div class="modal fade" id="big" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
<h4 class="modal-title" id="exampleModalLabel">New message</h4>
</div>
<div class="modal-body">
<div class="row">
<div id="pic" class="col-lg-4 col-sm-12" style="border:none; opacity: 1;">
<div class="card">
<img src="" width="100%" class="card-img-top img-fluid" alt="">
</div>
</div>
<div id="content" class="col-lg-8 col-sm-12">
<div class="card text-xs-center" style="border:none;">
<div class="card-block">
<p class="card-text">Some quick example text to build on the card title and make up the bulk of the card's content.</p>
</div>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/tether/1.2.0/js/tether.min.js" integrity="sha384-Plbmg8JY28KFelvJVai01l8WyZzrYWG825m+cZ0eDDS1f7d/js6ikvy1+X+guPIB" crossorigin="anonymous"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js" integrity="sha384-3ceskX3iaEnIogmQchP8opvBy3Mi7Ce34nWjpBIwVTHfGYWQS9jwHDVRnpKKHJg7" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.5/js/bootstrap.min.js" integrity="sha384-BLiI7JTZm+JWlgKa0M0kGRpJbF2J8q+qreVrKBC47e3K6BW78kGLrCkeRX6I9RoK" crossorigin="anonymous"></script>
<script src="https://cdn.datatables.net/1.10.13/js/jquery.dataTables.min.js"></script>
<script src="https://cdn.datatables.net/1.10.13/js/dataTables.bootstrap4.min.js"></script>
<script type="text/javascript">
$.extend( true, $.fn.dataTable.defaults, {
"ordering": false,
"bInfo" : false
});
$(document).ready(function(){
$('#feed').DataTable();
});
$('#feed').on( 'page.dt', function () {
$('html, body').animate({
scrollTop: 0
}, 200);
});
$('#big').on('show.bs.modal', function (event) {
var button = $(event.relatedTarget) // Button that triggered the modal
var source = button.data('source') // Extract info from data-* attributes
var message = button.data('message')
var img = button.data('img')
var modal = $(this)
if(img==0) {
modal.find("#pic").removeClass("col-lg-4")
modal.find("#pic").removeClass("col-sm-12")
modal.find("#content").removeClass("col-lg-8")
modal.find("#content").addClass("col-lg-12")
modal.find("#pic").hide()
}
else {
modal.find("#pic").addClass("col-lg-4")
modal.find("#pic").addClass("col-sm-12")
modal.find("#content").removeClass("col-lg-12")
modal.find("#content").addClass("col-lg-8")
modal.find("#pic").show()
$('#big img').attr('src', img);
}
modal.find('.modal-title').text(source)
modal.find('.card-text').html(message)
})
</script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-84925216-1', 'auto');
ga('send', 'pageview');
</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/blazy/1.8.1/blazy.js"></script>
<script>
;(function() {
var bLazy = new Blazy();
})();
</script>
</body>
</html>