-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
26 lines (22 loc) · 1.03 KB
/
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
import { CodeEditor } from "./assets/scripts/code-editor.js";
import { openCloseSearchField } from "./assets/scripts/open-close-search.js";
import { openCloseMenu, disableMenuLinkHome } from './assets/scripts/open-close-menu.js';
import { CodeData } from './assets/scripts/create-project.js'
const menuIcons = document.querySelectorAll('.menu__toggle')
const menuLinkHome = document.querySelector('.menu__item')
const searchIcons = document.querySelectorAll('.search__toggle')
const selectColor = document.querySelector('.personalization__color')
selectColor.addEventListener('change', () => {
CodeEditor.changeBorderColor(color.value)
})
menuIcons.forEach(openCloseMenu)
searchIcons.forEach(openCloseSearchField)
menuLinkHome.addEventListener('click', disableMenuLinkHome)
CodeData.projectForm.addEventListener('submit', (event) => {
event.preventDefault();
CodeData.verifyLogin();
CodeData.verifyEmptyCodeField();
CodeData.saveOnLocalStorage();
CodeData.showSucessMessage();
CodeData.clearProjectFields();
})