-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
37 lines (30 loc) · 888 Bytes
/
index.js
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
import Store from './modules/storage.js';
import UI from './modules/new-book.js';
import Book from './modules/list.js';
import timeDate from './modules/Date&Time.js';
const addNew = document.getElementById('new');
const contact = document.getElementById('contact');
const bookDetails = document.querySelector('.list');
const newBook = document.querySelector('.add-new');
const reachout = document.querySelector('.contact');
addNew.addEventListener('click', (e) => {
e.preventDefault();
newBook.style.display = 'flex';
bookDetails.style.display = 'none';
reachout.style.display = 'none';
});
contact.addEventListener('click', (e) => {
e.preventDefault();
reachout.style.display = 'flex';
newBook.style.display = 'none';
bookDetails.style.display = 'none';
});
// date
timeDate();
setInterval(timeDate, 1000);
// Booklist
Book();
// Display
UI();
// Storage
Store();