-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgiftList.html
More file actions
130 lines (110 loc) · 3.25 KB
/
giftList.html
File metadata and controls
130 lines (110 loc) · 3.25 KB
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
<head>
<title>giftList</title>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.2/css/bootstrap.min.css">
<!-- Optional theme -->
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.2/css/bootstrap-theme.min.css">
<!-- Latest compiled and minified JavaScript -->
<script src="//netdna.bootstrapcdn.com/bootstrap/3.0.2/js/bootstrap.min.js"></script>
</head>
<body>
{{> header}}
{{> main}}
</body>
<template name="header">
<div>
<div class="topLeft">
Icon
</div>
<div class="topLeft">
Didn't work with bootstrap...
</div>
<div class="topRight">
{{loginButtons align="right"}}
</div>
<div class="clear"/>
</div>
</template>
<template name="main">
<div class="container">
{{#unless currentUser}}
{{> welcome}}
{{/unless}}
{{#if currentUser}}
{{> lists}}
{{/if}}
</div>
</template>
<template name="welcome">
<h1>Welcome to GiftList</h1>
<p>bla bla bla</p>
<p>Sign Up</p>
</template>
<template name="lists">
<h1>Lists</h1>
<h2>Your Lists</h2>
{{#each userLists}}
<a class='list' href="#">{{name}}</a>
<!-- we're going to need some clicking behavior, but for now just see if we can print it out -->
{{> list}}
{{> addItem}}
{{/each}}
<h2>Others' Lists</h2>
{{#each othersLists}}
<a class='list' href="#">{{name}}</a>
{{> list}}
{{/each}}
</template>
<template name="list">
{{#each items}}
{{> item}}
{{/each}}
</template>
<template name="item">
<div class="item">
{{#unless editing this._id}}
<div class="title">{{title}}</div>
<div class="description">{{description}}</div>
<a href="#" class="edit btn btn-sm-link">Edit</a>
{{/unless}}
{{#if isLoggedInUser}}
{{#if editing this._id}}
<input class="editItemTitle form-control" value="{{title}}"/>
<textarea class="editItemDescription form-control" placeholder"description">{{description}}</textarea>
<a href="#" class="saveItem btn btn-sm btn-primary">Save</a>
{{/if}}
{{/if}}
{{#unless isLoggedInUser}}
{{#each purchasers}}
<div>{{purchaser}}</div>
{{/each}}
{{#each comments}}
{{> comment}}
{{/each}}
{{> addComment}}
<!-- somehow we have to gray this out to show it's purchased if the logged in person isn't the list owner-->
{{/unless}}
</div>
</template>
<template name="addItem">
<h4>Add</h4>
<form id="addItem" >
<label class="formGroup" for="inputTitle">
<input type="text" name="inputTitle" id="inputTitle" class="form-control" placeholder="title"/>
<textarea type="text" name="inputDescription" id="inputDescription" class="form-control" placeholder="decription"/>
</label>
<input type="button" class="btn btn-primary" value="Add"/>
</form>
</template>
<template name="comment">
<p>{{text}} by {{commenter}}</p>
</template>
<template name="addComment">
<form id="addComment">
<input name="commentText" id="commentText" class="form-control" placeholder="Have something to say? Type it here."/>
<input type="button" value="Add" class="btn btn-primary">
</form>
</template>
<template name="purchaser">
<p>{{purchaser}}</p>
</template>