| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 6e0ac08 commit 9a8131c
3 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -33,3 +33,13 @@ addForm.addEventListener('submit', function(e){ | |||
| 33 | 33 | li.appendChild(deleteBtn); | |
| 34 | 34 | list.appendChild(li); | |
| 35 | 35 | }); | |
| 36 | + | ||
| 37 | + // hide books | ||
| 38 | + const hideBox = document.querySelector('#hide'); | ||
| 39 | + hideBox.addEventListener('change', function(e){ | ||
| 40 | + if(hideBox.checked){ | ||
| 41 | + list.style.display = "none"; | ||
| 42 | + } else { | ||
| 43 | + list.style.display = "initial"; | ||
| 44 | + } | ||
| 45 | + }); | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -38,10 +38,11 @@ <h2 class="title">Books to Read</h2> | |||
| 38 | 38 | </ul> | |
| 39 | 39 | </div> | |
| 40 | 40 | <form id="add-book"> | |
| 41 | + <input type="checkbox" id="hide" /> | ||
| 42 | + <label for="hide">Hide all books</label> | ||
| 41 | 43 | <input type="text" placeholder="Add a book..." /> | |
| 42 | 44 | <button>Add</button> | |
| 43 | 45 | </form> | |
| 44 | - | ||
| 45 | 46 | </div> | |
| 46 | 47 | <script src="app.js"></script> | |
| 47 | 48 | </body> | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -91,6 +91,7 @@ h1, h2{ | |||
| 91 | 91 | box-sizing: border-box; | |
| 92 | 92 | width: 300px; | |
| 93 | 93 | float: left; | |
| 94 | + clear: both; | ||
| 94 | 95 | } | |
| 95 | 96 | ||
| 96 | 97 | #add-book button{ | |
@@ -115,6 +116,14 @@ h1, h2{ | |||
| 115 | 116 | clear: both; | |
| 116 | 117 | } | |
| 117 | 118 | ||
| 119 | + #add-book #hide{ | ||
| 120 | + width: 30px; | ||
| 121 | + } | ||
| 122 | + | ||
| 123 | + #add-book label{ | ||
| 124 | + line-height: 52px; | ||
| 125 | + } | ||
| 126 | + | ||
| 118 | 127 | /* | |
| 119 | 128 | #tabbed-content li{ | |
| 120 | 129 | display: inline-block; | |
| Back | FazBrowse Home | New Git URL |
0 commit comments