Skip to content

Commit

Permalink
"some modifications and file have been changed"
Browse files Browse the repository at this point in the history
  • Loading branch information
Shyam1806 committed Nov 21, 2023
1 parent 71ec996 commit aeb8e5b
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 58 deletions.
11 changes: 9 additions & 2 deletions css/style1.css
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,12 @@ text-align: center;
top:59px;
left:19px;
}
.firstpart{
display: flex;
justify-content: center;
}
.firstpart>input{
margin: 0 auto;
/* margin: 10px auto; */
background-color: #96ced1;
border: 1px solid #ce96d1;
padding: 10px 139px;
Expand All @@ -250,12 +254,15 @@ text-align: center;
}
.today{
background-color: #bf28da;
margin: 0 auto;
margin: 10px auto;
width:50%;
padding:10px 0px;
box-shadow : 5px 5px 15px -5px rgba(0, 0, 0, 0.3);
margin-top:40px;
}
.firstpart>button{
font-size: 20px;
}
.today>h1{
text-align: center;
color:#fff;
Expand Down
60 changes: 4 additions & 56 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ <h1>Today </h1>
<section class="firstpart">
<input type="text" id="ip1" placeholder="Enter Your Task">
<button type="button" onclick="first()" id="clik" class="add">
<i class="fa fa-plus" aria-hidden="true"></i>

<!-- <i class="fa fa-plus" aria-hidden="true"></i> -->
Submit
</button>

</section>
Expand Down Expand Up @@ -49,65 +49,13 @@ <h1>Today </h1>
</section>
</div>
<div class="footer">
<h3>Design And Developed by Shyam </h3>
<h3>Design And Developed by Shyam. </h3>
</div>
</div>
</section>

<script src ="./js/index.js" type="text/javascript" ></script>

<script>


// Here is the ToDo list App Script code .

function first(){
let a = document.getElementById("ip1").value;

document.getElementById("ip1").value="";

var para = "";

var t =[];
var d = a;
t.push(d);
// console.log(t);
var node = document.createElement("p");
var btn = document.createElement("button");
btn.setAttribute("id" , "remzbtn");
btn.addEventListener("click" , trash);
var insbtn = document.createElement("i");
insbtn.setAttribute("class" , "fa fa-trash onez");
// console.log(insbtn);
btn.appendChild(insbtn);
var c = document.createTextNode(t);

node.appendChild(btn);
node.appendChild(c) ;
// dynamic css styles.
node.style.backgroundColor="#fff";
node.style.padding = "20px";
node.style.fontSize = "20px";
node.style.margin="10px 10px";
node.style.borderBottom="1px solid";
node.style.borderBottomColor="#f1f1f1";
node.style.overflow="hidden";
insbtn.style.fontSize="19px";
btn.style.marginRight="24px ";
btn.style.overflow="hidden";


document.getElementById("one").append(node);

function trash(){
var rtm = document.getElementsByName(c);
// console.log(rtm);
node.remove(rtm); //it will remove the which btn clicked.
}


}

</script>

</body>
</html>
45 changes: 45 additions & 0 deletions js/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@

function first(){
let a = document.getElementById("ip1").value;

document.getElementById("ip1").value="";

var para = "";

var t =[];
var d = a;
t.push(d);
// console.log(t);
var node = document.createElement("p");
var btn = document.createElement("button");
btn.setAttribute("id" , "remzbtn");
btn.addEventListener("click" , trash);
var insbtn = document.createElement("i");
insbtn.setAttribute("class" , "fa fa-trash onez");
// console.log(insbtn);
btn.appendChild(insbtn);
var c = document.createTextNode(t);

node.appendChild(btn);
node.appendChild(c) ;
// dynamic css styles.
node.style.backgroundColor="#fff";
node.style.padding = "20px";
node.style.fontSize = "20px";
node.style.margin="10px 10px";
node.style.borderBottom="1px solid";
node.style.borderBottomColor="#f1f1f1";
node.style.overflow="hidden";
insbtn.style.fontSize="19px";
btn.style.marginRight="24px ";
btn.style.overflow="hidden";


document.getElementById("one").append(node);

function trash(){
var rtm = document.getElementsByName(c);
// console.log(rtm);
node.remove(rtm); //it will remove the which btn clicked.
}
}

1 comment on commit aeb8e5b

@vercel
Copy link

@vercel vercel bot commented on aeb8e5b Nov 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.