forked from cheeaun/hackerweb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
156 lines (156 loc) · 5.11 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
<!DOCTYPE html>
<html manifest="manifest.appcache">
<head>
<meta charset="utf-8">
<title>Hacker News</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0">
<link rel="stylesheet" href="hn.css">
<link rel="shortcut icon" href="icons/favicon.png">
<link rel="apple-touch-icon-precomposed" href="icons/touch-icon.png">
<script>
if (location.hostname == 'cheeaun.github.com'){
var _gaq = [['_setAccount', 'UA-23235796-3'], ['_trackPageview']];
(function(d, t){
var g = d.createElement(t), s = d.getElementsByTagName(t)[0];
g.src = ('https:' == d.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
s.parentNode.insertBefore(g, s);
}(document, 'script'));
var Muscula = {
settings: {
logId: 'NDkd1WB-dkALH'
}
};
(function(d, t){
var m = d.createElement(t), s = d.getElementsByTagName(t)[0];
m.src = (d.location.protocol == 'https:' ? 'https:' : 'http:') + '//musculahq.appspot.com/Muscula.js';
s.parentNode.insertBefore(m, s);
Muscula.run = function(s){ eval(s); Muscula.run = function(){}; };
})(document, 'script');
}
</script>
</head>
<body>
<header class="fake"></header>
<div class="view hidden" id="view-home">
<header>
<a href="#/about" class="header-button header-button-left"><button>About</button></a>
<h1 style="padding: 0 65px;">Hacker News</h1>
<a class="header-button header-button-icon header-button-right" id="view-home-refresh"><button><img src="images/refresh-icon.png" alt="Refresh" width="14" height="18"></button></a>
</header>
<div class="scroll">
<section>
<ul class="tableview tableview-links" id="hnlist">
</ul>
</section>
<div class="loader">Loading…</div>
</div>
</div>
<div class="view hidden" id="view-comments">
<header>
<a href="#/" class="header-button header-button-left header-back-button"><button>News</button></a>
<h1 style="padding: 0 65px;"></h1>
</header>
<div class="scroll striped">
<section>
</section>
<div class="loader">Loading…</div>
</div>
</div>
<div class="view hidden" id="view-about">
<header>
<a href="#/" class="header-button header-button-left"><button>Close</button></a>
<h1>About</h1>
</header>
<div class="scroll striped">
<section>
<div class="grouped-tableview cf">
<span id="y-touch-icon"></span>
<p>The Hacker News mobile web app, primarily optimized for iOS 5. Feel free to fork the project or send me feedback.</p>
</div>
<ul class="grouped-tableview grouped-tableview-links">
<li><a href="http://news.ycombinator.com/" target="_blank" class="disclosure">Hacker News official site</a></li>
<li><a href="https://github.com/cheeaun/hnmobile" target="_blank" class="disclosure">GitHub Project</a></li>
<li><a href="https://twitter.com/cheeaun" target="_blank" class="disclosure">@cheeaun</a></li>
</ul>
<p class="foot-label">Built by Lim Chee Aun.<br>Not affiliated with Hacker News or YCombinator.</p>
</section>
</div>
</div>
<script type="text/html" id="post-tmpl">
<li id="story-{{id}}" class="post-{{type}}">
<a href="{{url}}" {{#disclosure}}class="pad-right{{/disclosure}}">
<div class="number">{{i}}.</div>
<div class="story">
<b>{{{title}}}</b>
{{#user}}
<span class="metadata">
{{#domain}}<span class="link-text">{{domain}}</span><br>{{/domain}}
<span class="inline-block">{{points}} points by {{user}}</span>
<span class="inline-block">{{time_ago}}{{#comments_count}} · {{comments_count}} comments{{/comments_count}}</span>
</span>
{{/user}}
{{^user}}
<span class="metadata">
<span class="inline-block">{{time_ago}}</span>
</span>
{{/user}}
</div>
</a>
{{#disclosure}}
<a href="#/item/{{id}}" class="detail-disclosure"><span></span></a>
{{/disclosure}}
</li>
</script>
<script type="text/html" id="post-comments-tmpl">
<div class="post-content">
<header>
<h1>
<a href="{{url}}" target="_blank">{{{title}}}<br>
{{#user}}
{{#domain}}<span class="link-text">{{domain}}</span>{{/domain}}
{{/user}}
</a>
</h1>
<p class="metadata">
{{#user}}
<span class="inline-block">{{points}} points by {{user}}</span>
<span class="inline-block">{{time_ago}}{{#comments_count}} · {{comments_count}} comments{{/comments_count}}</span>
{{/user}}
{{^user}}
<span class="inline-block">{{time_ago}}</span>
{{/user}}
</p>
</header>
{{#content}}
<section class="grouped-tableview">{{{content}}}</section>
{{/content}}
</div>
<section class="comments">
{{#has_comments}}
<ul>
{{>comments_list}}
</ul>
{{/has_comments}}
{{^has_comments}}
<p class="no-comments">No comments.</p>
{{/has_comments}}
</section>
</script>
<script type="text/html" id="comments-tmpl">
{{#comments}}
<li>
<p class="metadata"><b>{{user}}</b> <time>{{time_ago}}</time></p>
<p>{{{content}}}
<ul>
{{>comments_list}}
</ul>
</li>
{{/comments}}
</script>
<script type="text/html" id="comments-toggle-tmpl">
<button class="comments-toggle">{{comments_count}} replies</button>
</script>
<script src="scripts.js"></script>
<script src="hn.js"></script>
</body>
</html>