forked from vishanurag/Canvas-Editor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtutorial.html
427 lines (392 loc) · 13.4 KB
/
tutorial.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
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Canvas Editor Tutorial</title>
<style>
body {
background: linear-gradient(135deg, #ffb7fd 0%, #abc0ef 50%, #c58be5 100%);
font-family: 'Poppins', sans-serif;
margin: 0;
color: #333;
overflow-x: hidden;
min-height: 100vh;
}
.navbar {
background-color: #f0adfb;
padding: 10px;
display: flex;
justify-content: center; /* Center aligns the navbar */
position: fixed; /* Sticks to the top */
width: 100%;
z-index: 1000;
}
.navbar h1 {
color: rgb(255, 255, 255);
margin: 0;
}
.nav-links {
display: flex;
gap: 20px;
}
.nav-links a {
color: rgb(255, 255, 255);
text-decoration: none;
padding: 6px 4px;
border-radius: 4px;
transition: background-color 0.3s;
}
.nav-links a:hover {
background-color: #541058;
}
.logo {
color: white;
font-size: 24px;
font-weight: bold;
text-decoration: none;
display: flex;
align-items: center;
}
.logo::after {
content: '✏️';
margin-left: 5px;
font-size: 20px;
}
.navbar {
background-color: #f0adfb;
padding: 10px;
display: flex;
justify-content: center; /* Center aligns the navbar */
position: fixed; /* Sticks to the top */
width: 100%;
z-index: 1000;
}
.navbar h1 {
color: rgb(255, 255, 255);
margin: 0;
}
.nav-links {
display: flex;
gap: 20px;
}
.nav-links a {
color: rgb(255, 255, 255);
text-decoration: none;
padding: 6px 4px;
border-radius: 4px;
transition: background-color 0.3s;
}
.nav-links a:hover {
background-color: #541058;
}
.content {
max-width: 800px;
margin: 2rem auto;
padding: 0 1rem;
}
.heading {
font-size: 2.5rem;
color: #353047;
margin-bottom: 2rem;
text-align: center;
}
.tutorial-section {
background-color: rgba(255, 255, 255, 0.3);
border-radius: 8px;
padding: 20px;
margin-bottom: 20px;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
h2 {
color: #353047;
border-bottom: 2px solid #353047;
padding-bottom: 10px;
}
.button {
display: inline-block;
padding: 10px 20px;
margin: 5px;
border-radius: 5px;
color: white;
font-weight: bold;
text-align: center;
}
.cta {
text-align: center;
margin-top: 3rem;
padding: 2rem;
background-color: rgba(84, 92, 97, 0.7);
color: #fff;
border-radius: 10px;
}
.cta h2 {
color: #f5f5f5;
border-bottom: none;
}
.cta-button {
display: inline-block;
background-color: #353047;
color: #fff;
text-decoration: none;
padding: 1rem 2rem;
border-radius: 5px;
font-weight: bold;
transition: background-color 0.3s ease;
margin-top: 1rem;
}
.cta-button:hover {
background-color: #1a252f;
}
.green { background-color: #28b864; }
.purple { background-color: #9b59b6; }
.red { background-color: #e74c3c; }
.circle {
height: 24px;
width: 24px;
border-radius: 50%;
background-color: black;
position: fixed;
top: 0;
left: 0;
pointer-events: none;
z-index: 99999999;
transition: transform 0.1s ease-out;
}
</style>
</head>
<body>
<!-- Circles -->
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<nav class="navbar">
<div class="nav-links">
<h1 class="canvas">Canvas Editor</h1>
<a href="index.html">Home</a>
<a href="about-us.html">About Us</a>
<a href="review.html">Review</a>
<a href="testimonial.html">Testimonial</a>
<a href="privacy.html">Privacy</a>
<a href="tutorial.html">Tutorial</a>
<a href="Blog_page.html">Blog</a>
<a href="Faq.html">FAQ</a>
<a href="./Feedback.html">Feedback</a>
<!-- <a href="signup.html">Sign Up</a> -->
<a href="contributors.html">Contributors</a>
</div>
<h1 class="heading">Canvas Editor Tutorial</h1>
<div class="content">
<div class="tutorial-section">
<h2>1. Basic Drawing Tools</h2>
<p>The Canvas Editor provides three main drawing tools:</p>
<span class="button green">Brush</span>
<span class="button purple">Clear Canvas</span>
<span class="button red">Eraser</span>
<ul>
<li><strong>Brush:</strong> Use this to draw freely on the canvas.</li>
<li><strong>Clear Canvas:</strong> Removes all content from the canvas.</li>
<li><strong>Eraser:</strong> Removes specific parts of your drawing.</li>
</ul>
</div>
<div class="tutorial-section">
<h2>2. Brush Customization</h2>
<p>Customize your brush with these options:</p>
<ul>
<li><strong>Brush Size:</strong> Adjust the thickness of your brush strokes.</li>
<li><strong>Color:</strong> Choose any color for your brush from the color picker.</li>
</ul>
</div>
<div class="tutorial-section">
<h2>3. Text Styling</h2>
<p>Add and style text with these options:</p>
<span class="button green">Uppercase</span>
<span class="button purple">Lowercase</span>
<span class="button red">Bold</span>
<span class="button purple">Italic</span>
<p>Use these buttons to change the case or emphasis of your text.</p>
</div>
<div class="tutorial-section">
<h2>4. Shape Tools</h2>
<p>Create perfect shapes easily:</p>
<span class="button purple">Rectangle</span>
<span class="button red">Circle</span>
<span class="button green">Line</span>
<p>Select a shape tool, then click and drag on the canvas to draw.</p>
</div>
<div class="tutorial-section">
<h2>5. Background Options</h2>
<p>Customize your canvas background:</p>
<ul>
<li><strong>Background Image:</strong> Upload an image to use as your canvas background.</li>
<li><strong>Background Color:</strong> Choose a solid color for your canvas background.</li>
</ul>
</div>
<div class="tutorial-section">
<h2>6. Saving Your Work</h2>
<p>When you're done, save your masterpiece:</p>
<span class="button green">Save</span>
<span class="button red">Clear</span>
<span class="button purple">Download</span>
<span class="button purple">Save Image</span>
<ul>
<li><strong>Save:</strong> Store your work for later editing.</li>
<li><strong>Clear:</strong> Start over with a blank canvas.</li>
<li><strong>Download:</strong> Save your work to your device.</li>
<li><strong>Save Image:</strong> Export your canvas as an image file.</li>
</ul>
</div>
<div class="cta">
<h2>Ready to unleash your creativity?</h2>
<p>Join thousands of satisfied users and start designing today!</p>
<a href="index.html#mainCanvas" class="cta-button">Start Drawing Now ➡ </a>
</div>
</div>
<script>
// Coordinates for the cursor
const coords = { x: 0, y: 0 };
const circles = document.querySelectorAll(".circle");
// Colors for the circles
const colors = [
"#ffb56b", "#fdaf69", "#f89d63", "#f59761", "#ef865e", "#ec805d",
"#e36e5c", "#df685c", "#d5585c", "#d1525c", "#c5415d", "#c03b5d",
"#b22c5e", "#ac265e", "#9c155f", "#950f5f", "#830060", "#7c0060",
"#680060", "#60005f", "#48005f", "#3d005e"
];
// Assign colors and initial position to each circle
circles.forEach(function (circle, index) {
circle.x = 0;
circle.y = 0;
circle.style.backgroundColor = colors[index % colors.length];
});
// Update the coordinates when the mouse moves
window.addEventListener("mousemove", function (e) {
coords.x = e.clientX;
coords.y = e.clientY;
});
// Animation function to move the circles
function animateCircles() {
let x = coords.x;
let y = coords.y;
circles.forEach(function (circle, index) {
// Update the position and scale of each circle
circle.style.left = x - 12 + "px";
circle.style.top = y - 12 + "px";
circle.style.scale = (circles.length - index) / circles.length;
circle.x = x;
circle.y = y;
// Get the next circle in the sequence
const nextCircle = circles[index + 1] || circles[0];
x += (nextCircle.x - x) * 0.3;
y += (nextCircle.y - y) * 0.3;
});
// Repeat the animation
requestAnimationFrame(animateCircles);
}
// Start the animation
animateCircles();
</script>
<button id="scrollToTopBtn">
<div class="progress-ring">
<svg viewBox="0 0 36 36">
<path class="ring-bg" d="M18 2a16 16 0 1 1 0 32 16 16 0 0 1 0-32"></path>
<path class="ring-progress" d="M18 2a16 16 0 1 1 0 32 16 16 0 0 1 0-32"></path>
</svg>
</div>
<span>↑</span>
</button>
<style>
/* Scroll to Top Button */
#scrollToTopBtn {
position: fixed;
bottom: 20px;
right: 20px;
width: 50px;
height: 50px;
border-radius: 50%;
background: linear-gradient(135deg, #ffb7fd 0%, #abc0ef 100%);
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
outline: none;
border: none;
opacity: 0;
transition: opacity 0.3s;
}
#scrollToTopBtn.show {
opacity: 1;
}
#scrollToTopBtn span {
font-size: 24px;
color: white;
}
/* Progress Ring */
.progress-ring {
position: absolute;
top: 50%;
left: 50%;
width: 36px;
height: 36px;
transform: translate(-50%, -50%);
}
.progress-ring svg {
width: 100%;
height: 100%;
transform: rotate(-90deg);
}
.ring-bg {
fill: none;
stroke: rgba(255, 255, 255, 0.2);
stroke-width: 4;
}
.ring-progress {
fill: none;
stroke: white;
stroke-width: 4;
stroke-dasharray: 100;
stroke-dashoffset: 100;
transition: stroke-dashoffset 0.3s;
}
</style>
<!-- JavaScript for Scroll to Top Button -->
<script>
// Show button and update progress ring on scroll
const scrollToTopBtn = document.getElementById("scrollToTopBtn");
const ringProgress = document.querySelector(".ring-progress");
window.addEventListener("scroll", () => {
// Show/hide button
if (window.scrollY > 300) {
scrollToTopBtn.classList.add("show");
} else {
scrollToTopBtn.classList.remove("show");
}
// Update progress ring
const scrollPercentage = (window.scrollY / (document.documentElement.scrollHeight - window.innerHeight)) * 100;
ringProgress.style.strokeDashoffset = 100 - scrollPercentage;
});
// Scroll to top when button clicked
scrollToTopBtn.addEventListener("click", () => {
window.scrollTo({ top: 0, behavior: "smooth" });
});
</script>
</body>
</html>