forked from rukshn/helius
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.htm
301 lines (280 loc) · 15.9 KB
/
index.htm
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
<!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">
<meta property="og:title" content="Picnicy" />
<meta property="og:type" content="Website" />
<meta property="og:url" content="http://picnicy.com" />
<meta property="og:image" content="https://pbs.twimg.com/profile_images/1551121325/hnshanghai.png" />
<meta property="og:description" content="Forum sharing Sri Lankan tech and news" />
<title>Picnicy</title>
<!-- Bootstrap -->
<link rel="stylesheet" href="/assets/bootstrap.min.css">
<link href='https://fonts.googleapis.com/css?family=Lato:400,300,700' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="https://code.ionicframework.com/ionicons/1.5.2/css/ionicons.min.css" type="text/css">
<link rel="stylesheet" href="/assets/main.css" type="text/css">
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.0";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<script type="text/x-handlebars" data-template-name="index">
<nav class="navbar navbar-inverse navbar-static-top cnav" role="navigation">
<div class="col-lg-8 col-lg-offset-2">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
{{#link-to 'index' class="navbar-brand navtitle"}}Picnicy{{/link-to}}
</div>
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav navbar-left">
<li><a class="bubble">A Sri Lankan techno page - Beta</a>
</ul>
<ul class="nav navbar-nav navbar-right">
{{#if ustat.user_status}}
<li><a {{action 'toggleSubmit'}} href="#"><span id="submitli" class="glyphicon glyphicon-plus"></span> Submit</a></li>
<li><div id="dropdown" class="dropdown"><a id="dropdownMenu" data-toggle="dropdown"><img height="30" width="30" class="img-circle img-responsive usrpic" {{bind-attr src = ustat.propic}} ></a>
<ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu1">
<li role="presentation"><a role="menuitem" tabindex="-1" href="#">Profile</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="/api/logout.php">Log out</a></li>
</ul>
</div></li>
{{else}}
<li>{{#link-to 'login'}}Submit{{/link-to}}</li>
{{/if}}
<li>{{#link-to 'about'}}About{{/link-to}}</li>
</ul>
</div>
</div>
</nav>
<div class="container">
{{#unless ustat.user_status}}
<div class="col-md-8 col-md-offset-2 well well-lg">
Join the newsletter to get updates. Don't worry no spam here :)
<a href="http://eepurl.com/57ZwD" class="btn btn-info">Subscribe</a>
<a href="http://twitter.com/picnicyco" class="btn btn-info">@picnicyco</a>
</div>
{{/unless}}
<div class="row">
{{outlet}}
{{#if showSubmit}}
{{partial 'submit'}}
{{/if}}
{{#if isSmall}}
<div {{bind-attr class=":col-md-5 :col-md-offset-1"}}>
{{else}}
<div {{bind-attr class=":col-md-8 :col-md-offset-2"}}>
{{/if}}
{{#each item in uposts itemController="book"}}
<div id="linkbox" class="media">
{{#if item.isVoted}}
<a {{bind-attr linkid = item.datalink}} class="pull-left voteb" href="#" {{action 'voteup' item.datalink}}>
<i class="ion-chevron-down"></i>
<div id="votec">{{item.votecount}}</div>
</a>
{{else}}
<a {{bind-attr linkid = item.datalink}} class="pull-left voteb" href="#" {{action 'votedown' item.datalink}}>
<i class="ion-chevron-up"></i>
<div id="votec">{{item.votecount}}</div>
</a>
{{/if}}
<div id="linkbody" class="media-body col-md-offset-1">
<h4 class="media-heading">{{#link-to 'post' item.datalink class="linkt"}}{{item.title}}{{/link-to}}</h4>
<div class="pull-right">
<div class="commentpic pull-left"><span class="ion-ios7-chatbubble" id="commetico"> {{item.num_comments}}</div>
<div class="pull-right"><img {{bind-attr src = item.upropic}} class="img-circle" height="30" width="30"></span></div>
</div>
<div class="pull-left tagline">{{item.tag_line}}</div>
</div>
</div>
{{/each}}
</div>
</div>
</div>
<nav class="navbar navbar-default navbar-static footer" role="navigation">
<div class="container">
<ul class="nav navbar-nav navbar-right">
<li><a><div class="fb-like" data-href="https://facebook.com/picnicy" data-layout="button_count" data-action="like" data-show-faces="true" data-share="false"></div></a></li>
<li><a href="https://twitter.com/picnicyco">@picnicyco</a></li>
<li><a href="http://eepurl.com/57ZwD">Newsletter</a></li>
<li><a href="#">Bugs and contact</a></li>
<li><a href="#">♥ Sri Lanka</a></li>
</ul>
</div>
</nav>
</script>
<script type="text/x-handlebars" data-template-name="submit">
<div class="col-md-5 pull-right rsidebar" id="submitb">
<div class="col-md-11 submitform">
<h4 id="title">Post Something New</h4>
{{#if onsubmit}}
<div><h4 id="title" class="pull-left"><span id="iconloading" class="ion-refreshing"></span>Submitting</h4></div>
{{else}}
<form id="postform" {{action 'submit' on='submit'}} role="form">
<div class="form-group">
{{input type="url" value=purl class="form-control" id="purl" placeholder="Link" required="true"}}
</div>
<div class="form-group">
{{input type="text" value=ptitle class="form-control" id="ptitle" placeholder="Title" required="true"}}
</div>
<div class="form-group">
{{input type="text" value=ptagline class="form-control" id="ptagline" placeholder="Tagline" required="true"}}
</div>
<button id="submitpost" type="submit" class="btn btn-success">Post it :)</button>
<button type="button" class="btn btn-warning" {{action 'toggleSubmit'}}>Cancel</button>
</form>
{{/if}}
</div>
</div>
</script>
<script type="text/x-handlebars" data-template-name="post">
<div class="col-md-6 sidebarr pull-right rsidebar">
<div id="top-contain">
<div id="top">
<img {{bind-attr src = uposts.upropic}} class="img-circle" height="40" width="40">
<span id="posted">Posted by {{uposts.user}} {{format-date uposts.post_date}}</span>
<div class="social-buttons pull-right">
{{#link-to 'index' class="btn btn-default btn-xs"}}<span class="ion-arrow-left-b"></span>Back{{/link-to}}
<a href="#" {{action 'fbshare' uposts.datalink}} class="btn btn-primary btn-xs fbshare"><span class="ion-social-facebook"></span>Facebook</a>
<a href="#" {{action 'twshare' uposts.datalink}} class="btn btn-info btn-xs"><span class="ion-social-twitter"></span>Twitter</a>
</div>
</div>
<div id="bottom-contain">
{{#if voop}}
<div class="alert alert-warning alert-dismissible" role="alert">
<button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
<strong>Oh Snap</strong> You can't vote on your own posts
</div>
{{/if}}
{{#if islg}}
<div class="alert alert-info" role="alert"><strong><a href="/api/login.php" class="alert-link">Login</a></strong> With your Twitter account for vote on stories</div>
{{/if}}
<div id="linkbox" class="media">
{{#if uposts.isVoted}}
<a {{bind-attr linkid = uposts.datalink}} class="pull-left voteb" href="#" {{action 'voteup' uposts.datalink}}>
<i class="ion-chevron-down"></i>
<div id="votec">{{uposts.votecount}}</div>
</a>
{{else}}
<a {{bind-attr linkid = uposts.datalink}} class="pull-left voteb" href="#" {{action 'votedown' uposts.datalink}}>
<i class="ion-chevron-up"></i>
<div id="votec">{{uposts.votecount}}</div>
</a>
{{/if}}
<div id="linkbody" class="media-body col-md-offset-1">
<h4 class="media-heading"><a {{bind-attr href = uposts.post_url}} target="_blank" class="linkt">{{uposts.title}}</a> <small>{{format-url uposts.post_url}}</small></h4>
<p id="taglinetxt">{{uposts.tagline}}</p>
<a href="#" {{action 'report' uposts.datalink}}><span class="ion-ios7-flag pull-right" id="commetico"></span></a>
</div>
</div>
</div>
</div>
{{#each item in comment}}
<div id="bottom-contain">
<div class="media commentbox">
<a class="pull-left" href="#">
<img class="media-object img-circle" {{bind-attr src = item.propic}} alt="...">
</a>
<div class="media-body">
<h4 class="media-heading">{{item.user_name}}</h4>
{{item.comment}}
</div>
</div>
</div>
{{/each}}
{{#if ustat.user_status}}
<div id="bottom-contain">
<form class="form" {{action 'submit' uposts.datalink on='submit'}} role="form">
<div class="form-group">
{{textarea value=ncomment class="form-control commentarea" rows="3" required="true"}}
</div>
<button type="submit" class="btn btn-success"><span class="ion-ios7-compose"></span>Comment</button>
</form>
</div>
{{else}}
<div class="alert alert-info" role="alert"><strong><a href="/api/login.php" class="alert-link">Login</a></strong> With you Twitter account to comment on posts</div>
{{/if}}
</div>
</script>
<script type="text/x-handlebars" id="post/loading" data-template-name="index/loading">
<div class="loading-bar"></div>
</script>
<script type="text/x-handlebars" id="p/loading" data-template-name="loading">
<div class="loading-bar"></div>
<div class="col-md-8 col-md-offset-2">
<h3 id="title" class="pull-left">
<img src="/assets/fire.png">
Loading. Chillax.
</h3>
</div>
</script>
<script type="text/x-handlebars" data-template-name="login">
<div class="col-md-6 sidebarr pull-right rsidebar">
<div id="bottom-contain">
<h3>Login or Sign up</h3>
<p>Why login?</p>
<ul>
<li>You can submit stories</li>
<li>Vote up your favourite posts</li>
<li>You can comment on posts</li>
<li>Submit quality content and quality posts</li>
</ul>
<div>
<a href="/api/login.php" class="btn btn-info"><span class="ion-social-twitter"></span>Login With Your Twitter</a>
{{#link-to 'index' class="btn btn-default"}}Back{{/link-to}}
</div>
</div>
</div>
</script>
<script type="text/x-handlebars" data-template-name="about">
<div class="col-md-6 sidebarr pull-right rsidebar">
<div id="bottom-contain">
<h3>What is this?</h3>
<p>Well basically this is a news aggregator/forum created as an experiment, based on the popular HackerNews. And this is targetted more for the Sri Lankan community</p>
<ul>
<li>This is freshly made and it's highly unstable and buggy</li>
<li>If you find any bug let me know first</li>
<li>Subscribe for the newsletter</li>
<li>Send suggestions</li>
<li>Thigs may change rapidly as time goes by</li>
<li>I might post the code on Github although it's a mess ATM</li>
</ul>
<h3>How to submit stories?</h3>
<p>You can submit any good tech stories, products and events from Sri Lanka or anywhere in the world that will be important for Sri Lankans</p>
<p>Before you submit a story you will have to sign up using your Twitter account</p>
<P>Follow on Twitter <a href="http://twitter.com/picnicyco">@Picnicyco</a>, on Facebook <a href="http://facebook.com/picnicy">Picnicy</a></p>
<div>
<a href="/api/login.php" class="btn btn-info"><span class="ion-social-twitter"></span>Login With Your Twitter</a>
{{#link-to 'index' class="btn btn-default"}}Back{{/link-to}}
</div>
</div>
</div>
</script>
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-mockjax/1.5.3/jquery.mockjax.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
<script src="/assets/handlebars-v1.3.0.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/ember.js/1.7.0/ember.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.8.3/moment.min.js"></script>
<script src="/assets/app.js"></script>
</body>
</html>