diff --git a/to-do_list/LICENSE b/to-do_list/LICENSE new file mode 100644 index 0000000..0d841df --- /dev/null +++ b/to-do_list/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 Darshit + +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: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +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. diff --git a/to-do_list/README.md b/to-do_list/README.md new file mode 100644 index 0000000..661762f --- /dev/null +++ b/to-do_list/README.md @@ -0,0 +1 @@ +# to-do_list- \ No newline at end of file diff --git a/to-do_list/index.html b/to-do_list/index.html new file mode 100644 index 0000000..3d36cfd --- /dev/null +++ b/to-do_list/index.html @@ -0,0 +1,25 @@ + + + + To do list + + + +
+
+ +
+
+ +
+
+
+
+
+ +
+
+ + + diff --git a/to-do_list/script.js b/to-do_list/script.js new file mode 100644 index 0000000..4a8823b --- /dev/null +++ b/to-do_list/script.js @@ -0,0 +1,51 @@ +document.getElementById("Addbtn").addEventListener("click",function(){ + var task=document.getElementById("todo").value; + if(task=="" || task==null) + { + alert("First, Enter some task"); + } + else{ + var old= document.getElementById("list").innerHTML; + var newrecord =` +
  • + + + +
    + +
    + + + + + + +
    + ${task} + + +
    + +
    + +
    +
  • + `; + document.getElementById("list").innerHTML=old+newrecord; + document.getElementById("todo").value=""; +} +}); + +function ongoing(target){ + target.parentElement.parentElement.parentElement.style=`background-color:orange;color:white`; +} + +function completed(target){ + target.parentElement.parentElement.parentElement.style=`background-color:green;color:white;`; + + +} + +function remove(target){ + target.parentElement.parentElement.parentElement.remove(); +} \ No newline at end of file diff --git a/to-do_list/style.css b/to-do_list/style.css new file mode 100644 index 0000000..61cc786 --- /dev/null +++ b/to-do_list/style.css @@ -0,0 +1,57 @@ +table{ + border: 3px solid skyblue; + width:100%; +} + + + +hr{ + height: 10px; + background-color: blue; +} + +ul{ + list-style: none; + list-style-type: none; +} + +.text{ + color: rgb(72, 63, 205); + font-size: 35px; + height: 50px; +} + +#Addbtn{ + height: 50px; + color: white; + background-color: darkcyan; +} + +#ongoing{ + height:30px; + color :white; + background-color: peru; + width: 250px; + font-size: 20px; +} + +#completed{ + height:30px; + color: white; + font-size: 20px; + background-color:goldenrod; + width: 250px; +} + +#remove{ + height:30px; + font-size: 20px; + color: white; + background-color: red; + width: 250px; +} + +#td{ + font-size: 50px; + width: 1050px; +} \ No newline at end of file