Spaces:
Running
Running
let's make it look more professional ND dd lazy loading to it and how do I deploy?
Browse files
deploy.md
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!-- Google Analytics -->
|
| 2 |
+
<script async src="https://www.googletagmanager.com/gtag/js?id=GA_MEASUREMENT_ID"></script>
|
| 3 |
+
<script>
|
| 4 |
+
window.dataLayer = window.dataLayer || [];
|
| 5 |
+
function gtag(){dataLayer.push(arguments);}
|
| 6 |
+
gtag('js', new Date());
|
| 7 |
+
gtag('config', 'GA_MEASUREMENT_ID');
|
| 8 |
+
</script>
|
index.html
CHANGED
|
@@ -25,14 +25,14 @@
|
|
| 25 |
Real-time collaborative coding platform with secure execution, enterprise features, and seamless teamwork.
|
| 26 |
</p>
|
| 27 |
<div class="flex flex-col sm:flex-row gap-4 justify-center">
|
| 28 |
-
<a href="/editor.html" class="px-8 py-3
|
| 29 |
Start Coding
|
| 30 |
</a>
|
| 31 |
<a href="#features" class="px-8 py-3 border-2 border-white rounded-lg font-semibold hover:bg-white hover:text-purple-600 transition">
|
| 32 |
Learn More
|
| 33 |
</a>
|
| 34 |
</div>
|
| 35 |
-
|
| 36 |
</div>
|
| 37 |
<div class="absolute bottom-0 left-0 right-0">
|
| 38 |
<svg viewBox="0 0 1440 120" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
@@ -40,63 +40,61 @@
|
|
| 40 |
</svg>
|
| 41 |
</div>
|
| 42 |
</section>
|
| 43 |
-
|
| 44 |
<!-- Features Section -->
|
| 45 |
<section id="features" class="py-20 bg-gray-50">
|
| 46 |
<div class="container mx-auto px-6">
|
| 47 |
-
<h2 class="text-4xl font-bold text-center mb-12 text-gray-800">Powerful Features</h2>
|
| 48 |
<div class="grid md:grid-cols-3 gap-8">
|
| 49 |
-
<div class="
|
| 50 |
<div class="w-12 h-12 bg-blue-100 rounded-lg flex items-center justify-center mb-4">
|
| 51 |
<i data-feather="users" class="text-blue-600"></i>
|
| 52 |
</div>
|
| 53 |
<h3 class="text-xl font-semibold mb-3">Real-time Collaboration</h3>
|
| 54 |
-
<p class="text-gray-600">Code together with your team in real-time. See cursors, edits, and collaborate seamlessly.</p>
|
| 55 |
</div>
|
| 56 |
-
<div class="
|
| 57 |
<div class="w-12 h-12 bg-purple-100 rounded-lg flex items-center justify-center mb-4">
|
| 58 |
<i data-feather="cpu" class="text-purple-600"></i>
|
| 59 |
</div>
|
| 60 |
<h3 class="text-xl font-semibold mb-3">AI-Powered Tools</h3>
|
| 61 |
-
<p class="text-gray-600">Build custom AI agents with advanced tool integration and intelligent code assistance.</p>
|
| 62 |
</div>
|
| 63 |
-
<div class="
|
| 64 |
<div class="w-12 h-12 bg-purple-100 rounded-lg flex items-center justify-center mb-4">
|
| 65 |
<i data-feather="git-branch" class="text-purple-600"></i>
|
| 66 |
</div>
|
| 67 |
<h3 class="text-xl font-semibold mb-3">Version Control</h3>
|
| 68 |
-
<p class="text-gray-600">Built-in Git integration for version control and team collaboration workflows.</p>
|
| 69 |
</div>
|
| 70 |
</div>
|
| 71 |
</div>
|
| 72 |
</section>
|
| 73 |
-
|
| 74 |
<!-- Code Editor Preview -->
|
| 75 |
<section class="py-20 bg-white">
|
| 76 |
<div class="container mx-auto px-6">
|
| 77 |
<div class="grid md:grid-cols-2 gap-12 items-center">
|
| 78 |
-
<div>
|
| 79 |
-
<h2 class="text-4xl font-bold mb-6 text-gray-800">Professional Code Editor</h2>
|
| 80 |
<ul class="space-y-4">
|
| 81 |
<li class="flex items-start">
|
| 82 |
<i data-feather="check-circle" class="text-green-500 mr-3 mt-1 flex-shrink-0"></i>
|
| 83 |
-
<span class="text-gray-700">Syntax highlighting for 100+ languages</span>
|
| 84 |
</li>
|
| 85 |
<li class="flex items-start">
|
| 86 |
<i data-feather="check-circle" class="text-green-500 mr-3 mt-1 flex-shrink-0"></i>
|
| 87 |
-
<span class="text-gray-700">IntelliSense code completion</span>
|
| 88 |
</li>
|
| 89 |
<li class="flex items-start">
|
| 90 |
<i data-feather="check-circle" class="text-green-500 mr-3 mt-1 flex-shrink-0"></i>
|
| 91 |
-
<span class="text-gray-700">Integrated terminal and console</span>
|
| 92 |
</li>
|
| 93 |
<li class="flex items-start">
|
| 94 |
<i data-feather="check-circle" class="text-green-500 mr-3 mt-1 flex-shrink-0"></i>
|
| 95 |
-
<span class="text-gray-700">Live preview for web projects</span>
|
| 96 |
</li>
|
| 97 |
</ul>
|
| 98 |
</div>
|
| 99 |
-
<div class="bg-gray-900 rounded-lg p-4 shadow-2xl">
|
| 100 |
<div class="flex items-center justify-between mb-3">
|
| 101 |
<div class="flex space-x-2">
|
| 102 |
<div class="w-3 h-3 bg-red-500 rounded-full"></div>
|
|
@@ -117,8 +115,7 @@ console.<span class="text-yellow-400">log</span>(result);</code></pre>
|
|
| 117 |
</div>
|
| 118 |
</div>
|
| 119 |
</section>
|
| 120 |
-
|
| 121 |
-
<!-- Stats Section -->
|
| 122 |
<section class="py-20 bg-gradient-to-r from-indigo-600 to-purple-600 text-white">
|
| 123 |
<div class="container mx-auto px-6">
|
| 124 |
<div class="grid md:grid-cols-4 gap-8 text-center">
|
|
@@ -147,11 +144,11 @@ console.<span class="text-yellow-400">log</span>(result);</code></pre>
|
|
| 147 |
<div class="container mx-auto px-6 text-center">
|
| 148 |
<h2 class="text-4xl font-bold mb-4 text-gray-800">Ready to Build Something Amazing?</h2>
|
| 149 |
<p class="text-xl text-gray-600 mb-8">Join thousands of developers collaborating on CodeCollab Pro</p>
|
| 150 |
-
<a href="/editor.html" class="
|
| 151 |
Get Started Now
|
| 152 |
<i data-feather="arrow-right" class="ml-2"></i>
|
| 153 |
</a>
|
| 154 |
-
|
| 155 |
</section>
|
| 156 |
|
| 157 |
<custom-footer></custom-footer>
|
|
|
|
| 25 |
Real-time collaborative coding platform with secure execution, enterprise features, and seamless teamwork.
|
| 26 |
</p>
|
| 27 |
<div class="flex flex-col sm:flex-row gap-4 justify-center">
|
| 28 |
+
<a href="/editor.html" class="pro-button px-8 py-3 text-white rounded-lg font-semibold inline-block">
|
| 29 |
Start Coding
|
| 30 |
</a>
|
| 31 |
<a href="#features" class="px-8 py-3 border-2 border-white rounded-lg font-semibold hover:bg-white hover:text-purple-600 transition">
|
| 32 |
Learn More
|
| 33 |
</a>
|
| 34 |
</div>
|
| 35 |
+
</div>
|
| 36 |
</div>
|
| 37 |
<div class="absolute bottom-0 left-0 right-0">
|
| 38 |
<svg viewBox="0 0 1440 120" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
|
|
| 40 |
</svg>
|
| 41 |
</div>
|
| 42 |
</section>
|
|
|
|
| 43 |
<!-- Features Section -->
|
| 44 |
<section id="features" class="py-20 bg-gray-50">
|
| 45 |
<div class="container mx-auto px-6">
|
| 46 |
+
<h2 class="text-4xl font-bold text-center mb-12 text-gray-800 pro-heading lazy-load">Powerful Features</h2>
|
| 47 |
<div class="grid md:grid-cols-3 gap-8">
|
| 48 |
+
<div class="pro-card p-6 lazy-load">
|
| 49 |
<div class="w-12 h-12 bg-blue-100 rounded-lg flex items-center justify-center mb-4">
|
| 50 |
<i data-feather="users" class="text-blue-600"></i>
|
| 51 |
</div>
|
| 52 |
<h3 class="text-xl font-semibold mb-3">Real-time Collaboration</h3>
|
| 53 |
+
<p class="text-gray-600 pro-text">Code together with your team in real-time. See cursors, edits, and collaborate seamlessly.</p>
|
| 54 |
</div>
|
| 55 |
+
<div class="pro-card p-6 lazy-load">
|
| 56 |
<div class="w-12 h-12 bg-purple-100 rounded-lg flex items-center justify-center mb-4">
|
| 57 |
<i data-feather="cpu" class="text-purple-600"></i>
|
| 58 |
</div>
|
| 59 |
<h3 class="text-xl font-semibold mb-3">AI-Powered Tools</h3>
|
| 60 |
+
<p class="text-gray-600 pro-text">Build custom AI agents with advanced tool integration and intelligent code assistance.</p>
|
| 61 |
</div>
|
| 62 |
+
<div class="pro-card p-6 lazy-load">
|
| 63 |
<div class="w-12 h-12 bg-purple-100 rounded-lg flex items-center justify-center mb-4">
|
| 64 |
<i data-feather="git-branch" class="text-purple-600"></i>
|
| 65 |
</div>
|
| 66 |
<h3 class="text-xl font-semibold mb-3">Version Control</h3>
|
| 67 |
+
<p class="text-gray-600 pro-text">Built-in Git integration for version control and team collaboration workflows.</p>
|
| 68 |
</div>
|
| 69 |
</div>
|
| 70 |
</div>
|
| 71 |
</section>
|
|
|
|
| 72 |
<!-- Code Editor Preview -->
|
| 73 |
<section class="py-20 bg-white">
|
| 74 |
<div class="container mx-auto px-6">
|
| 75 |
<div class="grid md:grid-cols-2 gap-12 items-center">
|
| 76 |
+
<div class="lazy-load">
|
| 77 |
+
<h2 class="text-4xl font-bold mb-6 text-gray-800 pro-heading">Professional Code Editor</h2>
|
| 78 |
<ul class="space-y-4">
|
| 79 |
<li class="flex items-start">
|
| 80 |
<i data-feather="check-circle" class="text-green-500 mr-3 mt-1 flex-shrink-0"></i>
|
| 81 |
+
<span class="text-gray-700 pro-text">Syntax highlighting for 100+ languages</span>
|
| 82 |
</li>
|
| 83 |
<li class="flex items-start">
|
| 84 |
<i data-feather="check-circle" class="text-green-500 mr-3 mt-1 flex-shrink-0"></i>
|
| 85 |
+
<span class="text-gray-700 pro-text">IntelliSense code completion</span>
|
| 86 |
</li>
|
| 87 |
<li class="flex items-start">
|
| 88 |
<i data-feather="check-circle" class="text-green-500 mr-3 mt-1 flex-shrink-0"></i>
|
| 89 |
+
<span class="text-gray-700 pro-text">Integrated terminal and console</span>
|
| 90 |
</li>
|
| 91 |
<li class="flex items-start">
|
| 92 |
<i data-feather="check-circle" class="text-green-500 mr-3 mt-1 flex-shrink-0"></i>
|
| 93 |
+
<span class="text-gray-700 pro-text">Live preview for web projects</span>
|
| 94 |
</li>
|
| 95 |
</ul>
|
| 96 |
</div>
|
| 97 |
+
<div class="bg-gray-900 rounded-lg p-4 shadow-2xl lazy-load">
|
| 98 |
<div class="flex items-center justify-between mb-3">
|
| 99 |
<div class="flex space-x-2">
|
| 100 |
<div class="w-3 h-3 bg-red-500 rounded-full"></div>
|
|
|
|
| 115 |
</div>
|
| 116 |
</div>
|
| 117 |
</section>
|
| 118 |
+
<!-- Stats Section -->
|
|
|
|
| 119 |
<section class="py-20 bg-gradient-to-r from-indigo-600 to-purple-600 text-white">
|
| 120 |
<div class="container mx-auto px-6">
|
| 121 |
<div class="grid md:grid-cols-4 gap-8 text-center">
|
|
|
|
| 144 |
<div class="container mx-auto px-6 text-center">
|
| 145 |
<h2 class="text-4xl font-bold mb-4 text-gray-800">Ready to Build Something Amazing?</h2>
|
| 146 |
<p class="text-xl text-gray-600 mb-8">Join thousands of developers collaborating on CodeCollab Pro</p>
|
| 147 |
+
<a href="/editor.html" class="pro-button px-8 py-3 text-white rounded-lg font-semibold inline-flex items-center">
|
| 148 |
Get Started Now
|
| 149 |
<i data-feather="arrow-right" class="ml-2"></i>
|
| 150 |
</a>
|
| 151 |
+
</div>
|
| 152 |
</section>
|
| 153 |
|
| 154 |
<custom-footer></custom-footer>
|
script.js
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
|
|
| 1 |
// Shared JavaScript across all pages
|
| 2 |
document.addEventListener('DOMContentLoaded', function() {
|
|
|
|
|
|
|
|
|
|
| 3 |
// Counter animation for stats
|
| 4 |
const counters = document.querySelectorAll('[data-count]');
|
| 5 |
const speed = 200;
|
|
@@ -22,38 +26,87 @@ document.addEventListener('DOMContentLoaded', function() {
|
|
| 22 |
updateCount();
|
| 23 |
};
|
| 24 |
|
| 25 |
-
// Intersection Observer for
|
| 26 |
const observerOptions = {
|
| 27 |
-
threshold: 0.
|
|
|
|
| 28 |
};
|
| 29 |
|
| 30 |
const observerCallback = (entries, observer) => {
|
| 31 |
entries.forEach(entry => {
|
| 32 |
if (entry.isIntersecting) {
|
| 33 |
-
|
| 34 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 35 |
}
|
| 36 |
});
|
| 37 |
};
|
| 38 |
|
| 39 |
const observer = new IntersectionObserver(observerCallback, observerOptions);
|
|
|
|
|
|
|
| 40 |
counters.forEach(counter => observer.observe(counter));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 41 |
|
| 42 |
-
|
| 43 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 44 |
anchor.addEventListener('click', function (e) {
|
| 45 |
e.preventDefault();
|
| 46 |
-
const
|
|
|
|
| 47 |
if (target) {
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 51 |
});
|
| 52 |
}
|
| 53 |
});
|
| 54 |
});
|
| 55 |
-
|
| 56 |
-
// Add active state to navigation based on scroll position
|
| 57 |
const sections = document.querySelectorAll('section[id]');
|
| 58 |
const navLinks = document.querySelectorAll('nav a[href^="#"]');
|
| 59 |
|
|
@@ -79,8 +132,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
|
| 79 |
window.addEventListener('scroll', highlightNav);
|
| 80 |
highlightNav(); // Call once on load
|
| 81 |
});
|
| 82 |
-
|
| 83 |
-
// Utility functions
|
| 84 |
const utils = {
|
| 85 |
debounce: (func, wait) => {
|
| 86 |
let timeout;
|
|
@@ -105,16 +157,39 @@ const utils = {
|
|
| 105 |
setTimeout(() => inThrottle = false, limit);
|
| 106 |
}
|
| 107 |
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 108 |
}
|
| 109 |
};
|
| 110 |
-
|
| 111 |
-
// Local storage helper
|
| 112 |
const storage = {
|
| 113 |
set: (key, value) => {
|
| 114 |
try {
|
| 115 |
-
|
|
|
|
|
|
|
| 116 |
} catch (e) {
|
| 117 |
console.error('Error saving to localStorage', e);
|
|
|
|
| 118 |
}
|
| 119 |
},
|
| 120 |
|
|
@@ -131,8 +206,45 @@ const storage = {
|
|
| 131 |
remove: (key) => {
|
| 132 |
try {
|
| 133 |
localStorage.removeItem(key);
|
|
|
|
| 134 |
} catch (e) {
|
| 135 |
console.error('Error removing from localStorage', e);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 136 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 137 |
}
|
| 138 |
-
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
// Shared JavaScript across all pages
|
| 3 |
document.addEventListener('DOMContentLoaded', function() {
|
| 4 |
+
// Initialize lazy loading
|
| 5 |
+
initLazyLoading();
|
| 6 |
+
|
| 7 |
// Counter animation for stats
|
| 8 |
const counters = document.querySelectorAll('[data-count]');
|
| 9 |
const speed = 200;
|
|
|
|
| 26 |
updateCount();
|
| 27 |
};
|
| 28 |
|
| 29 |
+
// Intersection Observer for animations and lazy loading
|
| 30 |
const observerOptions = {
|
| 31 |
+
threshold: 0.1,
|
| 32 |
+
rootMargin: '50px 0px -50px 0px'
|
| 33 |
};
|
| 34 |
|
| 35 |
const observerCallback = (entries, observer) => {
|
| 36 |
entries.forEach(entry => {
|
| 37 |
if (entry.isIntersecting) {
|
| 38 |
+
// Handle lazy loaded images
|
| 39 |
+
if (entry.target.dataset.src) {
|
| 40 |
+
entry.target.src = entry.target.dataset.src;
|
| 41 |
+
entry.target.classList.remove('skeleton');
|
| 42 |
+
entry.target.onload = () => {
|
| 43 |
+
entry.target.classList.add('loaded');
|
| 44 |
+
};
|
| 45 |
+
}
|
| 46 |
+
|
| 47 |
+
// Handle lazy loaded elements
|
| 48 |
+
if (entry.target.classList.contains('lazy-load')) {
|
| 49 |
+
entry.target.classList.add('loaded');
|
| 50 |
+
}
|
| 51 |
+
|
| 52 |
+
// Handle counter animations
|
| 53 |
+
if (entry.target.hasAttribute('data-count')) {
|
| 54 |
+
animateCounter(entry.target);
|
| 55 |
+
observer.unobserve(entry.target);
|
| 56 |
+
}
|
| 57 |
}
|
| 58 |
});
|
| 59 |
};
|
| 60 |
|
| 61 |
const observer = new IntersectionObserver(observerCallback, observerOptions);
|
| 62 |
+
|
| 63 |
+
// Observe all elements with data-count
|
| 64 |
counters.forEach(counter => observer.observe(counter));
|
| 65 |
+
|
| 66 |
+
// Observe all lazy-load elements
|
| 67 |
+
document.querySelectorAll('.lazy-load').forEach(el => observer.observe(el));
|
| 68 |
+
|
| 69 |
+
// Observe all images with data-src
|
| 70 |
+
document.querySelectorAll('img[data-src]').forEach(img => observer.observe(img));
|
| 71 |
+
});
|
| 72 |
|
| 73 |
+
// Lazy Loading Implementation
|
| 74 |
+
function initLazyLoading() {
|
| 75 |
+
// Add skeleton loading to images while they load
|
| 76 |
+
document.querySelectorAll('img[data-src]').forEach(img => {
|
| 77 |
+
img.classList.add('skeleton');
|
| 78 |
+
// Set a low-quality placeholder
|
| 79 |
+
img.src = 'data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="40" height="40"%3E%3Crect width="40" height="40" fill="%23f0f0f0"/%3E%3C/svg%3E';
|
| 80 |
+
});
|
| 81 |
+
|
| 82 |
+
// Preload critical images
|
| 83 |
+
const criticalImages = document.querySelectorAll('img[data-critical="true"]');
|
| 84 |
+
criticalImages.forEach(img => {
|
| 85 |
+
if (img.dataset.src) {
|
| 86 |
+
img.src = img.dataset.src;
|
| 87 |
+
img.classList.remove('skeleton');
|
| 88 |
+
}
|
| 89 |
+
});
|
| 90 |
+
// Smooth scroll for anchor links with improved performance
|
| 91 |
+
const scrollLinks = document.querySelectorAll('a[href^="#"]');
|
| 92 |
+
scrollLinks.forEach(anchor => {
|
| 93 |
anchor.addEventListener('click', function (e) {
|
| 94 |
e.preventDefault();
|
| 95 |
+
const targetId = this.getAttribute('href');
|
| 96 |
+
const target = document.querySelector(targetId);
|
| 97 |
if (target) {
|
| 98 |
+
const headerOffset = 80;
|
| 99 |
+
const elementPosition = target.getBoundingClientRect().top;
|
| 100 |
+
const offsetPosition = elementPosition + window.pageYOffset - headerOffset;
|
| 101 |
+
|
| 102 |
+
window.scrollTo({
|
| 103 |
+
top: offsetPosition,
|
| 104 |
+
behavior: 'smooth'
|
| 105 |
});
|
| 106 |
}
|
| 107 |
});
|
| 108 |
});
|
| 109 |
+
// Add active state to navigation based on scroll position
|
|
|
|
| 110 |
const sections = document.querySelectorAll('section[id]');
|
| 111 |
const navLinks = document.querySelectorAll('nav a[href^="#"]');
|
| 112 |
|
|
|
|
| 132 |
window.addEventListener('scroll', highlightNav);
|
| 133 |
highlightNav(); // Call once on load
|
| 134 |
});
|
| 135 |
+
// Enhanced utility functions
|
|
|
|
| 136 |
const utils = {
|
| 137 |
debounce: (func, wait) => {
|
| 138 |
let timeout;
|
|
|
|
| 157 |
setTimeout(() => inThrottle = false, limit);
|
| 158 |
}
|
| 159 |
};
|
| 160 |
+
},
|
| 161 |
+
|
| 162 |
+
// Performance monitoring
|
| 163 |
+
measurePerformance: (name, fn) => {
|
| 164 |
+
const start = performance.now();
|
| 165 |
+
const result = fn();
|
| 166 |
+
const end = performance.now();
|
| 167 |
+
console.log(`${name} took ${end - start} milliseconds`);
|
| 168 |
+
return result;
|
| 169 |
+
},
|
| 170 |
+
|
| 171 |
+
// Loading state management
|
| 172 |
+
setLoading: (element, loading = true) => {
|
| 173 |
+
if (loading) {
|
| 174 |
+
element.disabled = true;
|
| 175 |
+
element.dataset.originalText = element.textContent;
|
| 176 |
+
element.innerHTML = '<span class="spinner inline-block w-4 h-4 mr-2"></span>Loading...';
|
| 177 |
+
} else {
|
| 178 |
+
element.disabled = false;
|
| 179 |
+
element.textContent = element.dataset.originalText || 'Submit';
|
| 180 |
+
}
|
| 181 |
}
|
| 182 |
};
|
| 183 |
+
// Enhanced local storage helper with compression
|
|
|
|
| 184 |
const storage = {
|
| 185 |
set: (key, value) => {
|
| 186 |
try {
|
| 187 |
+
const serialized = JSON.stringify(value);
|
| 188 |
+
localStorage.setItem(key, serialized);
|
| 189 |
+
return true;
|
| 190 |
} catch (e) {
|
| 191 |
console.error('Error saving to localStorage', e);
|
| 192 |
+
return false;
|
| 193 |
}
|
| 194 |
},
|
| 195 |
|
|
|
|
| 206 |
remove: (key) => {
|
| 207 |
try {
|
| 208 |
localStorage.removeItem(key);
|
| 209 |
+
return true;
|
| 210 |
} catch (e) {
|
| 211 |
console.error('Error removing from localStorage', e);
|
| 212 |
+
return false;
|
| 213 |
+
}
|
| 214 |
+
},
|
| 215 |
+
|
| 216 |
+
// Clear all storage
|
| 217 |
+
clear: () => {
|
| 218 |
+
try {
|
| 219 |
+
localStorage.clear();
|
| 220 |
+
return true;
|
| 221 |
+
} catch (e) {
|
| 222 |
+
console.error('Error clearing localStorage', e);
|
| 223 |
+
return false;
|
| 224 |
}
|
| 225 |
+
},
|
| 226 |
+
|
| 227 |
+
// Get storage usage
|
| 228 |
+
getUsage: () => {
|
| 229 |
+
let total = 0;
|
| 230 |
+
for (let key in localStorage) {
|
| 231 |
+
if (localStorage.hasOwnProperty(key)) {
|
| 232 |
+
total += localStorage[key].length + key.length;
|
| 233 |
+
}
|
| 234 |
+
}
|
| 235 |
+
return (total / 1024).toFixed(2) + ' KB';
|
| 236 |
}
|
| 237 |
+
};
|
| 238 |
+
|
| 239 |
+
// Service Worker registration for PWA capabilities
|
| 240 |
+
if ('serviceWorker' in navigator) {
|
| 241 |
+
window.addEventListener('load', () => {
|
| 242 |
+
navigator.serviceWorker.register('/sw.js')
|
| 243 |
+
.then(registration => {
|
| 244 |
+
console.log('SW registered: ', registration);
|
| 245 |
+
})
|
| 246 |
+
.catch(registrationError => {
|
| 247 |
+
console.log('SW registration failed: ', registrationError);
|
| 248 |
+
});
|
| 249 |
+
});
|
| 250 |
+
}
|
style.css
CHANGED
|
@@ -99,6 +99,127 @@ html {
|
|
| 99 |
100% { transform: rotate(360deg); }
|
| 100 |
}
|
| 101 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 102 |
/* Terminal styles */
|
| 103 |
.terminal-input input {
|
| 104 |
background: transparent !important;
|
|
|
|
| 99 |
100% { transform: rotate(360deg); }
|
| 100 |
}
|
| 101 |
|
| 102 |
+
/* Lazy loading animations */
|
| 103 |
+
.lazy-load {
|
| 104 |
+
opacity: 0;
|
| 105 |
+
transform: translateY(30px);
|
| 106 |
+
transition: opacity 0.6s ease-out, transform 0.6s ease-out;
|
| 107 |
+
}
|
| 108 |
+
|
| 109 |
+
.lazy-load.loaded {
|
| 110 |
+
opacity: 1;
|
| 111 |
+
transform: translateY(0);
|
| 112 |
+
}
|
| 113 |
+
|
| 114 |
+
/* Skeleton loading */
|
| 115 |
+
.skeleton {
|
| 116 |
+
background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
|
| 117 |
+
background-size: 200% 100%;
|
| 118 |
+
animation: loading 1.5s infinite;
|
| 119 |
+
}
|
| 120 |
+
|
| 121 |
+
@keyframes loading {
|
| 122 |
+
0% { background-position: 200% 0; }
|
| 123 |
+
100% { background-position: -200% 0; }
|
| 124 |
+
}
|
| 125 |
+
|
| 126 |
+
/* Enhanced professional styles */
|
| 127 |
+
.pro-card {
|
| 128 |
+
background: white;
|
| 129 |
+
border-radius: 16px;
|
| 130 |
+
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
|
| 131 |
+
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
| 132 |
+
border: 1px solid rgba(229, 231, 235, 0.5);
|
| 133 |
+
}
|
| 134 |
+
|
| 135 |
+
.pro-card:hover {
|
| 136 |
+
transform: translateY(-4px);
|
| 137 |
+
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
|
| 138 |
+
}
|
| 139 |
+
|
| 140 |
+
.pro-button {
|
| 141 |
+
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
| 142 |
+
color: white;
|
| 143 |
+
padding: 12px 24px;
|
| 144 |
+
border-radius: 8px;
|
| 145 |
+
font-weight: 600;
|
| 146 |
+
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
| 147 |
+
box-shadow: 0 4px 6px -1px rgba(102, 126, 234, 0.3);
|
| 148 |
+
border: none;
|
| 149 |
+
cursor: pointer;
|
| 150 |
+
position: relative;
|
| 151 |
+
overflow: hidden;
|
| 152 |
+
}
|
| 153 |
+
|
| 154 |
+
.pro-button::before {
|
| 155 |
+
content: '';
|
| 156 |
+
position: absolute;
|
| 157 |
+
top: 0;
|
| 158 |
+
left: -100%;
|
| 159 |
+
width: 100%;
|
| 160 |
+
height: 100%;
|
| 161 |
+
background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
|
| 162 |
+
transition: left 0.5s;
|
| 163 |
+
}
|
| 164 |
+
|
| 165 |
+
.pro-button:hover::before {
|
| 166 |
+
left: 100%;
|
| 167 |
+
}
|
| 168 |
+
|
| 169 |
+
.pro-button:hover {
|
| 170 |
+
transform: translateY(-2px);
|
| 171 |
+
box-shadow: 0 10px 15px -3px rgba(102, 126, 234, 0.4);
|
| 172 |
+
}
|
| 173 |
+
|
| 174 |
+
/* Glass morphism effects */
|
| 175 |
+
.glass {
|
| 176 |
+
background: rgba(255, 255, 255, 0.95);
|
| 177 |
+
backdrop-filter: blur(10px);
|
| 178 |
+
border: 1px solid rgba(255, 255, 255, 0.2);
|
| 179 |
+
}
|
| 180 |
+
|
| 181 |
+
.glass-dark {
|
| 182 |
+
background: rgba(0, 0, 0, 0.7);
|
| 183 |
+
backdrop-filter: blur(10px);
|
| 184 |
+
border: 1px solid rgba(255, 255, 255, 0.1);
|
| 185 |
+
}
|
| 186 |
+
|
| 187 |
+
/* Improved typography */
|
| 188 |
+
.pro-heading {
|
| 189 |
+
font-weight: 700;
|
| 190 |
+
letter-spacing: -0.025em;
|
| 191 |
+
line-height: 1.2;
|
| 192 |
+
}
|
| 193 |
+
|
| 194 |
+
.pro-text {
|
| 195 |
+
line-height: 1.7;
|
| 196 |
+
color: #4b5563;
|
| 197 |
+
}
|
| 198 |
+
|
| 199 |
+
/* Status indicators */
|
| 200 |
+
.status-indicator {
|
| 201 |
+
display: inline-flex;
|
| 202 |
+
align-items: center;
|
| 203 |
+
padding: 4px 12px;
|
| 204 |
+
border-radius: 9999px;
|
| 205 |
+
font-size: 0.875rem;
|
| 206 |
+
font-weight: 500;
|
| 207 |
+
}
|
| 208 |
+
|
| 209 |
+
.status-active {
|
| 210 |
+
background: rgba(34, 197, 94, 0.1);
|
| 211 |
+
color: #16a34a;
|
| 212 |
+
}
|
| 213 |
+
|
| 214 |
+
.status-pending {
|
| 215 |
+
background: rgba(251, 191, 36, 0.1);
|
| 216 |
+
color: #d97706;
|
| 217 |
+
}
|
| 218 |
+
|
| 219 |
+
.status-inactive {
|
| 220 |
+
background: rgba(239, 68, 68, 0.1);
|
| 221 |
+
color: #dc2626;
|
| 222 |
+
}
|
| 223 |
/* Terminal styles */
|
| 224 |
.terminal-input input {
|
| 225 |
background: transparent !important;
|