-
Notifications
You must be signed in to change notification settings - Fork 0
/
rateIt.html
128 lines (106 loc) · 3.74 KB
/
rateIt.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
<head>
<title>rateIt</title>
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
</head>
<body>
{{> nav}}
{{> ideas}}
{{> modal}}
</body>
<template name="nav">
<nav class="navbar navbar-default collapsed" role="navigation">
<div class="container-fluid">
<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>
<div class='navbar-left brand'>
<a class="navbar-brand" href="#">RateIt</a>
</div>
<div class='navbar-right pull-right login'> {{> loginButtons align="right" }}
</div>
</div>
</div>
</nav>
</template>
<template name="ideas">
<div class="container-fluid">
<div class="row">
<div class="form-inline col-md-4 col-md-offset-1">
You have {{voteCount}} votes remaining.
</div>
<div class="form-inline col-md-4 col-md-offset-8">
<input name='searchFilter' class='filter' type="text" placeholder="type filter here">
</div>
</div>
<table class="ideas">
<tr>
<th>Vote Up</th>
<th>Votes</th>
<th>Name</th>
<th>Description</th>
<th>Created Date</th>
<th>Vote Down</th>
<th>
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#addIdeaModal">New Idea?</button>
</th>
</tr>
{{#each ideas}}
{{> idea}}
{{else}}
<tr>
<td>
<div class="panel panel-info">
<div class="panel-heading">Nothing to rate.</div>
<div class="panel-body">
Add an idea.
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#addIdeaModal">New Idea?</button>
</div>
</div>
</td>
</tr>
{{/each}}
</table>
</div>
</template>
<template name="idea">
<tr>
<td><a class='btn vote up'><i class="fa fa-3x fa-chevron-up"></i></a></td>
<td>{{votes}}</td>
<td>{{name}}</td>
<td>{{description}}</td>
<td>{{createdAt}}</td>
<td><a class='btn vote down'><i class="fa fa-3x fa-chevron-down"></i></a></td>
</tr>
</template>
<template name="modal">
<div class="modal fade" id="addIdeaModal" tabindex="-1" role="dialog" aria-labelledby="add Idea" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
<h4 class="modal-title" id="exampleModalLabel">New Idea</h4>
</div>
<div class="modal-body">
<form role="form">
<div class="form-group">
<label for="recipient-name" class="control-label">Name:</label>
<input type="text" class="form-control name" placeholder="Name the idea">
</div>
<div class="form-group">
<label for="message-text" class="control-label">Description:</label>
<textarea class="form-control description" placeholder="Describe the idea"></textarea>
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary addIdea">Add</button>
</div>
</div>
</div>
</div>
</template>