Initial commit: Site Builder with PHP API backend
Visual drag-and-drop website builder using GrapesJS with: - Multi-page editor with live preview - File-based asset storage via PHP API (no localStorage base64) - Template library, Docker support, and Playwright test suite Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
110
clear-data.html
Normal file
110
clear-data.html
Normal file
@@ -0,0 +1,110 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Clear Site Builder Data</title>
|
||||
<style>
|
||||
body {
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
min-height: 100vh;
|
||||
margin: 0;
|
||||
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
||||
}
|
||||
.container {
|
||||
background: white;
|
||||
padding: 40px;
|
||||
border-radius: 12px;
|
||||
box-shadow: 0 20px 60px rgba(0,0,0,0.3);
|
||||
text-align: center;
|
||||
max-width: 500px;
|
||||
}
|
||||
h1 {
|
||||
color: #333;
|
||||
margin-bottom: 20px;
|
||||
font-size: 24px;
|
||||
}
|
||||
p {
|
||||
color: #666;
|
||||
margin-bottom: 30px;
|
||||
line-height: 1.6;
|
||||
}
|
||||
button {
|
||||
background: #667eea;
|
||||
color: white;
|
||||
border: none;
|
||||
padding: 12px 30px;
|
||||
font-size: 16px;
|
||||
border-radius: 6px;
|
||||
cursor: pointer;
|
||||
transition: all 0.2s;
|
||||
margin: 5px;
|
||||
}
|
||||
button:hover {
|
||||
background: #5568d3;
|
||||
transform: translateY(-1px);
|
||||
}
|
||||
button.secondary {
|
||||
background: #e5e7eb;
|
||||
color: #374151;
|
||||
}
|
||||
button.secondary:hover {
|
||||
background: #d1d5db;
|
||||
}
|
||||
.success {
|
||||
color: #10b981;
|
||||
font-weight: 500;
|
||||
margin-top: 20px;
|
||||
display: none;
|
||||
}
|
||||
.info {
|
||||
background: #eff6ff;
|
||||
border: 1px solid #bfdbfe;
|
||||
padding: 15px;
|
||||
border-radius: 6px;
|
||||
color: #1e40af;
|
||||
font-size: 14px;
|
||||
margin-top: 20px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<h1>🧹 Clear Site Builder Data</h1>
|
||||
<p>This will remove all saved projects, test elements, and cached data from localStorage. You'll start with a clean slate.</p>
|
||||
|
||||
<button id="clearBtn">Clear All Data</button>
|
||||
<button class="secondary" onclick="window.location.href='index.html'">Back to Editor</button>
|
||||
|
||||
<div class="success" id="successMsg">✅ Data cleared successfully! Redirecting...</div>
|
||||
|
||||
<div class="info">
|
||||
<strong>What gets cleared:</strong><br>
|
||||
• Saved projects (sitebuilder-project)<br>
|
||||
• Preview cache<br>
|
||||
• Any test elements or configurations
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
document.getElementById('clearBtn').addEventListener('click', () => {
|
||||
if (confirm('Are you sure you want to clear ALL site builder data? This cannot be undone.')) {
|
||||
// Clear all site builder related localStorage
|
||||
localStorage.removeItem('sitebuilder-project');
|
||||
localStorage.removeItem('sitebuilder-project-preview');
|
||||
|
||||
// Show success message
|
||||
document.getElementById('successMsg').style.display = 'block';
|
||||
|
||||
// Redirect to editor after 1.5 seconds
|
||||
setTimeout(() => {
|
||||
window.location.href = 'index.html';
|
||||
}, 1500);
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user