-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtracking.html
62 lines (56 loc) · 2.4 KB
/
tracking.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="navbar.css">
<link rel="stylesheet" href="tracking.css">
<title>Mood Tracker</title>
</head>
<body>
<div id="navbar"></div>
<div class="container">
<h1>Mood Tracker</h1>
<form id="journalForm">
<label for="date">Date:</label>
<input type="date" id="date" required>
<div>
<label for="mood">Mood:</label>
<div class="mood-options">
<label><input type="radio" name="mood" value="happy" checked>😊 Happy</label>
<label><input type="radio" name="mood" value="sad">😢 Sad</label>
<label><input type="radio" name="mood" value="calm">😌 Calm</label>
<label><input type="radio" name="mood" value="anxious">😟 Anxious</label>
<label><input type="radio" name="mood" value="energetic">💪 Energetic</label>
<label><input type="radio" name="mood" value="stressed">😣 Stressed</label>
<label><input type="radio" name="mood" value="confident">😎 Confident</label>
<label><input type="radio" name="mood" value="frustrated">😤 Frustrated</label>
<label><input type="radio" name="mood" value="motivated">🚀 Motivated</label>
</div>
</div>
<div>
<label for="entry">Notes: </label>
<textarea id="entry" rows="8" required></textarea>
</div>
<button type="button" onclick="submitForm()">Submit</button>
</form>
<div id="tips">
<h2>Tips for Your Mood:</h2>
<ul id="moodTipsList">
<!-- Tips will be dynamically populated here -->
</ul>
<p id="moodTips">Tips will appear here based on your mood selection.</p>
</div>
<button onclick="displaySavedData()">History</button>
<div id="display-container"></div>
</div>
<script src="tracking.js"></script>
<script>
fetch('navbar.html')
.then(response => response.text())
.then(data => {
document.getElementById('navbar').innerHTML = data;
});
</script>
</body>
</html>