-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
133 lines (119 loc) · 3.35 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Study Planner</title>
<link rel="stylesheet" href="style.css">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> // Add viewport meta element
<title>Document</title>
</head>
<body>
<header>
<h1>Study Planner</h1>
</header>
<main>
<section id="schedule">
<h2>Your Schedule</h2>
<!-- Schedule content goes here -->
</section>
<section id="tasks">
<h2>Your Tasks</h2>
<!-- Task list and management interface goes here -->
<div id="taskForm">
<form>
<!-- Form content for adding tasks -->
</form>
</div>
<div id="taskList">
<!-- Dynamic task list will be rendered here -->
</div>
</section>
</main>
<footer>
<p>© 2023 Study Planner</p>
</footer>
<script src="main.js"></script>
</body>
</html>
<<<<<<< Updated upstream
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <!-- Added viewport meta element -->
<title>Document</title>
</head>
<body>
</body>
</html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
</body>
</html>
<body>
</body>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> // Add viewport meta element
<title>Document</title>
</head>
<body>
</body>
</html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <!-- Added viewport meta element -->
<title>Document</title>
</head>
<body>
</body>
</html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
</html>
=======
<script>
// Example fetch request to an API endpoint
fetch('/api/tasks')
.then(response => response.json())
.then(data => {
// Handle data (tasks) here
console.log(data);
})
.catch(error => {
console.error('Error fetching tasks:', error);
});
</script>
<script>
// Function to fetch and display tasks
function fetchAndDisplayTasks() {
fetch('/api/tasks')
.then(response => response.json())
.then(tasks => {
const tasksList = document.getElementById('tasksList');
tasksList.innerHTML = ''; // Clear existing tasks
tasks.forEach(task => {
const taskItem = document.createElement('li');
taskItem.textContent = task.title;
tasksList.appendChild(taskItem);
});
})
.catch(error => {
console.error('Error fetching tasks:', error);
});
}
// Call the function on page load
document.addEventListener('DOMContentLoaded', fetchAndDisplayTasks);
</script>
>>>>>>> Stashed changes