├── groceries.png ├── mumblers_demo-webfont.woff ├── mumblers_demo-webfont.woff2 ├── stylesheet.css ├── generator_config.txt ├── script.js ├── index.html └── style.css /groceries.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/miguelznunez/Grocery-List/HEAD/groceries.png -------------------------------------------------------------------------------- /mumblers_demo-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/miguelznunez/Grocery-List/HEAD/mumblers_demo-webfont.woff -------------------------------------------------------------------------------- /mumblers_demo-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/miguelznunez/Grocery-List/HEAD/mumblers_demo-webfont.woff2 -------------------------------------------------------------------------------- /stylesheet.css: -------------------------------------------------------------------------------- 1 | /*! Generated by Font Squirrel (https://www.fontsquirrel.com) on March 26, 2021 */ 2 | 3 | 4 | 5 | @font-face { 6 | font-family: 'mumblers_demoregular'; 7 | src: url('mumblers_demo-webfont.woff2') format('woff2'), 8 | url('mumblers_demo-webfont.woff') format('woff'); 9 | font-weight: normal; 10 | font-style: normal; 11 | 12 | } -------------------------------------------------------------------------------- /generator_config.txt: -------------------------------------------------------------------------------- 1 | # Font Squirrel Font-face Generator Configuration File 2 | # Upload this file to the generator to recreate the settings 3 | # you used to create these fonts. 4 | 5 | {"mode":"optimal","formats":["woff","woff2"],"tt_instructor":"default","fix_gasp":"xy","fix_vertical_metrics":"Y","metrics_ascent":"","metrics_descent":"","metrics_linegap":"","add_spaces":"Y","add_hyphens":"Y","fallback":"none","fallback_custom":"100","options_subset":"basic","subset_custom":"","subset_custom_range":"","subset_ot_features_list":"","css_stylesheet":"stylesheet.css","filename_suffix":"-webfont","emsquare":"2048","spacing_adjustment":"0"} -------------------------------------------------------------------------------- /script.js: -------------------------------------------------------------------------------- 1 | document.querySelector("#eraser").addEventListener("click", () => { 2 | document.querySelector("#groceryItems").textContent = ""; 3 | }) 4 | 5 | document.querySelector("#userInput").addEventListener("keydown", (event) => { 6 | if(event.key == "Enter") 7 | addItem(); 8 | }); 9 | 10 | addItem = () => { 11 | const item = document.createElement("h2") 12 | item.textContent = "- " + document.querySelector("#userInput").value; 13 | 14 | item.addEventListener("click", () => { 15 | if(item.style.textDecoration != "line-through") 16 | item.style.textDecoration = "line-through"; 17 | else 18 | item.style.textDecoration = "none"; 19 | }) 20 | 21 | document.querySelector("#groceryItems").appendChild(item); 22 | document.querySelector("#userInput").value = ""; 23 | } 24 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | 7 | 8 | 9 | 10 |