summaryrefslogtreecommitdiff
path: root/static/script.js
diff options
context:
space:
mode:
authorRobby Zambito <contact@robbyzambito.me>2025-08-02 19:06:42 -0400
committerRobby Zambito <contact@robbyzambito.me>2025-08-02 19:07:06 -0400
commit1ac73ff7cae110f9d0b1aa0bf62283b6d2e26022 (patch)
treecc1451560dbe84f573135aec2c6f92fec25b58d7 /static/script.js
parentb3c85a763f719d62c1fbce8cff90712e35d70b86 (diff)
Replaced index with generated landing
The generated index had a fake logged in interface. The generated landing page is more appropriate. We don't need a logged in page, because the entire exploit should work without needing to be logged in.
Diffstat (limited to 'static/script.js')
-rw-r--r--static/script.js157
1 files changed, 101 insertions, 56 deletions
diff --git a/static/script.js b/static/script.js
index 9219098..1189cd4 100644
--- a/static/script.js
+++ b/static/script.js
@@ -39,49 +39,19 @@ window.addEventListener('scroll', () => {
}
});
-// User profile dropdown simulation
-const userProfile = document.querySelector('.user-profile');
-if (userProfile) {
- userProfile.addEventListener('click', () => {
- alert('User menu would open here with options like:\n• Profile Settings\n• Account Preferences\n• Logout');
- });
-}
-
-// Notification icon click
-const notificationIcon = document.querySelector('.notification-icon');
-if (notificationIcon) {
- notificationIcon.addEventListener('click', () => {
- alert('Notifications:\n• Sarah completed "UI Design"\n• New comment on "Backend API"\n• Project deadline approaching');
- });
-}
-
-// Project card interactions
-document.querySelectorAll('.project-card').forEach(card => {
- card.addEventListener('click', () => {
- const projectName = card.querySelector('h3').textContent;
- alert(`Opening project: ${projectName}\n\nThis would navigate to the detailed project view.`);
- });
-});
-
-// Team member interactions
-document.querySelectorAll('.team-member').forEach(member => {
- member.addEventListener('click', () => {
- const memberName = member.querySelector('h3').textContent;
- alert(`Opening profile for: ${memberName}\n\nThis would show detailed team member information.`);
- });
-});
-
-// Button click handlers
+// CTA button handlers
document.querySelectorAll('.btn').forEach(btn => {
btn.addEventListener('click', (e) => {
- const buttonText = btn.textContent;
-
- if (buttonText.includes('Create') || buttonText.includes('New')) {
- e.stopPropagation();
- alert(`${buttonText} functionality would open here.\n\nThis would typically open a modal or navigate to a creation form.`);
- } else if (buttonText.includes('View')) {
- e.stopPropagation();
- alert(`${buttonText} functionality would open here.\n\nThis would navigate to a detailed view or listing page.`);
+ const buttonText = btn.textContent.toLowerCase();
+
+ if (buttonText.includes('sign in') || buttonText.includes('login')) {
+ alert('Redirecting to login page...\n\nThis would navigate to the sign-in form.');
+ } else if (buttonText.includes('trial') || buttonText.includes('start')) {
+ alert('Starting your free trial!\n\nThis would open the registration form with a 14-day trial.');
+ } else if (buttonText.includes('demo') || buttonText.includes('watch')) {
+ alert('Opening demo video...\n\nThis would show a product demonstration or schedule a live demo.');
+ } else if (buttonText.includes('contact') || buttonText.includes('sales')) {
+ alert('Contacting sales team...\n\nThis would open a contact form or calendar booking widget.');
}
});
});
@@ -102,21 +72,22 @@ const observer = new IntersectionObserver((entries) => {
}, observerOptions);
// Observe elements for animation
-document.querySelectorAll('.project-card, .team-member, .report-card, .stat-card').forEach(el => {
+document.querySelectorAll('.feature-card, .testimonial-card, .pricing-card').forEach(el => {
el.style.opacity = '0';
el.style.transform = 'translateY(30px)';
el.style.transition = 'opacity 0.6s ease, transform 0.6s ease';
observer.observe(el);
});
-// Hero section fade-in animation
+// Hero section animations
window.addEventListener('load', () => {
const heroTitle = document.querySelector('.hero-title');
const heroSubtitle = document.querySelector('.hero-subtitle');
- const quickStats = document.querySelector('.quick-stats');
const heroButtons = document.querySelector('.hero-buttons');
+ const heroStats = document.querySelector('.hero-stats');
+ const dashboardMockup = document.querySelector('.dashboard-mockup');
- [heroTitle, heroSubtitle, quickStats, heroButtons].forEach((element, index) => {
+ [heroTitle, heroSubtitle, heroButtons, heroStats].forEach((element, index) => {
if (element) {
element.style.opacity = '0';
element.style.transform = 'translateY(30px)';
@@ -125,22 +96,50 @@ window.addEventListener('load', () => {
setTimeout(() => {
element.style.opacity = '1';
element.style.transform = 'translateY(0)';
- }, 300 + (index * 200));
+ }, 200 + (index * 200));
}
});
-});
-// Simulate real-time updates
-setInterval(() => {
- const activityItems = document.querySelectorAll('.activity-item');
- if (activityItems.length > 0) {
- const randomItem = activityItems[Math.floor(Math.random() * activityItems.length)];
- randomItem.style.background = '#f0f9ff';
+ // Dashboard mockup animation
+ if (dashboardMockup) {
+ dashboardMockup.style.opacity = '0';
+ dashboardMockup.style.transform = 'perspective(1000px) rotateY(-25deg) rotateX(15deg) translateY(50px)';
+ dashboardMockup.style.transition = 'opacity 1s ease, transform 1s ease';
+
setTimeout(() => {
- randomItem.style.background = 'transparent';
- }, 2000);
+ dashboardMockup.style.opacity = '1';
+ dashboardMockup.style.transform = 'perspective(1000px) rotateY(-15deg) rotateX(10deg) translateY(0)';
+ }, 800);
}
-}, 10000);
+});
+
+// Pricing card hover effects
+document.querySelectorAll('.pricing-card').forEach(card => {
+ card.addEventListener('mouseenter', () => {
+ if (!card.classList.contains('featured')) {
+ card.style.transform = 'translateY(-10px)';
+ }
+ });
+
+ card.addEventListener('mouseleave', () => {
+ if (!card.classList.contains('featured')) {
+ card.style.transform = 'translateY(0)';
+ }
+ });
+});
+
+// Company logo hover effects
+document.querySelectorAll('.company-logo').forEach(logo => {
+ logo.addEventListener('mouseenter', () => {
+ logo.style.opacity = '1';
+ logo.style.transform = 'scale(1.1)';
+ });
+
+ logo.addEventListener('mouseleave', () => {
+ logo.style.opacity = '0.6';
+ logo.style.transform = 'scale(1)';
+ });
+});
// Add mobile menu styles dynamically
const style = document.createElement('style');
@@ -173,3 +172,49 @@ style.textContent = `
}
`;
document.head.appendChild(style);
+
+// Simulate dynamic stats counter
+const animateStats = () => {
+ const statNumbers = document.querySelectorAll('.stat-item strong');
+ const targets = ['10,000+', '500K+', '99.9%'];
+
+ statNumbers.forEach((stat, index) => {
+ const target = targets[index];
+ let current = 0;
+ const increment = target.includes('K') ? 5000 : target.includes('%') ? 1 : 100;
+ const max = target.includes('K') ? 500000 : target.includes('%') ? 99.9 : 10000;
+
+ const updateStat = () => {
+ if (current < max) {
+ current += increment;
+ if (target.includes('K')) {
+ stat.textContent = Math.floor(current / 1000) + 'K+';
+ } else if (target.includes('%')) {
+ stat.textContent = (current / 10).toFixed(1) + '%';
+ } else {
+ stat.textContent = current.toLocaleString() + '+';
+ }
+ setTimeout(updateStat, 50);
+ } else {
+ stat.textContent = target;
+ }
+ };
+
+ setTimeout(updateStat, 1000 + (index * 200));
+ });
+};
+
+// Trigger stats animation when hero is visible
+const heroObserver = new IntersectionObserver((entries) => {
+ entries.forEach(entry => {
+ if (entry.isIntersecting) {
+ animateStats();
+ heroObserver.unobserve(entry.target);
+ }
+ });
+});
+
+const heroSection = document.querySelector('.hero');
+if (heroSection) {
+ heroObserver.observe(heroSection);
+}