-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathletter.html
339 lines (284 loc) · 11.4 KB
/
letter.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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Techscrïbe</title>
<meta content="width=device-width, initial-scale=1.0" name="viewport">
<meta content="" name="keywords">
<meta content="" name="description">
<!-- Favicon -->
<link href="img/favicon.ico" rel="icon">
<!-- Google Web Fonts -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Heebo:wght@400;500;600&family=Inter:wght@700;800&display=swap" rel="stylesheet">
<!-- Icon Font Stylesheet -->
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.10.0/css/all.min.css" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.css" rel="stylesheet">
<!-- Libraries Stylesheet -->
<link href="lib/animate/animate.min.css" rel="stylesheet">
<link href="lib/owlcarousel/assets/owl.carousel.min.css" rel="stylesheet">
<!-- Customized Bootstrap Stylesheet -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<!-- Template Stylesheet -->
<link href="css/style.css" rel="stylesheet">
<style>
body {
font-family: Arial, sans-serif;
background-color: #f0f0f0;
margin: 0;
}
#letter-container {
width: 92%;
margin: 0 auto;
padding: 20px;
position: relative;
background-color: #fff;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
#letter {
border: 1px solid #ccc;
padding: 20px;
position: relative;
}
.highlighted {
background-color: yellow;
}
.tip-container {
display: none;
position: absolute;
padding: 10px;
background-color: yellow;
border-radius: 5px;
box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
z-index: 1;
}
.tip-text {
margin: 0;
}
.tip-arrow {
display: none;
position: absolute;
font-size: 20px;
color: yellow;
z-index: 0;
}
#next-button {
display: block;
margin: 20px auto;
padding: 10px 20px;
background-color: #007BFF;
color: #fff;
border: none;
border-radius: 5px;
cursor: pointer;
transition: background-color 0.3s;
}
#next-button:hover {
background-color: #0056b3;
}
body {
font-family: Arial, sans-serif;
background-color: #f0f0f0;
margin: 0;
}
#letter-container {
width: 92%;
margin: 0 auto;
padding: 20px;
position: relative;
background-color: #fff;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
#letter {
border: 1px solid #ccc;
padding: 20px;
position: relative;
}
.highlighted {
background-color: yellow;
}
.mistake-container {
display: none;
position: absolute;
padding: 10px;
background-color: yellow;
border-radius: 5px;
box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
z-index: 1;
}
.mistake-text {
margin: 0;
}
.mistake-arrow {
display: none;
position: absolute;
font-size: 20px;
color: yellow;
z-index: 0;
}
#next-button {
display: block;
margin: 20px auto;
padding: 10px 20px;
background-color: #c06c04;
color: #fff;
border: none;
border-radius: 5px;
cursor: pointer;
transition: background-color 0.3s;
}
#next-button:hover {
background-color: #0056b3;
}
</style>
</head>
<body>
<div class="container-xxl bg-white p-0">
<!-- Spinner Start -->
<div id="spinner" class="show bg-white position-fixed translate-middle w-100 vh-100 top-50 start-50 d-flex align-items-center justify-content-center">
<div class="spinner-border text-primary" style="width: 3rem; height: 3rem;" role="status">
<span class="sr-only">Loading...</span>
</div>
</div>
<!-- Spinner End -->
<!-- Navbar & Hero Start -->
<div class="container-xxl position-relative p-0">
<nav class="navbar navbar-expand-lg navbar-light px-4 px-lg-5 py-3 py-lg-0">
<a href="index.html" class="navbar-brand p-0">
<h1 class="m-0">Techscrïbe</h1>
<!-- <img src="img/logo.png" alt="Logo"> -->
</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarCollapse">
<span class="fa fa-bars"></span>
</button>
<div class="collapse navbar-collapse" id="navbarCollapse">
<div class="navbar-nav ms-auto py-0">
<a href="index.html" class="nav-item nav-link">Home</a>
<a href="blog.html" class="nav-item nav-link">Blog</a>
<div class="nav-item dropdown">
<a href="#" class="nav-link dropdown-toggle acti" data-bs-toggle="dropdown">Formats</a>
<div class="dropdown-menu m-0">
<a href="letter.html" class="dropdown-item">Letter</a>
<a href="email.html" class="dropdown-item">Email</a>
<a href="memo.html" class="dropdown-item">Memo</a>
<a href="resume.html" class="dropdown-item">Resume</a>
<a href="sop.html" class="dropdown-item">SOP</a>
<a href="user.html" class="dropdown-item">User Manual</a>
<a href="report.html" class="dropdown-item">Report</a>
<a href="press.html" class="dropdown-item">Press release</a>
<a href="proposal.html" class="dropdown-item">Proposal</a>
</div>
</div>
<a href="calculator.html" class="nav-item nav-link">Calculator</a>
</div>
<a href="" class="btn btn-light rounded-pill text-primary py-2 px-4 ms-lg-5">SCRÏBE </a>
</div>
</nav>
<div class="container-xxl bg-primary hero-header">
<div class="container">
<h1 style="text-align: center;">Letter</h1>
</div>
</div>
</div>
</div>
<!-- Navbar & Hero End -->
</head>
<body>
<div id="letter-container">
<h1>Letter</h1>
<div id="letter">
<p>
Date: [Date]
</p>
<p>
To: [Recipient's Name]
</p>
<p>
Address: [Recipient's Address]
</p>
<p>
Dear [Recipient's Name],
</p>
<div class="mistake-container" style="top: 90px; left: 150px;">
<div class="mistake-arrow" style="top: -10px; left: 10px;">▲</div>
<p class="mistake-text">Mistake: Missing Recipient's Name - Address the recipient by name.</p>
</div>
<p>
[Your Letter Content Goes Here.]
</p>
<div class="mistake-container" style="top: 240px; left: 150px;">
<div class="mistake-arrow" style="top: -10px; left: 10px;">▲</div>
<p class="mistake-text">Mistake: Generic Closing - Use a more personalized closing, e.g., "Sincerely" or "Best regards."</p>
</div>
<p>
Sincerely,
</p>
</div>
<button id="next-button">Next</button>
</div>
<script>
// JavaScript to control letter correction and next button
const mistakeContainers = document.querySelectorAll('.mistake-container');
const mistakeArrows = document.querySelectorAll('.mistake-arrow');
const nextButton = document.getElementById('next-button');
let currentIndex = -1;
// Hide all mistake highlights initially
mistakeContainers.forEach((container) => {
container.style.display = 'none';
});
// Define the list of mistakes and corrections
const mistakes = [
"Missing Recipient's Name",
"Generic Closing",
// Add more mistakes as needed
];
// Corresponding corrected content
const correctedLetter = [
"Date: [Date]",
"To: [Recipient's Name]",
"Address: [Recipient's Address]",
"Dear [Recipient's Name],",
// Add more corrected content as needed
"Sincerely, [Your Name]",
];
nextButton.addEventListener('click', () => {
// Hide the previous displayed mistake, if any
if (currentIndex >= 0) {
mistakeContainers[currentIndex].style.display = 'none';
mistakeArrows[currentIndex].style.display = 'none';
}
// Show the next mistake, if available
if (currentIndex < mistakes.length - 1) {
currentIndex++;
// Show the current mistake
mistakeContainers[currentIndex].style.display = 'block';
mistakeArrows[currentIndex].style.display = 'block';
// Delay the correction by 1 second
setTimeout(() => {
// Update the letter content with the corrected version for the current mistake
document.querySelector("#letter p:nth-child(" + (currentIndex * 2) + ")").textContent = correctedLetter[currentIndex];
}, 1000);
} else {
// Hide the "Next" button when all mistakes are shown.
nextButton.style.display = 'none';
}
});
</script>
<p class="centr">Click the button to download a sample file:</p>
<a href="https://docs.google.com/document/d/1ppckObBeJWxjrPBqqGDOsmVtAOMaBi3h6CWEEFHQD3A/edit" download="sample-file.docx">
<button class="download-button">Download word Doc</button>
<!-- Back to Top -->
<a href="#" class="btn btn-lg btn-primary btn-lg-square back-to-top"><i class="bi bi-arrow-up"></i></a>
</div>
<!-- JavaScript Libraries -->
<script src="https://code.jquery.com/jquery-3.4.1.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script>
<script src="lib/wow/wow.min.js"></script>
<script src="lib/easing/easing.min.js"></script>
<script src="lib/waypoints/waypoints.min.js"></script>
<script src="lib/owlcarousel/owl.carousel.min.js"></script>
<!-- Template Javascript -->
<script src="js/main.js"></script>
</body>
</html>