-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsiteace.html
138 lines (126 loc) · 3.52 KB
/
siteace.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
<head>
<title>siteace</title>
</head>
<body>
<!-- navbar - you will be putting the login functions here -->
<nav class="navbar navbar-default">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="/">
Site Ace
</a>
</div>
<div class="navbar-right">
<ul class="nav navbar-nav">
<li>
<a>
{{> loginButtons align="right"}}
</a>
</li>
</ul>
</div>
</div>
</nav>
</body>
<template name="main-page">
<div class="container">
{{#if isLogged}}
{{> website_form}}
{{/if}}
{{> website_list}}
</div>
</template>
<template name="website_form">
<a class="btn btn-default js-toggle-website-form" href="#">
<span class="glyphicon glyphicon-plus" aria-hidden="true"></span>
</a>
<div id="website_form" class="hidden_div">
<form class="js-save-website-form">
<div class="form-group">
<label for="url">Site address</label>
<input type="text" class="form-control" id="url"
placeholder="http://www.mysite.com" required>
</div>
<div class="form-group">
<label for="title">Title</label>
<input type="text" class="form-control" id="title" placeholder="Mysite">
</div>
<div class="form-group">
<label for="description">Description</label>
<input type="text" class="form-control" id="description"
placeholder="I found this site really useful for ..." required>
</div>
<button type="submit" class="btn btn-default">Submit</button>
</form>
</div>
</template>
<!-- template that displays several website items -->
<template name="website_list">
<div class="searchBox">
<label>Search: </label>
{{> EasySearch.Input index=searchWords }}
</div>
<ol>
{{#EasySearch.Each index=searchWords}}
{{>website_item}}
{{/EasySearch.Each}}
</ol>
</template>
<!-- template that displays individual website entries -->
<template name="website_item">
<li>
<a href="/site/{{_id}}">{{title}}</a>
<p>
{{description}}
</p>
<a href="#" class="btn btn-default js-upvote">
<span class="glyphicon glyphicon-arrow-up" aria-hidden="true"></span>
</a>
<a href="#" class="btn btn-default js-downvote">
<span class="glyphicon glyphicon-arrow-down" aria-hidden="true"></span>
</a>
<span class="rating-field">
{{rating}}
</span>
<p>Added: {{date}}</p>
<!-- you will be putting your up and down vote buttons in here! -->
</li>
</template>
<template name="page-details">
<div class="container">
<div class="jumbotron text-center">
<h1><a href="{{url}}" target="_blank">{{title}}</a></h1>
<p>{{description}}</p>
</div>
<p>Added: {{date}}</p>
<p>Rating: {{rating}}</p>
<h3>Comments:</h3>
{{#if isLogged}}
{{> comment_form}}
{{/if}}
{{> comment_list}}
</div>
</template>
<template name="comment_form">
<a class="btn btn-default js-toggle-comment-form" href="#">
<span class="glyphicon glyphicon-plus" aria-hidden="true"></span>
</a>
<div id="comment-form" class="hidden_div">
<form class="js-save-comment-form">
<div class="form-group">
<label for="url">Comment:</label>
<input type="textarea" class="form-control" id="comment"
placeholder="What do you think about this site?" required>
</div>
<button type="submit" class="btn btn-default">Submit</button>
</form>
</div>
</template>
<template name="comment_list">
{{#each comments}}
<blockquote>
<p>{{comment}}</p>
<footer>{{username}}</footer>
</blockquote>
{{/each}}
</template>