-
Notifications
You must be signed in to change notification settings - Fork 2k
/
index.html
88 lines (82 loc) · 2.65 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Guestbook - a serverless web application</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.6.0/css/bulma.min.css">
</head>
<body>
<section class="section">
<div class="container">
<h1 class="title is-1">
Guestbook
</h1>
<p class="subtitle">
A serverless web application
</p>
<div class="columns">
<div class="column">
<h3 class="title is-3">
Messages from past visitors
</h3>
<div id="entries"></div>
</div>
<div class="column">
<h3 class="title is-3">
Add your message
</h3>
<form id="addEntry">
<div class="field">
<label class="label">Name</label>
<div class="control">
<input class="input" type="text" placeholder="your name" id="name">
</div>
</div>
<div class="field">
<label class="label">Email</label>
<div class="control">
<input class="input" type="text" placeholder="your email" id="email">
</div>
</div>
<div class="field">
<label class="label">Comment</label>
<div class="control">
<textarea class="textarea" placeholder="your comment" id="comment"></textarea>
</div>
</div>
<div class="control">
<button class="button is-primary">Send your message</button>
</div>
</form>
</div>
</div>
</div>
</section>
<script id="entries-template" type="text/x-handlebars-template">
{{#each entries}}
<div class="box">
<article class="media">
<div class="media-left">
<figure class="image is-64x64">
<img src="{{icon}}" alt="No Image">
</figure>
</div>
<div class="media-content">
<div class="content">
<p>
<strong>{{name}}</strong> <small>{{email}}</small>
<br> {{comment}}
</p>
</div>
</div>
</article>
</div>
{{/each}}
</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/handlebars.js/4.0.10/handlebars.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="guestbook.js"></script>
</body>
</html>