Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 65 additions & 0 deletions addlist.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: "Roboto", sans-serif;
}
.heading{
font-family: "Roboto";
font-size:34px;
color:rgb(150, 103, 68);
margin-bottom:30px;
}
.container {
width: 100%;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
background-image: url("https://images.unsplash.com/photo-1445583934509-4ad5ffe6ef08?q=80&w=2070&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D");
background-size:cover;
}
.todoapp {
width: 500px;
height:250px;
background-image:url("https://plus.unsplash.com/premium_photo-1683309568772-57011d6c1b7b?fm=jpg&q=60&w=3000&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxzZWFyY2h8NXx8dG8lMjBkbyUyMGxpc3R8ZW58MHx8MHx8fDA%3D");
background-size:cover;
color: black;
padding: 30px;
border-radius: 50px;
text-align: center;
}
.text1 {
width: 75%;
padding: 10px;
margin-bottom: 10px;
border: 2px solid #ccc;
border-radius: 10px;
border-width: 3px;
border-style: solid;
}
.btn1 {
width: 80px;
padding: 10px;
height:40px;
border-radius: 10px;
background-color: green;
color: white;
border: none;
cursor: pointer;
margin:10px;
}
.btn {
width: 80px;
padding: 10px;
height:40px;
border-radius: 10px;
background-color:grey;
color: white;
border: none;
cursor: pointer;
margin:10px;
}
/* https://plus.unsplash.com/premium_photo-1683309568772-57011d6c1b7b?fm=jpg&q=60&w=3000&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxzZWFyY2h8NXx8dG8lMjBkbyUyMGxpc3R8ZW58MHx8MHx8fDA%3D
https://images.unsplash.com/photo-1445583934509-4ad5ffe6ef08?q=80&w=2070&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D */
25 changes: 25 additions & 0 deletions addlist.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>To-Do Input</title>
<link rel="stylesheet" href="addlist.css">
</head>
<body>
<div class="container">
<div class="todoapp">
<h2 class="heading">Add to your Dumbest List</h2>
<input type="text" id="input-box" class="text1" placeholder="Enter something you dumb...!" required>
<div class="d-flex flex-row justify-content-between">

<a href="hackthon.html" >
<button class="btn"></button>
</a>
<button onclick="saveTask()" class="btn1"></button>
</div>
</div>
</div>
<script src="addlist.js"></script>
</body>
</html>
12 changes: 12 additions & 0 deletions addlist.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
function saveTask() {
const task = document.getElementById("input-box").value;
if (task === '') {
alert("Please enter a task.");
} else {
const tasks = JSON.parse(localStorage.getItem("tasks")) || [];
tasks.push(task);
localStorage.setItem("tasks", JSON.stringify(tasks));
alert("Task saved! Navigate to the display page.");
document.getElementById("input-box").value = "";
}
}
59 changes: 59 additions & 0 deletions delete.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: "Roboto", sans-serif;
}
.container {
width: 100%;
min-height: 100vh;
display: flex;
justify-content: center;
align-items: center;
background-image:url("https://images.unsplash.com/photo-1445583934509-4ad5ffe6ef08?q=80&w=2070&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D");
background-size:cover;
}
.todoapp {
width: 400px;
background: #ffffff;
color: black;
padding: 40px;
border-radius: 20px;
background-image: url("https://plus.unsplash.com/premium_photo-1683309568772-57011d6c1b7b?fm=jpg&q=60&w=3000&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxzZWFyY2h8NXx8dG8lMjBkbyUyMGxpc3R8ZW58MHx8MHx8fDA%3D");
background-size:cover;
}
ul {
list-style-type: none;
padding: 0;
}
li {
display: flex;
justify-content: space-between;
align-items: center;
padding: 20px;
background: #f1f1f1;
margin-bottom: 15px;
border-radius: 5px;
margin-top:20px;
}
.btn {
padding: 5px 10px;
border: none;
background: rgb(251, 81, 81);
color: white;
border-radius: 5px;
cursor: pointer;
height:35px;
width:70px;
}
.btn1 {
padding: 5px 10px;
border: none;
background: rgb(95, 94, 94);
color: white;
border-radius: 5px;
cursor: pointer;
height:35px;
width:70px;
}
25 changes: 25 additions & 0 deletions delete.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>To-Do Output</title>

<link rel="stylesheet" href="delete.css">

</head>
<body>
<div class="container">
<div class="todoapp">
<h2>YOUR DUMBEST LIST</h2>
<div>
<ul id="task-list"></ul>
</div>
<div>
<a href="hackthon.html"><button class="btn1"></button></a></div>
</div>

</div>
<script src="delete.js"></script>
</body>
</html>
26 changes: 26 additions & 0 deletions delete.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@

