-
Notifications
You must be signed in to change notification settings - Fork 305
/
tutorial.html
294 lines (278 loc) · 9.92 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
<!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 {
font-family: Arial, sans-serif;
line-height: 1.6;
color: #333;
margin: 0;
padding: 0;
background-color: #f0f0f0;
}
.navbar {
background-color: #333;
padding: 10px 20px;
display: flex;
align-items: center;
justify-content: space-between;
}
.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;
}
.nav-links {
list-style-type: none;
display: flex;
margin: 0;
padding: 0;
}
.nav-links li {
margin-left: 20px;
}
.nav-links a {
color: #aaa;
text-decoration: none;
font-size: 16px;
transition: color 0.3s;
}
.nav-links a:hover {
color: white;
}
.content {
max-width: 800px;
margin: 0 auto;
padding: 20px;
background-color: white;
box-shadow: 0 0 10px rgba(0,0,0,0.1);
}
h1 {
color: #2c3e50;
text-align: center;
background-color: #ecf0f1;
padding: 20px 0;
margin: -20px -20px 20px -20px;
}
h2 {
color: #e74c3c;
border-bottom: 2px solid #e74c3c;
padding-bottom: 10px;
}
.tutorial-section {
background-color: #fff;
border-radius: 8px;
padding: 20px;
margin-bottom: 20px;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.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: #545c61;
color: #fff;
border-radius: 10px;
}
.cta .h2{
color: #f5f5f5;
}
.cta-button {
display: inline-block;
background-color: #2c3e50;
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: #2ecc71; }
.purple { background-color: #9b59b6; }
.red { background-color: #e74c3c; }
</style>
<style>
/* Circle styles */
.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">
<a href="index.html" class="logo">Canvas</a>
<ul class="nav-links">
<li><a href="index.html">Home</a></li>
<li><a href="about-us.html">About</a></li>
<li><a href="blog.html">Blogs</a></li>
<li><a href="contributors.html">Contributors</a></li>
<li><a href="testimonial.html">Testimonial</a></li>
</ul>
</nav>
<div class="content">
<h1>Canvas Editor Tutorial</h1>
<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 purple">Uppercase</span>
<span class="button purple">Lowercase</span>
<span class="button purple">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 purple">Circle</span>
<span class="button purple">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 purple">Save</span>
<span class="button purple">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 style="color: white;">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>
</body>
</html>