-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
91 lines (81 loc) · 2.75 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
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>Ember Reddit Example</title>
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/emberreddit.css">
</head>
<body>
<script type='text/x-handlebars' data-template-name="application">
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
{{#linkTo 'index' class="brand"}}emberreddit{{/linkTo}}
<div class="nav-collapse collapse" id="main-menu">
<ul class="nav" id="main-menu-left">
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">subreddits <b class="caret"></b></a>
<ul class="dropdown-menu" id="swatch-menu">
{{#each subreddit in subreddits}}
<li>{{#linkTo 'subreddit' subreddit}}{{subreddit.title}}{{/linkTo}}</li>
{{/each}}
</ul>
</li>
</ul>
</div>
</div>
</div>
</div>
<div class="container">
{{outlet}}
</div>
</script>
<script type="text/x-handlebars" data-template-name="subreddit">
<h2 class='subreddit'>{{title}}</h2>
{{outlet}}
<section class='reddit-links'>
{{#each link in links}}
<div class='row reddit-link'>
{{#if link.thumbnailUrl}}
<div class="span1">
{{#linkTo 'link' link}}<img {{bindAttr src="link.thumbnailUrl"}}>{{/linkTo}}
</div>
{{/if}}
<div class="span7">
{{#linkTo 'link' link}}{{link.title}}{{/linkTo}}
<span class='domain'>({{link.domain}})</span>
</div>
</div>
{{/each}}
</section>
</script>
<script type="text/x-handlebars" data-template-name="link">
<div class='link-view'>
{{#linkTo 'subreddit' model.subreddit class="close"}}close{{/linkTo}}
<h1>{{title}}</h1>
{{#if image}}
<center><img {{bindAttr src="imageUrl"}}></center>
{{else}}
{{#if embed}}
{{{embed}}}
{{/if}}
{{/if}}
</div>
</script>
<script src="js/libs/jquery-1.9.1.js"></script>
<script src="js/libs/handlebars-1.0.0-rc.4.js"></script>
<script src="js/libs/ember-1.0.0-rc.6.js"></script>
<script src="js/libs/bootstrap.min.js"></script>
<script src="js/app.js"></script>
<script src="js/router.js"></script>
<script src="js/models/subreddits.js"></script>
<script src="js/models/link.js"></script>
<script src="js/views/app.js"></script>
</body>
</html>