├── README.md
├── app.js
├── index.html
├── preview.png
└── style.css
/README.md:
--------------------------------------------------------------------------------
1 | # Note Taking App
2 |
3 | A minimal note application using Vanilla JavaScript.
4 |
5 | [View online demo](http://luciagm.net/note-app/)
6 |
7 | [](http://luciagm.net/note-app/)
8 |
9 | ### To be improved
10 | - Persistent notes saved in local storage
11 | - Form style
12 | - Form inside a note
13 |
14 |
15 | ## License
16 | MIT License
17 |
18 | Copyright (c) 2018 Lucia Gonzalez Moscoso
19 |
20 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
21 |
22 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
23 |
24 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
--------------------------------------------------------------------------------
/app.js:
--------------------------------------------------------------------------------
1 | // Form reference
2 | const form = {}
3 | form.noteText = document.querySelector('#formNoteText');
4 | form.addButton = document.querySelector('#formAddButton');
5 | form.color = document.querySelector('#formColor');
6 |
7 | const notes = document.querySelector('#notes');
8 |
9 | form.noteText.focus();
10 |
11 | // Functions
12 | function addNote() {
13 | let text = form.noteText.value;
14 | let note = document.createElement('div');
15 | let deleteButton = document.createElement('span');
16 |
17 | note.classList.add('note');
18 | note.classList.add(form.color.value);
19 | note.innerHTML = `