-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
111 lines (89 loc) · 5.64 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<!-- Main Style Sheet -->
<link rel="stylesheet" href="style.css" />
<!-- Google Fonts -->
<link
href="https://fonts.googleapis.com/css2?family=Space+Mono:ital,wght@0,400;0,700;1,400;1,700&display=swap"
rel="stylesheet"
/>
<!-- This is the title of the tab -->
<title>My Journal</title>
</head>
<body>
<header>
<!-- Pressing Submit will change the title of the journal to [insert name]'s Journal to make it more personal -->
<input type="text" id="user-name" class="name" placeholder="Your Name"/>
<input class="name-btn" type="button" onClick="nameGen()" Value="Submit"/>
<h1 class="title" id="journal-name">My Journal</h1>
</header>
<!-- Create New Journal Entry Section -->
<section class="section journal-section">
<div class="container">
<div class="container-row container-row-journal">
<div class="container-item container-item-journal">
<!-- This creates a collapsible, so you can expand it when you want to create a new journal entry. -->
<button type="button" class="collapsible">Create a New Journal Entry</button>
<div class="content">
<br>
<form id="entryForm" action="">
<!-- Journal Entry Name -->
<label for="entry-title" class="journal-label">New Journal Entry</label>
<p class="description">💡 Creative tip: Try to come up with a creative name for your day :)</p>
<input type="text" name="entry-title" id="entry-title" class="entry-text-title" placeholder="Name of entry ✏️"/>
<!-- Date -->
<label for="entry-title" class="journal-label">Date</label>
<input type="text" name="entry-title" id="entry-title" class="date" placeholder="Date 📆"/>
<!-- Mood, this is where the user enters in their mood through a slider and the emojis change -->
<label for="entry-title" class="journal-label">Mood Rating</label>
<p class="description">😁 Rate your mood on a scale from 1-10 :)</p>
<div class="slidecontainer">
<p id="output" class="output">5</p>
<input type="range" min="1" max="10" value="5" class="slider" id="mood">
</div>
<!-- These are line breaks to make the interface more aesthetically pleasing -->
<br><br>
<!-- Here's the main section of the journal, where the user writes about their day for the journal -->
<label for="entry" class="journal-label">Journal about your day here...</label>
<textarea name="daily-entry" id="entry" class="entry-text-box" placeholder="What's on your mind today? 💭 
Don't know what to write about? Here are some questions to get you started on your entry: 
-What'd you eat throughout the day? 
-Did you go anywhere? 
-Did you see anybody? 
-How did you feel?"></textarea>
<!-- Here the user can enter three gratitudes about their day to improve their social emotional health -->
<label for="entry" class="journal-label">3 Gratitudes...</label>
<p class="description">🙏 Try to think of three gratitudes for today... </p>
<textarea id="entry1" class="gratitude-text-box" placeholder="Gratitude #1"></textarea>
<textarea id="entry2" class="gratitude-text-box" placeholder="Gratitude #2"></textarea>
<textarea id="entry3" class="gratitude-text-box" placeholder="Gratitude #3"></textarea>
<!-- This is an API that generates a random question to help the user think of gratitudes, also a collapsible -->
<button type="button" class="grat-collapsible">Can't think of a gratitude?</button>
<div class="grat-content">
<input class="btn-light gratitude-submit-btn" type="button" onClick="gratitudeGen()" Value="Press to generate a gratitude question!"/>
<p class="description">Gratitude question: <br>
<span id="gratituderesult"></span>
</p>
</div>
<br><br>
<!-- This is an API that generates a random inspirational quote to motivate the user -->
<label for="entry" class="journal-label">Do you need some motivation?</label>
<input class="btn-light gratitude-submit-btn" type="button" onClick="quotesGen()" Value="Press to generate a inspirational quote!"/>
<span id="quoteresult"></span>
<br><br><br>
<!-- Submit button -->
<button class="btn-main entry-submit-btn" type="submit">Submit</button>
</form>
</div>
</div>
</div>
</div>
</section>
<!-- Here are all the journal entries that the user submitted -->
<section class="section sectionEntryResults" id="entryResultsSection">
<h2>Journal Entries</h2>
<div class="container">
<div class="container-row entryResultRow"></div>
</div>
</section>
<script src="code.js"></script>
</body>
</html>