forked from petele/WebApp-CodeLab
/
index.html
executable file
·198 lines (181 loc) · 8.2 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
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
<!doctype html>
<!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ -->
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" lang="en"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9" lang="en"> <![endif]-->
<!-- Consider adding a manifest.appcache: h5bp.com/d/Offline -->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" manifest="wreader.appcache"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<!-- Use the .htaccess and remove these lines to avoid edge case issues.
More info: h5bp.com/i/378 -->
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>wReader</title>
<meta name="description" content="">
<!-- Mobile viewport optimized: h5bp.com/viewport -->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<!-- Place favicon.ico and apple-touch-icon.png in the root directory: mathiasbynens.be/notes/touch-icons -->
<!-- Exercise 12.3b -->
<link rel="stylesheet" href="css/bootstrap.css">
<link rel="stylesheet" href="css/style.css">
<!-- More ideas for your <head> here: h5bp.com/d/head-Tips -->
<!-- All JavaScript at the bottom, except this Modernizr build.
Modernizr enables HTML5 elements & feature detects for optimal performance.
Create your own custom Modernizr build: www.modernizr.com/download/ -->
<script src="js/libs/modernizr-2.5.3.min.js"></script>
</head>
<body>
<!-- Prompt IE 6 users to install Chrome Frame. Remove this if you support IE 6.
chromium.org/developers/how-tos/chrome-frame-getting-started -->
<!--[if lt IE 7]><p class=chromeframe>Your browser is <em>ancient!</em> <a href="http://browsehappy.com/">Upgrade to a different browser</a> or <a href="http://www.google.com/chromeframe/?redirect=true">install Google Chrome Frame</a> to experience this site.</p><![endif]-->
<header>
<script type="text/x-handlebars">
{{#view WReader.NavBarView}}
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="brand" {{action "showAbout" on="click"}}>
wReader
</a>
<ul class="nav">
<li class="divider-vertical"></li>
<li class="itemCount"><a {{action "showAll" on="click"}}>{{itemCount}} Items</a></li>
<li class="divider-vertical"></li>
<li class="itemCount"><a {{action "showUnread" on="click"}}>{{unreadCount}} Unread</a></li>
<li class="divider-vertical"></li>
<li class="itemCount"><a {{action "showStarred" on="click"}}>{{starredCount}} Starred</a></li>
<li class="divider-vertical"></li>
<li class="itemCount"><a {{action "showRead" on="click"}}>{{readCount}} Read</a></li>
<li class="divider-vertical"></li>
</ul>
<form class="navbar-search pull-left" id="navSearch">
<input type="text" class="search-query" placeholder="Search">
</form>
<ul class="nav pull-right">
<li><a {{action "refresh" on="click"}}><i class="icon-refresh spin icon-white"></i></a></li>
</ul>
</div>
</div>
</div>
{{/view}}
</script>
</header>
<section class="mainContent">
<script type="text/x-handlebars">
{{#view WReader.NavControlsView}}
<div class="tControls">
<div class="top">
<button {{action "markAllRead"}} class='btn'><i class="icon-ok"></i></button>
</div>
<div class="middle">
<button {{action "navUp"}} class='btn'><i class="icon-arrow-up"></i></button>
<button {{action "toggleStar"}} {{bindAttr disabled="buttonDisabled"}} class='btn'>
<i {{bindAttr class="starClass"}}></i>
</button>
<button {{action "toggleRead"}} {{bindAttr disabled="buttonDisabled"}} class='btn'>
<i {{bindAttr class="readClass"}}></i>
</button>
<button {{action "navDown"}} class='btn'><i class="icon-arrow-down"></i></button>
</div>
<div class="bottom">
<button {{action "refresh"}} class='btn'><i class="icon-refresh spin"></i></button>
</div>
</div>
{{/view}}
</script>
<section class="summaries">
<script type="text/x-handlebars">
{{#each WReader.itemsController}}
{{#view WReader.SummaryListView contentBinding="this"}}
<div class="row-fluid">
<div class="span6 pub-name">
{{content.pub_name}}
</div>
<div class="span6 pub-date">
{{formattedDate}}
</div>
</div>
<h3 class="pub-title">{{content.title}}</h3>
{{/view}}
{{/each}}
</script>
</section>
<section class="entries">
<script type="text/x-handlebars">
{{#if WReader.selectedItemController.selectedItem}}
{{#view WReader.EntryItemView}}
<div class="row-fluid">
<div class="span8">{{formattedDate}}</div>
<div class="span4 actions">
<button type="button" {{bindAttr class="readButtonClass"}} {{action "toggleRead"}}>
<i {{bindAttr class="readClass"}} class="icon-white"></i>
</button>
<button type="button" {{bindAttr class="starButtonClass"}} {{action "toggleStar"}}>
<i {{bindAttr class="starClass"}}></i>
</button>
<a target="_blank" {{bindAttr href="content.item_link"}} class="btn"><i class="icon-share"></i></a>
</div>
</div>
<h2>{{content.title}}</h2>
<span class="author">{{content.pub_author}}</span> - <span class="pub-name">{{content.pub_name}}</span>
<hr />
<p class="post-content">{{{content.content}}}</p>
{{/view}}
{{else}}
<div class="nothingSelected">
<img src="img/sadpanda.png" alt="Sad Panda">
<p>Nothing selected.</p>
</div>
{{/if}}
</script>
</section>
</section>
<div class="modal fade" id="modalAbout">
<div class="modal-header">
<a class="close" data-dismiss="modal">×</a>
<h3>About wReader</h3>
</div>
<div class="modal-body">
<p>One fine body…</p>
</div>
<div class="modal-footer">
<a data-dismiss="modal" class="btn btn-primary">Close</a>
</div>
</div>
<div class="modal fade" id="modalUpdate">
<div class="modal-header">
<a class="close" data-dismiss="modal">×</a>
<h3>Update Application</h3>
</div>
<div class="modal-body">
<p>A new version of WReader is available, would you like to upgrade now?</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" onclick="WReader.swapCache(true);">Yes</button>
<button type="button" class="btn" onclick="WReader.swapCache(false);">Later</button>
</div>
</div>
<!-- JavaScript at the bottom for fast page loading -->
<!-- Grab Google CDN's jQuery, with a protocol relative URL; fall back to local if offline -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="js/libs/jquery-1.7.1.min.js"><\/script>')</script>
<!-- scripts concatenated and minified via build script -->
<!-- Exercise 12.3c -->
<script src="js/dev-helper.js"></script>
<script src="js/libs/bootstrap.js"></script>
<script src="js/libs/lawnchair-0.6.1.js"></script>
<script src="js/libs/lawnchair-adapter-indexed-db-0.6.1.js"></script>
<script src="js/libs/moment-1.5.0.js"></script>
<script src="js/libs/ember-0.9.5.js"></script>
<script src="js/plugins.js"></script>
<script src="js/app.js"></script>
<!-- end scripts -->
<script>
var _gaq=[['_setAccount','UA-29459980-1'],['_trackPageview']];
(function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];
g.src=('https:'==location.protocol?'//ssl':'//www')+'.google-analytics.com/ga.js';
s.parentNode.insertBefore(g,s)}(document,'script'));
</script>
</body>
</html>