forked from bdpiprava/node-bulletin-board
-
Notifications
You must be signed in to change notification settings - Fork 30
/
index.html
75 lines (69 loc) · 2.41 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Bulletin Board</title>
<link rel="stylesheet" href="node_modules/bootstrap/dist/css/bootstrap.min.css">
<link rel="stylesheet" href="site.css">
<style>
.form-control {
margin-bottom: 10px;
}
.btn-danger {
margin-top: 8px;
}
</style>
</head>
<body style="background: #fafafa;">
<nav class="navbar navbar-inverse navbar-fixed-top">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="#">Bulletin Board</a>
</div>
</div>
</nav>
<div class="sub-nav">
<button type="button" class="btn btn-info" data-toggle="modal" data-target="#add-event-modal">Add event</button>
</div>
<div class="container-fluid" id="events" style="margin-top: 110px;">
<div class="row">
<div class="panel panel-default list" v-for="event in events">
<div class="panel-heading">{{ event.title }}</div>
<div class="panel-body">
<p class="list-group-item-text" v-if="event.detail">{{ event.detail }}</p>
</div>
<div class="panel-footer">
<div style="float: right"><i class="glyphicon glyphicon-calendar" v-if="event.date"></i> {{
event.date }}
</div>
<button class="btn btn-xs btn-danger" v-on:click="deleteEvent(event.id)">Delete</button>
</div>
</div>
</div>
<div id="add-event-modal" class="modal fade" role="dialog">
<div class="modal-dialog" style="width: 80%;">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title">Add an event</h4>
</div>
<div class="modal-body">
<input class="form-control" placeholder="Title" v-model="event.title"/>
<textarea class="form-control" placeholder="Detail" v-model="event.detail" rows="7"></textarea>
<input type="date" class="form-control" placeholder="Date" v-model="event.date"/>
</div>
<div class="modal-footer">
<button class="btn btn-primary" v-on:click="addEvent">Add</button>
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
</div>
</body>
<script src="node_modules/vue/dist/vue.min.js"></script>
<script src="node_modules/vue-resource/dist/vue-resource.min.js"></script>
<script src="node_modules/jquery/dist/jquery.min.js"></script>
<script src="node_modules/bootstrap/dist/js/bootstrap.min.js"></script>
<script src="app.js"></script>
</html>