const taskList = document.getElementById("task-list");
const tasks = JSON.parse(localStorage.getItem("tasks")) || [];
function displayTasks() {
taskList.innerHTML = "";
if (tasks.length === 0) {
taskList.innerHTML = "<li>No tasks added yet.</li>";
} else {
tasks.forEach((task, index) => {
const li = document.createElement("li");
li.textContent = task;
const removeBtn = document.createElement("button");
removeBtn.textContent = "";
removeBtn.className = "btn";
removeBtn.onclick = () => removeTask(index);
li.appendChild(removeBtn);
taskList.appendChild(li);
});
}
}
function removeTask(index) {
tasks.splice(index, 1);
localStorage.setItem("tasks", JSON.stringify(tasks));
displayTasks();
}
displayTasks();
77 changes: 77 additions & 0 deletions hackthon.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Text:ital@0;1&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap');
.homepage-bg{
background-image: url("https://t4.ftcdn.net/jpg/10/87/15/51/240_F_1087155126_T4eBQuNe3AOpPtDECMtUlVPw9xpbSVZT.jpg");
background-size: cover;
height:100vh;
width:100vw;
}
.homepage-bg1{
background-image: url("https://t4.ftcdn.net/jpg/02/42/79/15/240_F_242791586_qkCFcop5qIbmhAZYX7lpAUEWU03GfIFL.jpg");
width:100vw;
background-size:660px;
height:100vh;
}
.heading{
font-family:"Roboto";
font-size:30px;
color:rgb(113, 123, 135);
text-decoration-line: underline;
text-align:center;
padding:50px;
padding-bottom: 90px;
}
.pad{
padding:10px;
margin:22px;
width:190px;
text-align: center;
border-radius: 20px;
}
.homepage{
text-align:center;
}
.mainbox{
height:440px;
width:600px;
background-color:bisque;
text-align:center;
margin:100px;
border-radius: 80px;
}
.traffic-container {
display: flex;
flex-direction: column;
align-items: center;
background: black;
padding: 20px;
border-radius: 20px;
width: 100px;
}
.light {
width: 60px;
height: 60px;
background: gray;
margin: 10px;
border-radius: 50%;
}
.button-container {
display: flex;
flex-direction: column;
position: absolute;
right: 20px;
}
button {
width: 100px;
height: 40px;
margin: 10px;
font-size: 16px;
border: none;
cursor: pointer;
color: white;
border-radius: 5px;
}
.para{
padding:15px;
font-size:24px;
font-family: "Roboto";
}
27 changes: 27 additions & 0 deletions hackthon.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>TO-DO LIST</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous">
<link rel="stylesheet" href="hackthon.css">
</head>
<body>
<div id="sectionhomepage">
<div class="d-flex flex-row justify-content-center homepage-bg">
<div class="mainbox homepage-bg1">
<div class="homepage">
<h1 class="heading">Hey dumb, Whatsup...!</h1>
<div><a href="addlist.html" ><button class="btn btn-primary pad" ></button></a></div>
<div><a href="delete.html"><button class="btn btn-warning pad"></button></a><br></div>

</div>
</div>
</div>
</div>


<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz" crossorigin="anonymous"></script>
</body>
</html>
33 changes: 33 additions & 0 deletions view.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: "Roboto", sans-serif;
}
.container {
width: 100%;
min-height: 100vh;
display: flex;
justify-content: center;
align-items: center;
background: linear-gradient(to right, #abcfe8, #87e7b5, #d3e98b, #e69ee9);
}
.todoapp {
width: 100%;
max-width: 400px;
background: #ffffff;
color: black;
padding: 30px;
border-radius: 20px;
}
ul {
list-style-type: none;
padding: 0;
}
li {
padding: 10px;
background: #f1f1f1;
margin-bottom: 5px;
border-radius: 5px;
}
21 changes: 21 additions & 0 deletions view.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>To-Do Output</title>
<link rel="stylesheet" href="view.css">
</head>
<body>
<div class="container">
<div class="todoapp">
<h2>Your To-Do List</h2>
<ul id="task-list"></ul>
<a href="delete.html" target="_blank">
<button>Back</button>
</a>
</div>
</div>
<script src="view.js"></script>
</body>
</html>
12 changes: 12 additions & 0 deletions view.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
const taskList = document.getElementById("task-list");
const tasks = JSON.parse(localStorage.getItem("tasks")) || [];

if (tasks.length === 0) {
taskList.innerHTML = "<li>No tasks added yet.</li>";
} else {
tasks.forEach(task => {
const li = document.createElement("li");
li.textContent = task;
taskList.appendChild(li);
});
}