-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
121 lines (97 loc) · 3.37 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
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="main.css">
<title>Framework Battle</title>
</head>
<body>
<main class="app">
<section class="main-wrapper" id="main_wrapper">
<div class="add-event">
<h2>Add New Event</h2>
<form class="add-new-form">
<div class="form-row">
<div class="event-title-wrapper">
<label>Event Title</label>
<input type="text" placeholder="Event Title" />
</div>
<div class="event-date-wrapper">
<label>Event Date</label>
<input type="text" placeholder="04/10/2020" />
</div>
</div>
<div class="form-row">
<button type="button" class="save-btn button">Save</button>
</div>
</form>
</div>
<div class="events-wrapper" id="events_wrapper">
<div class="upcoming-top">
<h2>Upcoming Events</h2>
<button class="add-new-btn button" id="add_new">Add New</button>
</div>
<section class="events-list">
<article class="event">
<div class="calendar">
<div class="month">APR</div>
<div class="day">12</div>
</div>
<div class="event-wrapper">
<h3 class="event-title">Making API calls using Axios</h3>
<div class="attendees">35 attendees <span class="attend-btn">Attend</span></div>
</div>
<div class="delete-event">
<span class="fa fa-trash-o"></span>
</div>
</article>
<article class="event">
<div class="calendar">
<div class="month">APR</div>
<div class="day">13</div>
</div>
<div class="event-wrapper">
<h3 class="event-title">Deploying JS to AWS</h3>
<div class="attendees">50 attendees <span class="attend-btn active">Attending</span></div>
</div>
<div class="delete-event">
<span class="fa fa-trash-o"></span>
</div>
</article>
<article class="event">
<div class="calendar">
<div class="month">MAY</div>
<div class="day">14</div>
</div>
<div class="event-wrapper">
<h3 class="event-title">Serverless in JS</h3>
<div class="attendees">56 attendees <span class="attend-btn">Attend</span></div>
</div>
<div class="delete-event">
<span class="fa fa-trash-o"></span>
</div>
</article>
</section>
</div>
</section>
</main>
</body>
<script>
let isAdding = false;
const addNewButton = document.getElementById('add_new');
const mainWrapper = document.getElementById('main_wrapper');
addNewButton.addEventListener('click', () => {
if(!isAdding) {
mainWrapper.classList.add('is-adding');
addNewButton.innerHTML = "Close"
isAdding = true;
} else {
mainWrapper.classList.remove('is-adding');
addNewButton.innerHTML = "Add New"
isAdding = false;
}
})
</script>
</html>