diff --git a/index.html b/index.html
index c80328f5..e7d80daa 100644
--- a/index.html
+++ b/index.html
@@ -5,30 +5,33 @@
Visitor
@@ -159,7 +162,7 @@
padding: 0;
background-color: #f0f0f0;
display: flex;
- overflow-x: hidden;
+ overflow-x: hidden;
}
.sidebar {
@@ -189,7 +192,7 @@
background-color: #911da1;
}
- .canvas{
+ .canvas {
padding-right: 50px;
padding-left: 10px;
}
@@ -209,6 +212,7 @@
align-items: center;
padding-bottom: 50px;
}
+
.navbar h1 {
color: rgb(126, 36, 36);
margin: 0px;
@@ -221,7 +225,7 @@
gap: 20px;
margin: auto;
align-items: center;
-
+
}
.nav-links a {
@@ -330,7 +334,7 @@
gap: 20px;
max-width: 900px;
margin: 0 auto;
-
+
}
.newsletter-section input {
@@ -348,7 +352,7 @@
border-radius: 4px;
cursor: pointer;
transition: background-color 0.3s;
-
+
}
.newsletter-section button:hover {
@@ -395,7 +399,8 @@
cursor: pointer;
color: #5c2872;
}
- .profile{
+
+ .profile {
font-size: 2rem;
padding-right: 1rem;
}
@@ -440,12 +445,12 @@
@@ -883,48 +891,48 @@
Subscribe to our Newsletter
}
}
-// Save the current state to history
+ // Save the current state to history
function saveState() {
- history.push(canvas.toDataURL());
- }
+ history.push(canvas.toDataURL());
+ }
- // Undo function
+ // Undo function
function undo() {
- if (history.length > 0) {
- redoStack.push(history.pop());
- restoreState(history[history.length - 1]);
- }
-}
-
- // Redo function
- function redo() {
- if (redoStack.length > 0) {
- const redoState = redoStack.pop();
- history.push(redoState); // Move redo state back to history
- restoreState(redoState); // Restore the redo state
- }
-}
-
-// Restore the canvas state
- function restoreState(dataUrl) {
- if (dataUrl) {
- const img = new Image();
- img.src = dataUrl;
- img.onload = () => {
- ctx.clearRect(0, 0, canvas.width, canvas.height);
- ctx.drawImage(img, 0, 0);
- };
- } else {
- ctx.clearRect(0, 0, canvas.width, canvas.height); // Clear canvas if no history
- }
-}
+ if (history.length > 0) {
+ redoStack.push(history.pop());
+ restoreState(history[history.length - 1]);
+ }
+ }
+
+ // Redo function
+ function redo() {
+ if (redoStack.length > 0) {
+ const redoState = redoStack.pop();
+ history.push(redoState); // Move redo state back to history
+ restoreState(redoState); // Restore the redo state
+ }
+ }
+
+ // Restore the canvas state
+ function restoreState(dataUrl) {
+ if (dataUrl) {
+ const img = new Image();
+ img.src = dataUrl;
+ img.onload = () => {
+ ctx.clearRect(0, 0, canvas.width, canvas.height);
+ ctx.drawImage(img, 0, 0);
+ };
+ } else {
+ ctx.clearRect(0, 0, canvas.width, canvas.height); // Clear canvas if no history
+ }
+ }
-canvas.addEventListener('mousedown', startDrawing);
-canvas.addEventListener('mousemove', draw);
-canvas.addEventListener('mouseup', stopDrawing);
-canvas.addEventListener('mouseout', stopDrawing);
-document.getElementById('undoButton').addEventListener('click', undo);
-document.getElementById('redoButton').addEventListener('click', redo);
+ canvas.addEventListener('mousedown', startDrawing);
+ canvas.addEventListener('mousemove', draw);
+ canvas.addEventListener('mouseup', stopDrawing);
+ canvas.addEventListener('mouseout', stopDrawing);
+ document.getElementById('undoButton').addEventListener('click', undo);
+ document.getElementById('redoButton').addEventListener('click', redo);
window.embeddedChatbotConfig = {
@@ -1211,4 +1219,4 @@
How likely are you to recommend the Creative Canvas Tool to others?