Triangles are a versatile and dynamic design element that can add depth and interest to any background. Whether you're looking for a subtle geometric pattern or a bold statement piece, triangles offer endless possibilities.
In this article, we'll explore ten stunning examples of triangle backgrounds that can elevate your design projects. From minimalist to intricate designs, these examples will inspire you to incorporate triangles into your next creative endeavor.
CODE1
Here's the code:
CODETEXT1
CODE2
Here's the code:
CODETEXT2
CODE3
Here's the code:
CODETEXT3
CODE4
Here's the code:
CODETEXT4
CODE5
Here's the code:
CODETEXT5
Subframe's drag-and-drop interface and intuitive, responsive canvas make designing your own triangle background a breeze. Loved by designers and developers alike, it ensures pixel-perfect UI every time.
Start for free and elevate your design projects with Subframe today!
CODE6
Here's the code:
CODETEXT6
CODE7
Here's the code:
CODETEXT7
CODE8
Here's the code:
CODETEXT8
CODE9
Here's the code:
CODETEXT9
CODE10
Here's the code:
CODETEXT10
Ready to elevate your design projects? With Subframe, you can create stunning UIs, including intricate Triangle Backgrounds, with unmatched efficiency. Our drag-and-drop editor ensures pixel-perfect results every time.
Don't wait—start creating beautiful designs immediately. Start for free and experience the power of Subframe today!
<html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>TechSphere | Enterprise Solutions</title> <style> :root { --primary: #2A4494; --secondary: #4D7BCA; --accent: #5CBDB9; --dark: #1A2237; --light: #F8FBFE; --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1); } * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; } body { background-color: var(--light); color: var(--dark); overflow-x: hidden; height: 100vh; width: 100%; } .container { max-width: 700px; margin: 0 auto; padding: 0 1rem; height: 700px; position: relative; overflow-y: auto; overflow-x: hidden; scroll-behavior: smooth; } header { display: flex; justify-content: space-between; align-items: center; padding: 1.5rem 0; position: sticky; top: 0; z-index: 100; background-color: rgba(248, 251, 254, 0.8); backdrop-filter: blur(10px); } .logo { font-weight: 800; font-size: 1.5rem; color: var(--primary); position: relative; z-index: 2; } .logo span { color: var(--accent); } .nav-links { display: flex; gap: 1.5rem; } .nav-link { text-decoration: none; color: var(--dark); font-weight: 500; font-size: 0.9rem; position: relative; transition: var(--transition); } .nav-link:hover { color: var(--primary); } .nav-link::after { content: ''; position: absolute; bottom: -5px; left: 0; width: 0; height: 2px; background-color: var(--accent); transition: var(--transition); } .nav-link:hover::after { width: 100%; } .geometric-background { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; overflow: hidden; } .triangle { position: absolute; background: linear-gradient(135deg, rgba(42, 68, 148, 0.1), rgba(77, 123, 202, 0.15)); border: 1px solid rgba(92, 189, 185, 0.2); transition: var(--transition); transform-origin: center; box-shadow: 0 10px 30px rgba(26, 34, 55, 0.05); } .hero { height: calc(100vh - 5rem); max-height: 500px; display: flex; flex-direction: column; justify-content: center; position: relative; overflow: hidden; } .hero-content { max-width: 550px; position: relative; z-index: 2; } h1 { font-size: 2.8rem; font-weight: 800; margin-bottom: 1.5rem; line-height: 1.2; background: linear-gradient(135deg, var(--primary), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; position: relative; } h1::before { content: ''; position: absolute; width: 60px; height: 5px; background: linear-gradient(90deg, var(--accent), transparent); top: -15px; left: 0; border-radius: 5px; } .hero p { margin-bottom: 2rem; font-size: 1.1rem; line-height: 1.6; color: rgba(26, 34, 55, 0.8); } .cta-buttons { display: flex; gap: 1rem; flex-wrap: wrap; } .btn { padding: 0.8rem 1.8rem; border-radius: 50px; font-weight: 600; font-size: 0.9rem; cursor: pointer; transition: var(--transition); text-decoration: none; display: inline-flex; align-items: center; justify-content: center; outline: none; border: none; position: relative; overflow: hidden; } .btn-primary { background: linear-gradient(135deg, var(--primary), var(--secondary)); color: white; box-shadow: 0 4px 15px rgba(42, 68, 148, 0.3); } .btn-secondary { background: transparent; color: var(--primary); border: 2px solid var(--primary); } .btn-primary:hover { transform: translateY(-3px); box-shadow: 0 8px 25px rgba(42, 68, 148, 0.4); } .btn-secondary:hover { background-color: rgba(42, 68, 148, 0.1); transform: translateY(-3px); } .btn::before { content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%; background: linear-gradient( 90deg, transparent, rgba(255, 255, 255, 0.2), transparent ); transition: all 0.6s; } .btn:hover::before { left: 100%; } .features { padding: 3rem 0; position: relative; } .features-title { text-align: center; margin-bottom: 3rem; font-size: 1.8rem; color: var(--primary); position: relative; } .features-title::after { content: ''; position: absolute; bottom: -10px; left: 50%; transform: translateX(-50%); width: 60px; height: 3px; background: linear-gradient(90deg, var(--accent), var(--primary)); border-radius: 5px; } .feature-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.5rem; } .feature-card { background: white; border-radius: 15px; padding: 1.5rem; box-shadow: 0 10px 30px rgba(26, 34, 55, 0.05); transition: var(--transition); position: relative; border: 1px solid rgba(77, 123, 202, 0.1); overflow: hidden; z-index: 1; } .feature-card::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(135deg, rgba(92, 189, 185, 0.08), rgba(42, 68, 148, 0.04)); z-index: -1; transform: scaleX(0); transform-origin: right; transition: transform 0.5s cubic-bezier(0.165, 0.84, 0.44, 1); } .feature-card:hover { transform: translateY(-5px); box-shadow: 0 15px 35px rgba(26, 34, 55, 0.08); border-color: rgba(92, 189, 185, 0.3); } .feature-card:hover::before { transform: scaleX(1); transform-origin: left; } .feature-icon { width: 50px; height: 50px; border-radius: 12px; display: flex; align-items: center; justify-content: center; margin-bottom: 1rem; background: linear-gradient(135deg, rgba(92, 189, 185, 0.2), rgba(42, 68, 148, 0.1)); color: var(--primary); font-size: 1.5rem; } .feature-card h3 { margin-bottom: 0.8rem; font-size: 1.1rem; color: var(--primary); } .feature-card p { font-size: 0.9rem; color: rgba(26, 34, 55, 0.7); line-height: 1.5; } footer { padding: 2rem 0 1rem; text-align: center; color: rgba(26, 34, 55, 0.6); font-size: 0.8rem; } @media (max-width: 768px) { h1 { font-size: 2.2rem; } .hero p { font-size: 1rem; } .feature-cards { grid-template-columns: 1fr; } .nav-links { gap: 1rem; } } /* Scroll indicator */ .scroll-indicator { position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%); width: 30px; height: 50px; border: 2px solid var(--primary); border-radius: 20px; display: flex; justify-content: center; padding-top: 10px; opacity: 0.6; } .scroll-dot { width: 6px; height: 6px; background-color: var(--primary); border-radius: 50%; animation: scrollAnimation 1.5s infinite; } @keyframes scrollAnimation { 0% { transform: translateY(0); opacity: 1; } 100% { transform: translateY(15px); opacity: 0; } } /* Cursor effect */ .cursor-effect { position: fixed; width: 40px; height: 40px; border: 2px solid var(--accent); border-radius: 50%; transform: translate(-50%, -50%); pointer-events: none; transition: width 0.3s, height 0.3s, border-color 0.3s; z-index: 9999; opacity: 0; } /* Scrollbar styling */ ::-webkit-scrollbar { width: 8px; } ::-webkit-scrollbar-track { background: rgba(248, 251, 254, 0.8); } ::-webkit-scrollbar-thumb { background: var(--secondary); border-radius: 10px; } ::-webkit-scrollbar-thumb:hover { background: var(--primary); } </style> </head> <body> <div class="geometric-background" id="geometric-bg"></div> <div class="cursor-effect" id="cursor-effect"></div> <div class="container"> <header> <div class="logo">Tech<span>Sphere</span></div> <div class="nav-links"> <a href="#" class="nav-link">Solutions</a> <a href="#" class="nav-link">Products</a> <a href="#" class="nav-link">About</a> <a href="#" class="nav-link">Contact</a> </div> </header> <section class="hero"> <div class="hero-content"> <h1>Enterprise Technology That Shapes Tomorrow</h1> <p>Our geometric approach to enterprise solutions creates interlocking systems that adapt and scale with your business needs. Experience architecture that evolves with you.</p> <div class="cta-buttons"> <button class="btn btn-primary">Explore Solutions</button> <button class="btn btn-secondary">Watch Demo</button> </div> </div> <div class="scroll-indicator"> <div class="scroll-dot"></div> </div> </section> <section class="features"> <h2 class="features-title">Core Capabilities</h2> <div class="feature-cards"> <div class="feature-card"> <div class="feature-icon"> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polygon points="12 2 2 7 12 12 22 7 12 2"></polygon><polyline points="2 17 12 22 22 17"></polyline><polyline points="2 12 12 17 22 12"></polyline></svg> </div> <h3>Layered Architecture</h3> <p>Multi-dimensional technology stacks that create efficient hierarchies and seamless integrations.</p> </div> <div class="feature-card"> <div class="feature-icon"> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"></path><polyline points="7.5 4.21 12 6.81 16.5 4.21"></polyline><polyline points="7.5 19.79 7.5 14.6 3 12"></polyline><polyline points="21 12 16.5 14.6 16.5 19.79"></polyline><polyline points="3.27 6.96 12 12.01 20.73 6.96"></polyline><line x1="12" y1="22.08" x2="12" y2="12"></line></svg> </div> <h3>Interlocking Systems</h3> <p>Component-based solutions that connect perfectly and scale modularly with your business growth.</p> </div> <div class="feature-card"> <div class="feature-icon"> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"></circle><path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"></path><line x1="12" y1="17" x2="12.01" y2="17"></line></svg> </div> <h3>Adaptive Intelligence</h3> <p>Smart technologies that respond to usage patterns and optimize performance organically.</p> </div> </div> </section> <footer> <p>© 2023 TechSphere Enterprise Solutions. All technology components interlocked by design.</p> </footer> </div> <script> // Create geometric background function createTriangles() { const container = document.getElementById('geometric-bg'); container.innerHTML = ''; const containerWidth = container.offsetWidth; const containerHeight = container.offsetHeight; // Calculate number of triangles based on screen size const triangleCount = Math.floor((containerWidth * containerHeight) / 15000); for (let i = 0; i < triangleCount; i++) { const triangle = document.createElement('div'); triangle.classList.add('triangle'); // Randomize size const size = Math.random() * 150 + 50; // Create triangle shape with clip-path triangle.style.clipPath = 'polygon(50% 0%, 0% 100%, 100% 100%)'; // Randomize position const posX = Math.random() * 100; const posY = Math.random() * 100; triangle.style.width = `${size}px`; triangle.style.height = `${size}px`; triangle.style.left = `${posX}%`; triangle.style.top = `${posY}%`; // Randomize rotation const rotation = Math.random() * 360; triangle.style.transform = `rotate(${rotation}deg)`; // Randomize opacity const opacity = Math.random() * 0.5 + 0.1; triangle.style.opacity = opacity; container.appendChild(triangle); } } // Parallax effect function handleScroll() { const triangles = document.querySelectorAll('.triangle'); const scrollY = window.scrollY || document.documentElement.scrollTop; triangles.forEach((triangle, index) => { const speed = 0.05 + (index % 3) * 0.02; const yPos = -scrollY * speed; triangle.style.transform = `${triangle.style.transform.split('translateY')[0]} translateY(${yPos}px)`; }); } // Cursor effect function handleMouseMove(e) { const cursor = document.getElementById('cursor-effect'); cursor.style.opacity = '1'; cursor.style.left = `${e.clientX}px`; cursor.style.top = `${e.clientY}px`; // Check if cursor is over interactive elements const isOverInteractive = e.target.classList.contains('btn') || e.target.classList.contains('nav-link') || e.target.closest('.feature-card'); if (isOverInteractive) { cursor.style.width = '60px'; cursor.style.height = '60px'; cursor.style.borderColor = 'var(--primary)'; } else { cursor.style.width = '40px'; cursor.style.height = '40px'; cursor.style.borderColor = 'var(--accent)'; } } // Hide cursor effect when mouse leaves window function handleMouseLeave() { const cursor = document.getElementById('cursor-effect'); cursor.style.opacity = '0'; } // Animate triangles on hover function animateTriangles() { const triangles = document.querySelectorAll('.triangle'); triangles.forEach(triangle => { // Random slight rotation const currentRotation = triangle.style.transform.match(/rotate\(([^)]+)\)/) || ['', '0deg']; const baseRotation = parseFloat(currentRotation[1]); const newRotation = baseRotation + (Math.random() * 2 - 1); triangle.style.transform = triangle.style.transform.replace( /rotate\([^)]+\)/, `rotate(${newRotation}deg)` ); }); } // Initialize and add event listeners window.addEventListener('load', () => { createTriangles(); // Re-create triangles on resize for responsiveness window.addEventListener('resize', createTriangles); // Scroll effect window.addEventListener('scroll', handleScroll); // Cursor effect document.addEventListener('mousemove', handleMouseMove); document.addEventListener('mouseleave', handleMouseLeave); // Animate triangles periodically setInterval(animateTriangles, 3000); // Button hover effects document.querySelectorAll('.btn').forEach(btn => { btn.addEventListener('mouseenter', () => { btn.style.transform = 'translateY(-3px)'; }); btn.addEventListener('mouseleave', () => { btn.style.transform = 'translateY(0)'; }); }); // Scroll indicator click scrolls to features document.querySelector('.scroll-indicator').addEventListener('click', () => { document.querySelector('.features').scrollIntoView({ behavior: 'smooth' }); }); }); // Form submission prevention for any future forms document.addEventListener('submit', (e) => { e.preventDefault(); const submitBtn = e.target.querySelector('[type="submit"]'); if (submitBtn) { submitBtn.innerHTML = 'Submitted ✓'; setTimeout(() => { submitBtn.innerHTML = submitBtn.getAttribute('data-original-text') || 'Submit'; }, 2000); } }); </script> </body> </html>
<html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Trianglio App Splash Screen</title> <style> * { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: 'Segoe UI', Roboto, sans-serif; overflow: hidden; background: #f8f9fa; display: flex; justify-content: center; align-items: center; height: 100vh; width: 100%; } .splash-container { position: relative; width: 100%; height: 100%; max-width: 700px; max-height: 700px; display: flex; flex-direction: column; justify-content: center; align-items: center; overflow: hidden; } .triangle-container { position: absolute; width: 100%; height: 100%; transform-style: preserve-3d; perspective: 1000px; z-index: 1; } .triangle { position: absolute; clip-path: polygon(50% 0%, 0% 100%, 100% 100%); opacity: 0; transform: scale(0) rotate(0deg); transition: transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.8s ease; } .app-info { position: relative; z-index: 2; text-align: center; color: white; padding: 20px; border-radius: 16px; background: rgba(255, 255, 255, 0.15); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, 0.2); max-width: 80%; transform: translateY(50px); opacity: 0; transition: transform 1.2s cubic-bezier(0.17, 0.67, 0.83, 0.67), opacity 1.2s ease; } .app-title { font-size: 3rem; font-weight: 700; margin-bottom: 10px; background: linear-gradient(135deg, #fff, #e0e0e0); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: 0 1px 8px rgba(0,0,0,0.1); } .app-tagline { font-size: 1.2rem; margin-bottom: 25px; line-height: 1.4; } .app-description { font-size: 0.9rem; opacity: 0.9; margin-bottom: 30px; line-height: 1.6; } .loader { width: 180px; height: 4px; background: rgba(255,255,255,0.2); border-radius: 8px; overflow: hidden; margin: 0 auto; position: relative; } .loader-progress { height: 100%; width: 0%; background: linear-gradient(90deg, #ffb8d1, #ffecb3, #b8e0d2); border-radius: 8px; transition: width 0.3s ease; } .progress-text { font-size: 0.8rem; margin-top: 8px; opacity: 0.8; } .app-version { position: absolute; bottom: 20px; right: 20px; font-size: 0.7rem; opacity: 0.6; color: white; } .brand-logo { width: 80px; height: 80px; margin-bottom: 20px; position: relative; } .brand-logo svg { width: 100%; height: 100%; filter: drop-shadow(0 0 10px rgba(255,255,255,0.3)); } @media (max-width: 500px) { .app-title { font-size: 2.2rem; } .app-tagline { font-size: 1rem; } .app-description { font-size: 0.8rem; } .loader { width: 150px; } } </style> </head> <body> <div class="splash-container"> <div class="triangle-container" id="triangles"></div> <div class="app-info"> <div class="brand-logo"> <svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"> <g> <polygon points="50,10 10,90 90,90" fill="none" stroke="white" stroke-width="3" /> <polygon points="50,30 25,70 75,70" fill="white" opacity="0.7" /> </g> </svg> </div> <h1 class="app-title">Trianglio</h1> <p class="app-tagline">Shape your ideas. Connect your world.</p> <p class="app-description">Welcome to a more colorful way to organize your thoughts, projects, and connections. Designed with creativity at its core.</p> <div class="loader"> <div class="loader-progress" id="loaderBar"></div> </div> <p class="progress-text" id="progressText">Loading assets...</p> </div> <div class="app-version">v2.3.1</div> </div> <script> document.addEventListener('DOMContentLoaded', function() { const triangleContainer = document.getElementById('triangles'); const loaderBar = document.getElementById('loaderBar'); const progressText = document.getElementById('progressText'); const appInfo = document.querySelector('.app-info'); // Pastel color palette const colors = [ '#FFB8D1', // pink '#B8E0D2', // mint '#D8B5FF', // lavender '#FFECB3', // yellow '#B5DEFF', // light blue '#FFC8A2', // peach '#C4E0B2' // light green ]; // Create triangles const numTriangles = 20; for (let i = 0; i < numTriangles; i++) { const triangle = document.createElement('div'); triangle.classList.add('triangle'); // Random size between 100px and 300px const size = Math.random() * 200 + 100; // Random position within container const top = Math.random() * 100; const left = Math.random() * 100; // Random color from our palette const color = colors[Math.floor(Math.random() * colors.length)]; // Style the triangle triangle.style.width = `${size}px`; triangle.style.height = `${size}px`; triangle.style.top = `${top}%`; triangle.style.left = `${left}%`; triangle.style.backgroundColor = color; triangle.style.zIndex = Math.floor(Math.random() * 2); triangle.style.opacity = Math.random() * 0.4 + 0.2; triangle.style.transform = `scale(0) rotate(${Math.random() * 360}deg)`; triangle.style.transitionDelay = `${Math.random() * 0.7}s`; triangleContainer.appendChild(triangle); } // Simulate loading let progress = 0; const loadingInterval = setInterval(() => { progress += Math.random() * 10; if (progress >= 100) { progress = 100; clearInterval(loadingInterval); progressText.textContent = "Ready!"; // Quick flash effect when loading completes setTimeout(() => { document.body.style.backgroundColor = "#fff"; setTimeout(() => { document.body.style.backgroundColor = "#f8f9fa"; document.body.style.transition = "background-color 1s ease"; }, 100); }, 500); } // Update loading text if (progress < 30) { progressText.textContent = "Loading assets..."; } else if (progress < 60) { progressText.textContent = "Preparing your workspace..."; } else if (progress < 90) { progressText.textContent = "Almost there..."; } loaderBar.style.width = `${progress}%`; }, 200); // Animate triangles in setTimeout(() => { const triangles = document.querySelectorAll('.triangle'); triangles.forEach(triangle => { triangle.style.opacity = 1; triangle.style.transform = `scale(1) rotate(${Math.random() * 360}deg)`; }); }, 100); // Animate app info in setTimeout(() => { appInfo.style.opacity = 1; appInfo.style.transform = 'translateY(0)'; }, 400); // Add subtle floating animation to triangles setTimeout(() => { const triangles = document.querySelectorAll('.triangle'); triangles.forEach(triangle => { // Add subtle floating movement const randomDuration = Math.random() * 5 + 5; // 5-10s const randomDelay = Math.random() * 2; const randomX = Math.random() * 10 - 5; const randomY = Math.random() * 10 - 5; const randomRotate = Math.random() * 15 - 7.5; triangle.style.transition = `transform ${randomDuration}s ease-in-out ${randomDelay}s, opacity 0.8s ease`; setInterval(() => { triangle.style.transform = `translate(${randomX}px, ${randomY}px) rotate(${randomRotate}deg) scale(1)`; setTimeout(() => { triangle.style.transform = `translate(${-randomX}px, ${-randomY}px) rotate(${-randomRotate}deg) scale(1)`; }, randomDuration * 1000 / 2); }, randomDuration * 1000); }); }, 1500); // Color transition effect let colorIndex = 0; setInterval(() => { colorIndex = (colorIndex + 1) % colors.length; const triangles = document.querySelectorAll('.triangle'); triangles.forEach((triangle, index) => { if (index % 3 === 0) { triangle.style.backgroundColor = colors[(colorIndex + index) % colors.length]; } }); }, 3000); }); </script> </body> </html>
<html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Triangular E-commerce Banner</title> <style> * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Montserrat', sans-serif; } body { width: 100%; height: 100%; overflow: hidden; background-color: #0f1123; } .banner-container { width: 100%; height: 700px; position: relative; overflow: hidden; display: flex; justify-content: center; align-items: center; perspective: 1000px; } .triangle-pattern { position: absolute; width: 150%; height: 150%; top: -25%; left: -25%; background: repeating-linear-gradient( 60deg, #ff3366, #ff3366 20px, #4d2cfa 20px, #4d2cfa 40px, #00c2ff 40px, #00c2ff 60px ); transform-style: preserve-3d; animation: patternShift 30s infinite linear; opacity: 0.7; z-index: 1; } .triangle-overlay { position: absolute; width: 100%; height: 100%; z-index: 2; background: radial-gradient(ellipse at center, rgba(15, 17, 35, 0) 0%, rgba(15, 17, 35, 0.9) 80%); } .product-container { position: relative; width: 650px; height: 550px; display: flex; flex-direction: column; align-items: center; z-index: 3; padding: 20px; } .header { text-align: center; color: white; margin-bottom: 20px; } .header h1 { font-size: 2.5em; font-weight: 700; margin-bottom: 10px; background: linear-gradient(to right, #ff3366, #00c2ff); -webkit-background-clip: text; -webkit-text-fill-color: transparent; animation: colorShift 8s infinite alternate; } .header p { font-size: 1.1em; font-weight: 300; max-width: 600px; margin: 0 auto; color: rgba(255, 255, 255, 0.8); } .products { display: flex; justify-content: space-around; width: 100%; margin-top: 30px; perspective: 1000px; } .product { width: 180px; height: 280px; background: rgba(255, 255, 255, 0.1); backdrop-filter: blur(10px); border-radius: 15px; padding: 15px; display: flex; flex-direction: column; align-items: center; cursor: pointer; transform-style: preserve-3d; transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.6s; position: relative; overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.1); } .product:hover { transform: translateY(-10px) rotateX(5deg) rotateY(-5deg); box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2); border: 1px solid rgba(255, 255, 255, 0.2); } .product::before { content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%; background: linear-gradient( 45deg, transparent, rgba(255, 255, 255, 0.1), transparent ); transform: rotate(45deg); transition: all 1s; opacity: 0; } .product:hover::before { animation: reflectionEffect 1.5s; } .product-image { width: 150px; height: 150px; margin-bottom: 15px; position: relative; display: flex; justify-content: center; align-items: center; background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, rgba(0, 0, 0, 0) 70%); border-radius: 10px; overflow: hidden; transform-style: preserve-3d; } .product-image img { width: auto; height: 85%; object-fit: contain; transition: transform 0.5s; transform-style: preserve-3d; filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.3)); } .product:hover .product-image img { transform: scale(1.1) translateZ(20px); } .product-details { text-align: center; color: white; width: 100%; } .product-name { font-size: 1em; font-weight: 600; margin-bottom: 5px; color: #ffffff; } .product-price { font-size: 1.2em; font-weight: 700; color: #ff3366; margin-bottom: 10px; } .product-button { background: linear-gradient(45deg, #ff3366, #4d2cfa); color: white; border: none; padding: 8px 15px; border-radius: 30px; font-size: 0.8em; font-weight: 500; cursor: pointer; transition: all 0.3s; position: relative; overflow: hidden; width: 100%; } .product-button:hover { transform: translateY(-3px); box-shadow: 0 7px 15px rgba(255, 51, 102, 0.3); } .product-button:active { transform: translateY(0); } .cta-section { margin-top: 40px; text-align: center; } .main-cta { background: linear-gradient(45deg, #ff3366, #4d2cfa); color: white; border: none; padding: 12px 30px; border-radius: 30px; font-size: 1.1em; font-weight: 600; cursor: pointer; transition: all 0.3s; position: relative; overflow: hidden; z-index: 1; box-shadow: 0 10px 20px rgba(255, 51, 102, 0.3); } .main-cta::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(45deg, #4d2cfa, #00c2ff); z-index: -1; transition: opacity 0.5s; opacity: 0; } .main-cta:hover::before { opacity: 1; } .main-cta:hover { transform: translateY(-5px); box-shadow: 0 15px 30px rgba(77, 44, 250, 0.4); } .sale-badge { position: absolute; top: 10px; right: 10px; background: #ff3366; color: white; padding: 5px 10px; border-radius: 20px; font-size: 0.7em; font-weight: 700; z-index: 2; transform: rotate(5deg); box-shadow: 0 3px 10px rgba(255, 51, 102, 0.5); animation: pulse 2s infinite; } .limited-time { margin-top: 15px; color: #ff3366; font-size: 0.9em; font-weight: 600; animation: blink 1.5s infinite; } @keyframes colorShift { 0% { background-position: 0% 50%; } 100% { background-position: 100% 50%; } } @keyframes patternShift { 0% { transform: rotate(0deg) translateZ(-50px); } 100% { transform: rotate(360deg) translateZ(-50px); } } @keyframes reflectionEffect { 0% { opacity: 0; transform: translateX(-100%) rotate(45deg); } 20% { opacity: 0.6; } 100% { opacity: 0; transform: translateX(100%) rotate(45deg); } } @keyframes pulse { 0% { transform: scale(1) rotate(5deg); } 50% { transform: scale(1.1) rotate(5deg); } 100% { transform: scale(1) rotate(5deg); } } @keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } } @media (max-width: 700px) { .product-container { width: 95%; height: 95%; padding: 15px; } .header h1 { font-size: 1.8em; } .header p { font-size: 0.9em; } .products { flex-wrap: wrap; justify-content: center; gap: 20px; } .product { width: 150px; height: 250px; padding: 10px; } .product-image { width: 120px; height: 120px; } .product-name { font-size: 0.9em; } .product-price { font-size: 1em; } .cta-section { margin-top: 20px; } .main-cta { padding: 10px 25px; font-size: 1em; } } </style> </head> <body> <div class="banner-container"> <div class="triangle-pattern" id="trianglePattern"></div> <div class="triangle-overlay"></div> <div class="product-container"> <div class="header"> <h1>DIMENSION TECH SHOWCASE</h1> <p>Experience the future with our geometric precision. Premium tech that transforms your digital landscape.</p> </div> <div class="products"> <div class="product" id="product1"> <div class="sale-badge">-30%</div> <div class="product-image"> <img src="https://i.imgur.com/9XWwQkW.png" alt="Premium Headphones"> </div> <div class="product-details"> <div class="product-name">Prism Wireless Pro</div> <div class="product-price">$129.99</div> <button class="product-button">Add to Cart</button> </div> </div> <div class="product" id="product2"> <div class="product-image"> <img src="https://i.imgur.com/tKjlTwd.png" alt="Smart Watch"> </div> <div class="product-details"> <div class="product-name">Vertex SmartWatch</div> <div class="product-price">$199.99</div> <button class="product-button">Add to Cart</button> </div> </div> <div class="product" id="product3"> <div class="sale-badge">NEW</div> <div class="product-image"> <img src="https://i.imgur.com/bsWdWcL.png" alt="Wireless Earbuds"> </div> <div class="product-details"> <div class="product-name">Tri-Sonic Earbuds</div> <div class="product-price">$89.99</div> <button class="product-button">Add to Cart</button> </div> </div> </div> <div class="cta-section"> <button class="main-cta">SHOP THE COLLECTION</button> <div class="limited-time">Limited Time Offer | Free Shipping on Orders $50+</div> </div> </div> </div> <script> document.addEventListener('DOMContentLoaded', function() { const container = document.querySelector('.banner-container'); const products = document.querySelectorAll('.product'); const trianglePattern = document.getElementById('trianglePattern'); // Parallax effect for triangle pattern container.addEventListener('mousemove', function(e) { const x = e.clientX / window.innerWidth; const y = e.clientY / window.innerHeight; trianglePattern.style.transform = `rotate(${x * 10}deg) translateX(${(x - 0.5) * 20}px) translateY(${(y - 0.5) * 20}px) translateZ(-50px)`; }); // Add 3D effect to products on mouse move products.forEach(product => { product.addEventListener('mousemove', function(e) { const rect = this.getBoundingClientRect(); const x = e.clientX - rect.left; const y = e.clientY - rect.top; const xRotation = ((y - rect.height / 2) / rect.height) * 10; const yRotation = ((x - rect.width / 2) / rect.width) * -10; this.style.transform = `perspective(1000px) rotateX(${xRotation}deg) rotateY(${yRotation}deg) translateY(-10px)`; const img = this.querySelector('img'); img.style.transform = `scale(1.1) translateX(${yRotation * 1.5}px) translateY(${xRotation * -1.5}px) translateZ(30px)`; }); product.addEventListener('mouseleave', function() { this.style.transform = 'rotateX(0) rotateY(0) translateY(0)'; const img = this.querySelector('img'); img.style.transform = 'scale(1) translateX(0) translateY(0) translateZ(0)'; }); }); // Add click event to buttons to prevent page refresh const buttons = document.querySelectorAll('button'); buttons.forEach(button => { button.addEventListener('click', function(e) { e.preventDefault(); // Create a ripple effect on button click const ripple = document.createElement('span'); ripple.style.position = 'absolute'; ripple.style.top = e.offsetY + 'px'; ripple.style.left = e.offsetX + 'px'; ripple.style.width = '0'; ripple.style.height = '0'; ripple.style.backgroundColor = 'rgba(255, 255, 255, 0.5)'; ripple.style.borderRadius = '50%'; ripple.style.transform = 'translate(-50%, -50%)'; ripple.style.animation = 'ripple 0.6s linear'; this.appendChild(ripple); // Add cart animation for product buttons if (this.classList.contains('product-button')) { this.textContent = 'Added ✓'; setTimeout(() => { this.textContent = 'Add to Cart'; }, 1500); } setTimeout(() => { ripple.remove(); }, 600); }); }); // Add keyframes for ripple effect const style = document.createElement('style'); style.textContent = ` @keyframes ripple { to { width: 300px; height: 300px; opacity: 0; } } `; document.head.appendChild(style); }); </script> </body> </html>
<html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Digital Art Portfolio - Triangle Mosaic</title> <style> * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Montserrat', sans-serif; } :root { --primary: #2c3e50; --secondary: #3498db; --accent: #e74c3c; --light: #ecf0f1; --dark: #1a1a2e; } body { background-color: var(--light); color: var(--dark); overflow-x: hidden; height: 100vh; width: 100%; display: flex; flex-direction: column; } .triangle-canvas { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; opacity: 0.8; filter: blur(1px); transition: all 0.8s ease; } header { padding: 2rem 1.5rem 1rem; } .logo { font-size: 1.8rem; font-weight: 700; letter-spacing: -1px; display: flex; align-items: center; cursor: pointer; position: relative; width: fit-content; } .logo::before { content: ''; position: absolute; bottom: -5px; left: 0; width: 0; height: 3px; background: var(--accent); transition: width 0.4s ease; } .logo:hover::before { width: 100%; } .logo-icon { margin-right: 8px; transform: rotate(0deg); transition: transform 0.5s ease; } .logo:hover .logo-icon { transform: rotate(360deg); } .container { padding: 1rem 1.5rem; flex: 1; display: flex; flex-direction: column; z-index: 1; max-width: 700px; margin: 0 auto; width: 100%; } h1 { font-size: 2.5rem; margin-bottom: 1.5rem; font-weight: 800; line-height: 1.2; opacity: 0; transform: translateY(20px); animation: fadeUp 0.8s ease forwards 0.3s; } .intro { margin-bottom: 2rem; font-size: 1.1rem; line-height: 1.6; opacity: 0; transform: translateY(20px); animation: fadeUp 0.8s ease forwards 0.5s; } .gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1.5rem; margin-bottom: 2rem; } .artwork { position: relative; overflow: hidden; border-radius: 8px; box-shadow: 0 15px 25px rgba(0, 0, 0, 0.05); background: rgba(255, 255, 255, 0.85); backdrop-filter: blur(10px); opacity: 0; transform: translateY(30px); transition: all 0.4s ease; height: 180px; cursor: pointer; } .artwork img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; } .artwork:hover img { transform: scale(1.1); } .artwork-info { position: absolute; bottom: 0; left: 0; width: 100%; padding: 1rem; background: linear-gradient(transparent, rgba(0, 0, 0, 0.8)); color: white; transform: translateY(100%); transition: transform 0.3s ease; } .artwork:hover .artwork-info { transform: translateY(0); } .artwork-title { font-weight: 600; margin-bottom: 0.3rem; font-size: 0.9rem; } .artwork-category { font-size: 0.8rem; opacity: 0.8; } .cta-section { margin-top: auto; padding: 2rem; background: rgba(255, 255, 255, 0.85); backdrop-filter: blur(10px); border-radius: 12px; text-align: center; box-shadow: 0 15px 25px rgba(0, 0, 0, 0.05); opacity: 0; transform: translateY(30px); animation: fadeUp 0.8s ease forwards 0.9s; } .cta-title { font-size: 1.5rem; margin-bottom: 1rem; font-weight: 700; } .cta-text { margin-bottom: 1.5rem; line-height: 1.6; } .cta-button { display: inline-block; padding: 0.8rem 2rem; background: var(--primary); color: white; border: none; border-radius: 50px; font-weight: 600; cursor: pointer; transition: all 0.3s ease; text-decoration: none; font-size: 1rem; position: relative; overflow: hidden; } .cta-button:hover { background: var(--secondary); transform: translateY(-3px); box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1); } .cta-button::after { content: ''; position: absolute; width: 30px; height: 30px; background: rgba(255, 255, 255, 0.2); border-radius: 50%; transform: scale(0); transition: transform 0.5s ease; } .cta-button:active::after { transform: scale(3); opacity: 0; transition: 0s; } @keyframes fadeUp { to { opacity: 1; transform: translateY(0); } } /* Modal */ .modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.85); display: flex; justify-content: center; align-items: center; z-index: 100; opacity: 0; visibility: hidden; transition: all 0.3s ease; } .modal.active { opacity: 1; visibility: visible; } .modal-content { width: 90%; max-width: 600px; background: white; border-radius: 12px; overflow: hidden; transform: scale(0.8); transition: transform 0.4s ease; } .modal.active .modal-content { transform: scale(1); } .modal-image { width: 100%; height: 300px; object-fit: cover; } .modal-info { padding: 1.5rem; } .modal-title { font-size: 1.5rem; margin-bottom: 0.5rem; } .modal-category { color: var(--secondary); margin-bottom: 1rem; font-weight: 500; } .modal-description { line-height: 1.6; margin-bottom: 1.5rem; } .modal-actions { display: flex; justify-content: flex-end; gap: 1rem; } .modal-button { padding: 0.6rem 1.2rem; border: none; border-radius: 4px; cursor: pointer; font-weight: 500; transition: all 0.3s ease; } .modal-close { background: var(--light); color: var(--dark); } .modal-view { background: var(--primary); color: white; } .modal-close:hover, .modal-view:hover { transform: translateY(-2px); } /* Responsive adjustments */ @media (max-width: 700px) { h1 { font-size: 2rem; } .gallery { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 1rem; } .artwork { height: 150px; } .cta-section { padding: 1.5rem; } } /* Color theme toggle button */ .theme-toggle { position: absolute; top: 2rem; right: 1.5rem; width: 40px; height: 40px; border-radius: 50%; background: rgba(255, 255, 255, 0.85); display: flex; justify-content: center; align-items: center; cursor: pointer; box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1); z-index: 10; transition: all 0.3s ease; opacity: 0; transform: translateY(20px); animation: fadeUp 0.8s ease forwards 0.7s; } .theme-toggle svg { width: 20px; height: 20px; transition: transform 0.5s ease; } .theme-toggle:hover { transform: translateY(-2px); box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15); } .theme-toggle:hover svg { transform: rotate(30deg); } /* Dark theme */ body.dark-theme { background-color: var(--dark); color: var(--light); } body.dark-theme .artwork, body.dark-theme .cta-section { background: rgba(30, 30, 50, 0.85); color: var(--light); } body.dark-theme .theme-toggle { background: rgba(30, 30, 50, 0.85); color: var(--light); } /* Portfolio mouse follower */ .cursor-follower { position: fixed; width: 30px; height: 30px; border: 2px solid var(--accent); border-radius: 50%; pointer-events: none; z-index: 9999; transform: translate(-50%, -50%); transition: width 0.3s, height 0.3s, border 0.3s; opacity: 0; } .cursor-follower.hover { width: 50px; height: 50px; border: 2px dashed var(--accent); } </style> </head> <body> <canvas class="triangle-canvas" id="triangleCanvas"></canvas> <div class="cursor-follower" id="cursorFollower"></div> <div class="theme-toggle" id="themeToggle"> <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <circle cx="12" cy="12" r="5"></circle> <line x1="12" y1="1" x2="12" y2="3"></line> <line x1="12" y1="21" x2="12" y2="23"></line> <line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line> <line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line> <line x1="1" y1="12" x2="3" y2="12"></line> <line x1="21" y1="12" x2="23" y2="12"></line> <line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line> <line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line> </svg> </div> <header> <div class="logo"> <svg class="logo-icon" viewBox="0 0 24 24" width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <polygon points="12 2 2 7 12 12 22 7 12 2"></polygon> <polyline points="2 17 12 22 22 17"></polyline> <polyline points="2 12 12 17 22 12"></polyline> </svg> <span>TriStudio</span> </div> </header> <div class="container"> <h1>Where Triangulation Meets Imagination</h1> <p class="intro">Welcome to my digital playground where geometric precision meets artistic expression. My work explores the tension between algorithmic structure and creative spontaneity through triangulated patterns and mosaic arrangements.</p> <div class="gallery" id="gallery"> <!-- Gallery items will be inserted by JavaScript --> </div> <div class="cta-section"> <h2 class="cta-title">Let's Create Something Geometric</h2> <p class="cta-text">Interested in commissioning a piece or discussing how triangulated art can enhance your brand or space? My algorithmic approach creates one-of-a-kind visual experiences tailored to your vision.</p> <button class="cta-button" id="contactButton">Start a Conversation</button> </div> </div> <div class="modal" id="artworkModal"> <div class="modal-content"> <img class="modal-image" id="modalImage" src="" alt=""> <div class="modal-info"> <h3 class="modal-title" id="modalTitle"></h3> <p class="modal-category" id="modalCategory"></p> <p class="modal-description" id="modalDescription"></p> <div class="modal-actions"> <button class="modal-button modal-close" id="modalClose">Close</button> <button class="modal-button modal-view">View Full Project</button> </div> </div> </div> </div> <script> // Triangle Canvas Background const canvas = document.getElementById('triangleCanvas'); const ctx = canvas.getContext('2d'); let width, height; let triangles = []; let colors = ['#2c3e50', '#3498db', '#e74c3c', '#2ecc71', '#f39c12']; let darkColors = ['#1a1a2e', '#0f3460', '#e94560', '#16213e', '#533483']; let mouseX = 0, mouseY = 0; let isDarkTheme = false; function resizeCanvas() { width = window.innerWidth; height = window.innerHeight; canvas.width = width; canvas.height = height; generateTriangles(); } function generateTriangles() { triangles = []; const triangleCount = Math.floor((width * height) / 15000); for (let i = 0; i < triangleCount; i++) { const size = Math.random() * 100 + 50; const x = Math.random() * width; const y = Math.random() * height; const colorSet = isDarkTheme ? darkColors : colors; const color = colorSet[Math.floor(Math.random() * colorSet.length)]; const opacity = Math.random() * 0.3 + 0.1; triangles.push({ x: x, y: y, size: size, color: color, opacity: opacity, rotation: Math.random() * Math.PI * 2, rotationSpeed: (Math.random() - 0.5) * 0.005, targetSize: size }); } renderTriangles(); } function renderTriangles() { ctx.clearRect(0, 0, width, height); for (let i = 0; i < triangles.length; i++) { const t = triangles[i]; // Calculate distance from mouse const dx = t.x - mouseX; const dy = t.y - mouseY; const distance = Math.sqrt(dx * dx + dy * dy); // Adjust size based on mouse proximity if (distance < 200) { t.targetSize = t.size * (1 + (200 - distance) / 200); } else { t.targetSize = t.size; } // Smooth size adjustment t.currentSize = t.currentSize ? t.currentSize * 0.95 + t.targetSize * 0.05 : t.targetSize; // Update rotation t.rotation += t.rotationSpeed; // Draw triangle ctx.save(); ctx.translate(t.x, t.y); ctx.rotate(t.rotation); ctx.beginPath(); ctx.moveTo(0, -t.currentSize / 2); ctx.lineTo(-t.currentSize / 2, t.currentSize / 2); ctx.lineTo(t.currentSize / 2, t.currentSize / 2); ctx.closePath(); ctx.fillStyle = t.color + Math.floor(t.opacity * 255).toString(16).padStart(2, '0'); ctx.fill(); ctx.restore(); } requestAnimationFrame(renderTriangles); } // Mouse movement tracking document.addEventListener('mousemove', (e) => { mouseX = e.clientX; mouseY = e.clientY; // Update cursor follower const follower = document.getElementById('cursorFollower'); follower.style.opacity = 1; follower.style.left = mouseX + 'px'; follower.style.top = mouseY + 'px'; }); // Add hover effect to cursor follower document.addEventListener('mouseover', (e) => { if (e.target.classList.contains('artwork') || e.target.classList.contains('cta-button') || e.target.classList.contains('logo') || e.target.classList.contains('theme-toggle')) { document.getElementById('cursorFollower').classList.add('hover'); } }); document.addEventListener('mouseout', (e) => { if (e.target.classList.contains('artwork') || e.target.classList.contains('cta-button') || e.target.classList.contains('logo') || e.target.classList.contains('theme-toggle')) { document.getElementById('cursorFollower').classList.remove('hover'); } }); // Artwork data const artworks = [ { id: 1, title: "Geometric Harmony", category: "Algorithm Art", image: "https://images.unsplash.com/photo-1550745165-9bc0b252726f?ixlib=rb-1.2.1&auto=format&fit=crop&w=800&q=80", description: "A dynamically generated composition exploring the mathematical beauty of triangulated forms. Each viewing produces a slightly different arrangement, making it a truly unique experience." }, { id: 2, title: "Fractured Reality", category: "Digital Collage", image: "https://images.unsplash.com/photo-1558591710-4b4a1ae0f04d?ixlib=rb-1.2.1&auto=format&fit=crop&w=800&q=80", description: "This piece deconstructs photographic elements and rebuilds them into a mosaic of triangle forms, creating an abstracted version of reality that invites multiple interpretations." }, { id: 3, title: "Prismatic Vision", category: "Generative Art", image: "https://images.unsplash.com/photo-1573096108468-702f6014ef28?ixlib=rb-1.2.1&auto=format&fit=crop&w=800&q=80", description: "An exploration of color theory through triangulated forms. The algorithm creates harmonic color relationships that shift subtly as you engage with the piece." }, { id: 4, title: "Digital Erosion", category: "Procedural Art", image: "https://images.unsplash.com/photo-1603665330306-dd1a67e0cc4e?ixlib=rb-1.2.1&auto=format&fit=crop&w=800&q=80", description: "Inspired by natural processes of erosion and decay, this piece uses triangulation to simulate the breakdown of digital information over time." }, { id: 5, title: "Sacred Geometry", category: "Conceptual Art", image: "https://images.unsplash.com/photo-1620641788421-7a1c342ea42e?ixlib=rb-1.2.1&auto=format&fit=crop&w=800&q=80", description: "Drawing on ancient sacred geometry principles, this work uses triangulation to create patterns that have resonated with human consciousness for millennia." }, { id: 6, title: "Fragmented Self", category: "Portrait Series", image: "https://images.unsplash.com/photo-1596434300655-e48d3ff3dd5e?ixlib=rb-1.2.1&auto=format&fit=crop&w=800&q=80", description: "Part of my exploration of identity through triangulated portraiture. The fragmentation reflects the multiple facets of self we present to the world." } ]; // Populate gallery function populateGallery() { const gallery = document.getElementById('gallery'); gallery.innerHTML = ''; artworks.forEach((artwork, index) => { const artworkEl = document.createElement('div'); artworkEl.className = 'artwork'; artworkEl.dataset.id = artwork.id; artworkEl.style.animationDelay = `${0.7 + index * 0.1}s`; artworkEl.style.animation = 'fadeUp 0.8s ease forwards'; artworkEl.innerHTML = ` <img src="${artwork.image}" alt="${artwork.title}"> <div class="artwork-info"> <h3 class="artwork-title">${artwork.title}</h3> <p class="artwork-category">${artwork.category}</p> </div> `; gallery.appendChild(artworkEl); // Add click event for modal artworkEl.addEventListener('click', () => { openModal(artwork); }); }); } // Modal functions function openModal(artwork) { const modal = document.getElementById('artworkModal'); const modalImage = document.getElementById('modalImage'); const modalTitle = document.getElementById('modalTitle'); const modalCategory = document.getElementById('modalCategory'); const modalDescription = document.getElementById('modalDescription'); modalImage.src = artwork.image; modalTitle.textContent = artwork.title; modalCategory.textContent = artwork.category; modalDescription.textContent = artwork.description; modal.classList.add('active'); } function closeModal() { const modal = document.getElementById('artworkModal'); modal.classList.remove('active'); } // Theme toggle function toggleTheme() { isDarkTheme = !isDarkTheme; document.body.classList.toggle('dark-theme'); generateTriangles(); } // Initialize window.addEventListener('load', () => { resizeCanvas(); populateGallery(); // Add event listeners window.addEventListener('resize', resizeCanvas); document.getElementById('modalClose').addEventListener('click', closeModal); document.getElementById('themeToggle').addEventListener('click', toggleTheme); document.getElementById('contactButton').addEventListener('click', () => { alert('In a real implementation, this would open a contact form.'); }); }); </script> </body> </html>
<html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Finance Dashboard</title> <style> :root { --bg-primary: #f8fafc; --text-primary: #334155; --text-secondary: #64748b; --accent-primary: #3b82f6; --accent-secondary: #7c3aed; --accent-tertiary: #10b981; --card-bg: rgba(255, 255, 255, 0.8); --grid-color-1: rgba(226, 232, 240, 0.3); --grid-color-2: rgba(203, 213, 225, 0.2); } * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; } body { background-color: var(--bg-primary); color: var(--text-primary); position: relative; overflow: hidden; width: 700px; height: 700px; } .dashboard-container { width: 100%; height: 100%; padding: 1.5rem; overflow-y: auto; position: relative; z-index: 1; } .triangle-grid-background { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 0; opacity: 0.4; background: linear-gradient(135deg, var(--bg-primary), #e2e8f0); overflow: hidden; } .grid-canvas { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } .dashboard-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; } .dashboard-title { font-size: 1.5rem; font-weight: 700; color: var(--text-primary); } .dashboard-controls { display: flex; gap: 0.75rem; } .time-filter { background-color: var(--card-bg); border: 1px solid #e2e8f0; border-radius: 0.5rem; padding: 0.5rem 0.75rem; font-size: 0.875rem; display: flex; align-items: center; gap: 0.5rem; cursor: pointer; transition: all 0.2s ease; backdrop-filter: blur(5px); } .time-filter:hover { border-color: #cbd5e1; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05); } .time-filter.active { background-color: rgba(59, 130, 246, 0.1); border-color: var(--accent-primary); color: var(--accent-primary); } .metrics-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 1.5rem; } .metric-card { background-color: var(--card-bg); border-radius: 0.75rem; padding: 1.25rem; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05); transition: transform 0.2s ease, box-shadow 0.2s ease; backdrop-filter: blur(8px); border: 1px solid rgba(226, 232, 240, 0.7); position: relative; overflow: hidden; } .metric-card:hover { transform: translateY(-3px); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); } .metric-card::after { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 4px; opacity: 0.75; } .metric-card.positive::after { background: linear-gradient(to right, var(--accent-tertiary), #34d399); } .metric-card.neutral::after { background: linear-gradient(to right, var(--accent-primary), #60a5fa); } .metric-card.negative::after { background: linear-gradient(to right, #ef4444, #f87171); } .metric-title { font-size: 0.875rem; color: var(--text-secondary); margin-bottom: 0.5rem; display: flex; align-items: center; gap: 0.375rem; } .metric-value { font-size: 1.5rem; font-weight: 600; color: var(--text-primary); margin-bottom: 0.25rem; } .metric-change { font-size: 0.8125rem; display: flex; align-items: center; gap: 0.25rem; } .metric-change.positive { color: var(--accent-tertiary); } .metric-change.negative { color: #ef4444; } .metric-change.neutral { color: var(--text-secondary); } .chart-container { background-color: var(--card-bg); border-radius: 0.75rem; padding: 1.25rem; margin-bottom: 1.5rem; backdrop-filter: blur(8px); border: 1px solid rgba(226, 232, 240, 0.7); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05); } .chart-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; } .chart-title { font-size: 1rem; font-weight: 600; color: var(--text-primary); } .chart-legend { display: flex; gap: 1rem; font-size: 0.875rem; color: var(--text-secondary); } .legend-item { display: flex; align-items: center; gap: 0.375rem; } .legend-color { width: 0.75rem; height: 0.75rem; border-radius: 50%; } .legend-income { background-color: var(--accent-primary); } .legend-expenses { background-color: var(--accent-secondary); } .chart { width: 100%; height: 220px; position: relative; } .transactions-section { background-color: var(--card-bg); border-radius: 0.75rem; padding: 1.25rem; backdrop-filter: blur(8px); border: 1px solid rgba(226, 232, 240, 0.7); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05); } .transactions-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; } .transactions-title { font-size: 1rem; font-weight: 600; color: var(--text-primary); } .view-all { font-size: 0.875rem; color: var(--accent-primary); text-decoration: none; transition: color 0.2s ease; cursor: pointer; } .view-all:hover { color: #1d4ed8; text-decoration: underline; } .transaction-list { display: flex; flex-direction: column; gap: 0.75rem; } .transaction-item { display: flex; justify-content: space-between; align-items: center; padding: 0.75rem 0; border-bottom: 1px solid #e2e8f0; transition: background-color 0.2s ease; } .transaction-item:last-child { border-bottom: none; } .transaction-item:hover { background-color: rgba(226, 232, 240, 0.3); } .transaction-info { display: flex; align-items: center; gap: 0.75rem; } .transaction-icon { width: 2.25rem; height: 2.25rem; border-radius: 50%; background-color: rgba(226, 232, 240, 0.5); display: flex; align-items: center; justify-content: center; color: var(--text-primary); font-size: 1rem; } .transaction-details { display: flex; flex-direction: column; gap: 0.25rem; } .transaction-title { font-size: 0.9375rem; font-weight: 500; color: var(--text-primary); } .transaction-date { font-size: 0.8125rem; color: var(--text-secondary); } .transaction-amount { font-size: 0.9375rem; font-weight: 500; } .amount-positive { color: var(--accent-tertiary); } .amount-negative { color: #ef4444; } .dashboard-footer { display: flex; justify-content: space-between; align-items: center; padding-top: 1rem; font-size: 0.875rem; color: var(--text-secondary); } .tooltip { position: absolute; background-color: rgba(15, 23, 42, 0.9); color: white; padding: 0.5rem 0.75rem; border-radius: 0.375rem; font-size: 0.8125rem; transform: translate(-50%, -100%); pointer-events: none; opacity: 0; transition: opacity 0.2s ease; z-index: 10; box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); white-space: nowrap; } @media (max-width: 640px) { .dashboard-container { padding: 1rem; } .metrics-grid { grid-template-columns: 1fr; gap: 0.875rem; } .dashboard-title { font-size: 1.25rem; } .chart { height: 180px; } } @media (min-width: 641px) and (max-width: 768px) { .metrics-grid { grid-template-columns: repeat(2, 1fr); } } </style> </head> <body> <div class="triangle-grid-background"> <canvas id="gridCanvas" class="grid-canvas"></canvas> </div> <div class="dashboard-container"> <header class="dashboard-header"> <h1 class="dashboard-title">Financial Performance</h1> <div class="dashboard-controls"> <div class="time-filter" data-period="day">Day</div> <div class="time-filter active" data-period="week">Week</div> <div class="time-filter" data-period="month">Month</div> <div class="time-filter" data-period="quarter">Quarter</div> </div> </header> <div class="metrics-grid"> <div class="metric-card positive"> <div class="metric-title"> <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <line x1="12" y1="1" x2="12" y2="23"></line> <path d="M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6"></path> </svg> Net Income </div> <div class="metric-value">$42,580</div> <div class="metric-change positive"> <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <polyline points="18 15 12 9 6 15"></polyline> </svg> +8.3% from last week </div> </div> <div class="metric-card neutral"> <div class="metric-title"> <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <circle cx="12" cy="12" r="10"></circle> <polyline points="12 6 12 12 16 14"></polyline> </svg> Avg. Spending Rate </div> <div class="metric-value">$3,840/day</div> <div class="metric-change neutral"> <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <line x1="5" y1="12" x2="19" y2="12"></line> </svg> +0.5% from last week </div> </div> <div class="metric-card negative"> <div class="metric-title"> <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <path d="M16 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path> <circle cx="8.5" cy="7" r="4"></circle> <line x1="20" y1="8" x2="20" y2="14"></line> <line x1="23" y1="11" x2="17" y2="11"></line> </svg> Fixed Costs </div> <div class="metric-value">$18,750</div> <div class="metric-change negative"> <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <polyline points="6 9 12 15 18 9"></polyline> </svg> +12.4% from last week </div> </div> </div> <div class="chart-container"> <div class="chart-header"> <h2 class="chart-title">Cash Flow Trend</h2> <div class="chart-legend"> <div class="legend-item"> <div class="legend-color legend-income"></div> <span>Income</span> </div> <div class="legend-item"> <div class="legend-color legend-expenses"></div> <span>Expenses</span> </div> </div> </div> <div class="chart" id="cash-flow-chart"></div> </div> <div class="transactions-section"> <div class="transactions-header"> <h2 class="transactions-title">Recent Transactions</h2> <a class="view-all">View All Transactions</a> </div> <div class="transaction-list"> <div class="transaction-item"> <div class="transaction-info"> <div class="transaction-icon">🏢</div> <div class="transaction-details"> <div class="transaction-title">Office Rent Payment</div> <div class="transaction-date">May 2, 2023 · Facilities</div> </div> </div> <div class="transaction-amount amount-negative">-$4,500.00</div> </div> <div class="transaction-item"> <div class="transaction-info"> <div class="transaction-icon">📱</div> <div class="transaction-details"> <div class="transaction-title">SaaS Subscription</div> <div class="transaction-date">May 1, 2023 · Technology</div> </div> </div> <div class="transaction-amount amount-negative">-$899.00</div> </div> <div class="transaction-item"> <div class="transaction-info"> <div class="transaction-icon">💼</div> <div class="transaction-details"> <div class="transaction-title">Client Payment - Acme Inc.</div> <div class="transaction-date">Apr 30, 2023 · Accounts Receivable</div> </div> </div> <div class="transaction-amount amount-positive">+$12,840.00</div> </div> <div class="transaction-item"> <div class="transaction-info"> <div class="transaction-icon">💰</div> <div class="transaction-details"> <div class="transaction-title">Quarterly Tax Payment</div> <div class="transaction-date">Apr 28, 2023 · Taxes</div> </div> </div> <div class="transaction-amount amount-negative">-$6,420.00</div> </div> </div> </div> <div class="dashboard-footer"> <div>Last updated: May 3, 2023 at 14:32</div> <div>Financial Quarter: Q2 2023</div> </div> <div class="tooltip" id="chart-tooltip"></div> </div> <script> document.addEventListener('DOMContentLoaded', function() { // Initialize the triangle grid background initTriangleGrid(); // Initialize the cash flow chart initCashFlowChart(); // Set up time filter interactions setupTimeFilters(); // Set up transaction hover effects setupTransactionHover(); }); function initTriangleGrid() { const canvas = document.getElementById('gridCanvas'); const ctx = canvas.getContext('2d'); // Set canvas dimensions for high resolution canvas.width = window.innerWidth; canvas.height = window.innerHeight; // Triangle grid variables const triangleSize = 80; const rows = Math.ceil(canvas.height / triangleSize) + 1; const cols = Math.ceil(canvas.width / triangleSize) + 1; function drawTriangleGrid() { ctx.clearRect(0, 0, canvas.width, canvas.height); // Add subtle gradient background const gradient = ctx.createLinearGradient(0, 0, canvas.width, canvas.height); gradient.addColorStop(0, 'rgba(241, 245, 249, 0.7)'); gradient.addColorStop(1, 'rgba(226, 232, 240, 0.5)'); ctx.fillStyle = gradient; ctx.fillRect(0, 0, canvas.width, canvas.height); // Draw triangle grid for (let row = 0; row < rows; row++) { for (let col = 0; col < cols; col++) { const x = col * triangleSize; const y = row * triangleSize; // Alternate between two triangle patterns if ((row + col) % 2 === 0) { drawTriangle(x, y, triangleSize, 'var(--grid-color-1)'); } else { drawTriangle(x, y, triangleSize, 'var(--grid-color-2)'); } } } } function drawTriangle(x, y, size, color) { ctx.fillStyle = color; // First triangle ctx.beginPath(); ctx.moveTo(x, y); ctx.lineTo(x + size, y); ctx.lineTo(x, y + size); ctx.closePath(); ctx.fill(); // Second triangle ctx.beginPath(); ctx.moveTo(x + size, y); ctx.lineTo(x + size, y + size); ctx.lineTo(x, y + size); ctx.closePath(); ctx.fillStyle = color === 'var(--grid-color-1)' ? 'var(--grid-color-2)' : 'var(--grid-color-1)'; ctx.fill(); } // Initial draw drawTriangleGrid(); // Redraw on window resize window.addEventListener('resize', function() { canvas.width = window.innerWidth; canvas.height = window.innerHeight; drawTriangleGrid(); }); // Add subtle animation to the grid let offsetX = 0; let offsetY = 0; function animateGrid() { offsetX += 0.05; offsetY += 0.03; ctx.save(); ctx.translate(Math.sin(offsetX) * 5, Math.cos(offsetY) * 5); drawTriangleGrid(); ctx.restore(); requestAnimationFrame(animateGrid); } animateGrid(); } function initCashFlowChart() { const chartContainer = document.getElementById('cash-flow-chart'); const tooltip = document.getElementById('chart-tooltip'); // Financial data for the chart const chartData = { labels: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'], incomeData: [15200, 12800, 21500, 18700, 24200, 9800, 7500], expensesData: [8700, 9200, 12400, 10800, 13600, 5300, 4900] }; // Chart dimensions const chartWidth = chartContainer.clientWidth; const chartHeight = chartContainer.clientHeight; const padding = { top: 20, right: 20, bottom: 30, left: 40 }; const innerWidth = chartWidth - padding.left - padding.right; const innerHeight = chartHeight - padding.top - padding.bottom; // Create canvas element const canvas = document.createElement('canvas'); canvas.width = chartWidth; canvas.height = chartHeight; chartContainer.appendChild(canvas); const ctx = canvas.getContext('2d'); // Calculate scales const maxValue = Math.max( ...chartData.incomeData, ...chartData.expensesData ) * 1.1; function drawChart() { ctx.clearRect(0, 0, chartWidth, chartHeight); // Draw axes and grid lines drawAxes(); // Draw data lines drawDataLine(chartData.incomeData, 'var(--accent-primary)', 0.2); drawDataLine(chartData.expensesData, 'var(--accent-secondary)', 0.2); // Draw data points drawDataPoints(chartData.incomeData, 'var(--accent-primary)'); drawDataPoints(chartData.expensesData, 'var(--accent-secondary)'); } function drawAxes() { ctx.strokeStyle = '#e2e8f0'; ctx.lineWidth = 1; // Draw y-axis grid lines const numYLines = 5; for (let i = 0; i <= numYLines; i++) { const y = padding.top + innerHeight - (i / numYLines) * innerHeight; ctx.beginPath(); ctx.moveTo(padding.left, y); ctx.lineTo(padding.left + innerWidth, y); ctx.stroke(); // Draw y-axis labels const value = Math.round((i / numYLines) * maxValue); ctx.fillStyle = 'var(--text-secondary)'; ctx.font = '10px Inter, sans-serif'; ctx.textAlign = 'right'; ctx.textBaseline = 'middle'; ctx.fillText('$' + value.toLocaleString(), padding.left - 8, y); } // Draw x-axis labels const barWidth = innerWidth / chartData.labels.length; for (let i = 0; i < chartData.labels.length; i++) { const x = padding.left + (i + 0.5) * barWidth; const y = padding.top + innerHeight + 15; ctx.fillStyle = 'var(--text-secondary)'; ctx.font = '10px Inter, sans-serif'; ctx.textAlign = 'center'; ctx.textBaseline = 'middle'; ctx.fillText(chartData.labels[i], x, y); } } function drawDataLine(data, color, areaOpacity) { const barWidth = innerWidth / data.length; // Draw area under the line ctx.beginPath(); ctx.moveTo(padding.left, padding.top + innerHeight); for (let i = 0; i < data.length; i++) { const x = padding.left + (i + 0.5) * barWidth; const y = padding.top + innerHeight - (data[i] / maxValue) * innerHeight; if (i === 0) { ctx.lineTo(x, y); } else { ctx.lineTo(x, y); } } ctx.lineTo(padding.left + innerWidth, padding.top + innerHeight); ctx.closePath(); ctx.fillStyle = color.replace(')', `, ${areaOpacity})`); ctx.fill(); // Draw the line ctx.beginPath(); for (let i = 0; i < data.length; i++) { const x = padding.left + (i + 0.5) * barWidth; const y = padding.top + innerHeight - (data[i] / maxValue) * innerHeight; if (i === 0) { ctx.moveTo(x, y); } else { ctx.lineTo(x, y); } } ctx.strokeStyle = color; ctx.lineWidth = 2; ctx.stroke(); } function drawDataPoints(data, color) { const barWidth = innerWidth / data.length; for (let i = 0; i < data.length; i++) { const x = padding.left + (i + 0.5) * barWidth; const y = padding.top + innerHeight - (data[i] / maxValue) * innerHeight; ctx.beginPath(); ctx.arc(x, y, 4, 0, Math.PI * 2); ctx.fillStyle = '#fff'; ctx.fill(); ctx.strokeStyle = color; ctx.lineWidth = 2; ctx.stroke(); } } // Handle hover effects canvas.addEventListener('mousemove', function(e) { const rect = canvas.getBoundingClientRect(); const mouseX = e.clientX - rect.left; const mouseY = e.clientY - rect.top; const barWidth = innerWidth / chartData.labels.length; let isOverDataPoint = false; for (let i = 0; i < chartData.labels.length; i++) { // Check income data point const incomeX = padding.left + (i + 0.5) * barWidth; const incomeY = padding.top + innerHeight - (chartData.incomeData[i] / maxValue) * innerHeight; // Check expenses data point const expensesX = padding.left + (i + 0.5) * barWidth; const expensesY = padding.top + innerHeight - (chartData.expensesData[i] / maxValue) * innerHeight; if ( Math.sqrt((mouseX - incomeX) ** 2 + (mouseY - incomeY) ** 2) <= 8 || Math.sqrt((mouseX - expensesX) ** 2 + (mouseY - expensesY) ** 2) <= 8 ) { isOverDataPoint = true; // Show tooltip tooltip.style.opacity = 1; tooltip.style.left = `${e.clientX}px`; tooltip.style.top = `${e.clientY - 10}px`; tooltip.innerHTML = ` <div>${chartData.labels[i]}</div> <div>Income: $${chartData.incomeData[i].toLocaleString()}</div> <div>Expenses: $${chartData.expensesData[i].toLocaleString()}</div> <div>Net: $${(chartData.incomeData[i] - chartData.expensesData[i]).toLocaleString()}</div> `; // Redraw with highlight drawChart(); // Highlight the current points ctx.beginPath(); ctx.arc(incomeX, incomeY, 6, 0, Math.PI * 2); ctx.fillStyle = '#fff'; ctx.fill(); ctx.strokeStyle = 'var(--accent-primary)'; ctx.lineWidth = 3; ctx.stroke(); ctx.beginPath(); ctx.arc(expensesX, expensesY, 6, 0, Math.PI * 2); ctx.fillStyle = '#fff'; ctx.fill(); ctx.strokeStyle = 'var(--accent-secondary)'; ctx.lineWidth = 3; ctx.stroke(); break; } } if (!isOverDataPoint) { tooltip.style.opacity = 0; drawChart(); } }); canvas.addEventListener('mouseleave', function() { tooltip.style.opacity = 0; drawChart(); }); // Initial chart drawing drawChart(); // Redraw on window resize window.addEventListener('resize', function() { // Update dimensions const newChartWidth = chartContainer.clientWidth; const newChartHeight = chartContainer.clientHeight; // Only redraw if dimensions changed if (newChartWidth !== chartWidth || newChartHeight !== chartHeight) { canvas.width = newChartWidth; canvas.height = newChartHeight; drawChart(); } }); } function setupTimeFilters() { const timeFilters = document.querySelectorAll('.time-filter'); timeFilters.forEach(filter => { filter.addEventListener('click', () => { // Remove active class from all filters timeFilters.forEach(f => f.classList.remove('active')); // Add active class to the clicked filter filter.classList.add('active'); // Get the time period const period = filter.dataset.period; // Update dashboard data based on the selected period updateDashboardData(period); }); }); } function updateDashboardData(period) { // This would normally fetch new data from an API // For this demo, we'll just simulate data changes let netIncome, spendingRate, fixedCosts; let netIncomeChange, spendingRateChange, fixedCostsChange; switch (period) { case 'day': netIncome = '$1,580'; spendingRate = '$1,240/hour'; fixedCosts = '$720'; netIncomeChange = '+4.2% from yesterday'; spendingRateChange = '-2.1% from yesterday'; fixedCostsChange = '+0.5% from yesterday'; break; case 'week': netIncome = '$42,580'; spendingRate = '$3,840/day'; fixedCosts = '$18,750'; netIncomeChange = '+8.3% from last week'; spendingRateChange = '+0.5% from last week'; fixedCostsChange = '+12.4% from last week'; break; case 'month': netIncome = '$186,420'; spendingRate = '$25,380/week'; fixedCosts = '$64,500'; netIncomeChange = '+3.7% from last month'; spendingRateChange = '+1.2% from last month'; fixedCostsChange = '+5.8% from last month'; break; case 'quarter': netIncome = '$548,630'; spendingRate = '$182,840/month'; fixedCosts = '$195,200'; netIncomeChange = '+12.6% from last quarter'; spendingRateChange = '-3.4% from last quarter'; fixedCostsChange = '+7.1% from last quarter'; break; } // Update the UI with the new data const metricValues = document.querySelectorAll('.metric-value'); metricValues[0].textContent = netIncome; metricValues[1].textContent = spendingRate; metricValues[2].textContent = fixedCosts; const metricChanges = document.querySelectorAll('.metric-change'); metricChanges[0].innerHTML = ` <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <polyline points="18 15 12 9 6 15"></polyline> </svg> ${netIncomeChange} `; if (period === 'day') { metricChanges[1].innerHTML = ` <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <polyline points="18 15 12 9 6 15"></polyline> </svg> ${spendingRateChange} `; metricChanges[1].className = 'metric-change positive'; } else if (period === 'quarter') { metricChanges[1].innerHTML = ` <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <polyline points="6 9 12 15 18 9"></polyline> </svg> ${spendingRateChange} `; metricChanges[1].className = 'metric-change negative'; } else { metricChanges[1].innerHTML = ` <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <line x1="5" y1
<html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Triangula Learning Platform</title> <style> :root { --primary: #4A6FFF; --secondary: #FF6B6B; --tertiary: #33D9B2; --dark: #34495E; --light: #F7F9FC; } * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; } body { background-color: var(--light); height: 700px; width: 700px; overflow: hidden; position: relative; display: flex; flex-direction: column; } .triangle-bg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; overflow: hidden; } .triangle { position: absolute; opacity: 0.5; transition: all 0.5s ease; filter: blur(1px); } .triangle-1 { width: 300px; height: 300px; background-color: var(--primary); clip-path: polygon(50% 0%, 0% 100%, 100% 100%); top: -50px; left: -50px; transform: rotate(45deg); animation: float 15s infinite ease-in-out; } .triangle-2 { width: 250px; height: 250px; background-color: var(--secondary); clip-path: polygon(50% 0%, 0% 100%, 100% 100%); bottom: -50px; right: 100px; transform: rotate(180deg); animation: float 18s infinite ease-in-out reverse; } .triangle-3 { width: 200px; height: 200px; background-color: var(--tertiary); clip-path: polygon(50% 0%, 0% 100%, 100% 100%); top: 200px; right: -50px; transform: rotate(90deg); animation: float 12s infinite ease-in-out; } .triangle-4 { width: 150px; height: 150px; background-color: rgba(74, 111, 255, 0.8); clip-path: polygon(50% 0%, 0% 100%, 100% 100%); bottom: 100px; left: 150px; transform: rotate(225deg); animation: float 20s infinite ease-in-out; } .triangle-5 { width: 120px; height: 120px; background-color: rgba(255, 107, 107, 0.8); clip-path: polygon(50% 0%, 0% 100%, 100% 100%); top: 150px; left: 350px; transform: rotate(135deg); animation: float 17s infinite ease-in-out reverse; } @keyframes float { 0% { transform: translate(0, 0) rotate(45deg); } 25% { transform: translate(20px, 10px) rotate(50deg); } 50% { transform: translate(10px, 20px) rotate(45deg); } 75% { transform: translate(-10px, 10px) rotate(40deg); } 100% { transform: translate(0, 0) rotate(45deg); } } .content { padding: 2rem; display: flex; flex-direction: column; height: 100%; position: relative; z-index: 10; } .header { text-align: center; margin-bottom: 1.5rem; } .logo { font-size: 2rem; font-weight: 800; color: var(--dark); margin-bottom: 0.5rem; position: relative; display: inline-block; } .logo::after { content: ''; position: absolute; bottom: -5px; left: 25%; width: 50%; height: 3px; background-color: var(--primary); transition: width 0.3s ease, left 0.3s ease; } .logo:hover::after { width: 100%; left: 0; } .tagline { font-size: 1rem; color: var(--dark); opacity: 0.8; } .learning-paths { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; margin-bottom: 1.5rem; } .path-card { background-color: rgba(255, 255, 255, 0.9); border-radius: 12px; padding: 1.5rem; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08); transition: all 0.3s ease; cursor: pointer; overflow: hidden; position: relative; z-index: 1; } .path-card::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.2)); z-index: -1; } .path-card:hover { transform: translateY(-5px); box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12); } .path-card:hover .path-icon { transform: scale(1.2) rotate(10deg); } .path-icon { font-size: 2rem; margin-bottom: 0.8rem; color: var(--primary); transition: all 0.3s ease; display: inline-block; } .path-card:nth-child(2) .path-icon { color: var(--secondary); } .path-card:nth-child(3) .path-icon { color: var(--tertiary); } .path-card:nth-child(4) .path-icon { color: var(--dark); } .path-title { font-weight: 600; margin-bottom: 0.5rem; color: var(--dark); } .path-desc { font-size: 0.9rem; color: var(--dark); opacity: 0.8; } .featured-course { background-color: rgba(255, 255, 255, 0.95); border-radius: 12px; padding: 1.5rem; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1); margin-bottom: 1.5rem; position: relative; overflow: hidden; } .featured-badge { position: absolute; top: 1rem; right: -2rem; background-color: var(--primary); color: white; padding: 0.3rem 2rem; font-size: 0.8rem; transform: rotate(45deg); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); } .course-title { font-size: 1.2rem; font-weight: 600; margin-bottom: 0.5rem; color: var(--dark); } .course-stats { display: flex; gap: 1rem; margin-bottom: 1rem; font-size: 0.85rem; } .stat { display: flex; align-items: center; gap: 0.3rem; color: var(--dark); opacity: 0.8; } .progress-container { width: 100%; height: 10px; background-color: rgba(0, 0, 0, 0.05); border-radius: 10px; overflow: hidden; margin-top: 0.5rem; } .progress-bar { height: 100%; width: 65%; background: linear-gradient(90deg, var(--primary), var(--tertiary)); border-radius: 10px; transition: width 1s ease; } .cta-button { display: inline-block; margin-top: 1rem; background-color: var(--primary); color: white; border: none; padding: 0.6rem 1.5rem; border-radius: 30px; font-weight: 600; cursor: pointer; transition: all 0.3s ease; text-decoration: none; outline: none; } .cta-button:hover { background-color: #3956d6; transform: translateY(-2px); box-shadow: 0 5px 15px rgba(74, 111, 255, 0.3); } .footer { margin-top: auto; text-align: center; padding: 1rem; color: var(--dark); font-size: 0.9rem; opacity: 0.7; } .interactive-element { position: absolute; right: 2rem; bottom: 7rem; width: 60px; height: 60px; background-color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15); font-size: 1.5rem; color: var(--primary); z-index: 100; transition: all 0.3s ease; } .interactive-element:hover { transform: rotate(180deg); color: var(--secondary); } .tooltip { position: absolute; background-color: var(--dark); color: white; padding: 0.5rem 1rem; border-radius: 5px; font-size: 0.9rem; bottom: 80px; right: 0; width: 200px; opacity: 0; transform: translateY(10px); transition: all 0.3s ease; pointer-events: none; } .interactive-element:hover + .tooltip { opacity: 1; transform: translateY(0); } @media (max-width: 700px) { .learning-paths { grid-template-columns: 1fr; } .content { padding: 1.5rem; } .logo { font-size: 1.8rem; } .interactive-element { right: 1rem; bottom: 6rem; width: 50px; height: 50px; } } @media (max-width: 500px) { .content { padding: 1rem; } .path-card { padding: 1.2rem; } } </style> </head> <body> <div class="triangle-bg"> <div class="triangle triangle-1"></div> <div class="triangle triangle-2"></div> <div class="triangle triangle-3"></div> <div class="triangle triangle-4"></div> <div class="triangle triangle-5"></div> </div> <div class="content"> <div class="header"> <div class="logo">Triangula</div> <div class="tagline">Where structure meets learning innovation</div> </div> <div class="learning-paths"> <div class="path-card"> <div class="path-icon">⚡</div> <div class="path-title">Adaptive Learning</div> <div class="path-desc">Personalized pathways that adjust to your learning pace and cognitive preferences.</div> </div> <div class="path-card"> <div class="path-icon">🔗</div> <div class="path-title">Knowledge Webs</div> <div class="path-desc">Interconnected concepts that build complex understanding through structured relationships.</div> </div> <div class="path-card"> <div class="path-icon">📊</div> <div class="path-title">Visual Learning</div> <div class="path-desc">Transform abstract concepts into visual frameworks for enhanced comprehension.</div> </div> <div class="path-card"> <div class="path-icon">🧠</div> <div class="path-title">Cognitive Maps</div> <div class="path-desc">Neural approach to knowledge building that mimics how the brain forms connections.</div> </div> </div> <div class="featured-course"> <div class="featured-badge">Featured</div> <div class="course-title">Mathematical Thinking: The Triangular Framework</div> <div class="course-stats"> <div class="stat"> <span>⏱️</span> <span>6 weeks</span> </div> <div class="stat"> <span>👥</span> <span>2,460 learners</span> </div> <div class="stat"> <span>⭐</span> <span>4.9/5</span> </div> </div> <div class="path-desc">Discover how triangular structures form the foundation of logical thinking, spatial reasoning, and problem-solving approaches in both mathematics and everyday challenges.</div> <div class="progress-container"> <div class="progress-bar"></div> </div> <button class="cta-button">Continue Learning</button> </div> <div class="interactive-element"> <span>🔄</span> </div> <div class="tooltip">Rotate to explore the dynamic structure of our learning framework</div> <div class="footer"> Triangula Learning Platform — Structured knowledge, fluid learning © 2023 </div> </div> <script> document.addEventListener('DOMContentLoaded', function() { const triangles = document.querySelectorAll('.triangle'); const interactiveElement = document.querySelector('.interactive-element'); const pathCards = document.querySelectorAll('.path-card'); const progressBar = document.querySelector('.progress-bar'); // Randomize triangle initial positions slightly triangles.forEach(triangle => { const randomX = Math.random() * 20 - 10; const randomY = Math.random() * 20 - 10; const randomRotate = Math.random() * 10 - 5; triangle.style.transform = `translate(${randomX}px, ${randomY}px) rotate(${randomRotate}deg)`; }); // Interactive element functionality interactiveElement.addEventListener('click', function() { // Rotate triangles triangles.forEach(triangle => { const currentRotation = getRotationDegrees(triangle); triangle.style.transform = `rotate(${currentRotation + 45}deg)`; // Change opacity randomly triangle.style.opacity = 0.3 + Math.random() * 0.7; }); // Change progress bar const currentWidth = parseInt(progressBar.style.width) || 65; const newWidth = (currentWidth + 15) % 100 || 15; progressBar.style.width = `${newWidth}%`; }); // Path card hover effect pathCards.forEach(card => { card.addEventListener('mouseenter', function() { // Make nearby triangles respond triangles.forEach(triangle => { triangle.style.filter = 'blur(2px)'; }); }); card.addEventListener('mouseleave', function() { triangles.forEach(triangle => { triangle.style.filter = 'blur(1px)'; }); }); // Make cards clickable with simple animation card.addEventListener('click', function() { this.style.transform = 'scale(0.95)'; setTimeout(() => { this.style.transform = ''; }, 300); }); }); // CTA button effect const ctaButton = document.querySelector('.cta-button'); ctaButton.addEventListener('click', function(e) { e.preventDefault(); // Button press animation this.style.transform = 'scale(0.95)'; setTimeout(() => { this.style.transform = ''; }, 300); // Animate progress bar const currentWidth = parseInt(progressBar.style.width) || 65; const newWidth = Math.min(currentWidth + 10, 100); progressBar.style.width = `${newWidth}%`; // Animate a triangle const randomTriangle = triangles[Math.floor(Math.random() * triangles.length)]; randomTriangle.style.opacity = '0.9'; setTimeout(() => { randomTriangle.style.opacity = '0.5'; }, 500); }); // Helper function to get current rotation function getRotationDegrees(element) { const transform = window.getComputedStyle(element).getPropertyValue('transform'); if (transform === 'none') return 0; const values = transform.split('(')[1].split(')')[0].split(','); const a = values[0]; const b = values[1]; const angle = Math.round(Math.atan2(b, a) * (180/Math.PI)); return angle < 0 ? angle + 360 : angle; } }); </script> </body> </html>
<html> <head> <title>NeoVerse Gaming</title> <style> * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Rajdhani', 'Orbitron', sans-serif; } :root { --primary: #11f1ff; --secondary: #ff11c7; --tertiary: #6311ff; --bg-dark: #080a15; --bg-darker: #05070f; --text-color: #e0e0ff; } body { background-color: var(--bg-dark); color: var(--text-color); height: 100vh; overflow: hidden; display: flex; justify-content: center; align-items: center; position: relative; } .container { position: relative; width: 700px; height: 700px; overflow: hidden; display: flex; flex-direction: column; } /* Triangle Mesh Background */ .triangle-mesh { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; overflow: hidden; } .triangle { position: absolute; border-style: solid; opacity: 0; animation: pulse 3s infinite alternate; box-shadow: 0 0 15px rgba(17, 241, 255, 0.5); filter: blur(0.5px); transition: all 0.3s ease; } @keyframes pulse { 0% { opacity: 0.1; } 100% { opacity: 0.3; } } .header { padding: 20px; display: flex; justify-content: space-between; align-items: center; background: rgba(5, 7, 15, 0.8); backdrop-filter: blur(10px); border-bottom: 1px solid rgba(17, 241, 255, 0.3); z-index: 10; } .logo { font-size: 28px; font-weight: bold; background: linear-gradient(to right, var(--primary), var(--secondary)); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: 0 0 10px rgba(17, 241, 255, 0.3); letter-spacing: 1px; position: relative; } .logo::after { content: ''; position: absolute; width: 30px; height: 2px; background: var(--primary); bottom: -5px; left: 0; animation: logo-line 2s infinite alternate; } @keyframes logo-line { 0% { width: 0; opacity: 0.5; } 100% { width: 100%; opacity: 1; } } .nav { display: flex; gap: 20px; } .nav-item { cursor: pointer; padding: 5px 10px; border-radius: 4px; position: relative; transition: all 0.3s ease; color: var(--text-color); font-weight: 500; } .nav-item::before { content: ''; position: absolute; width: 0; height: 2px; bottom: 0; left: 50%; background: var(--primary); transform: translateX(-50%); transition: width 0.3s ease; } .nav-item:hover { color: var(--primary); } .nav-item:hover::before { width: 100%; } .active { color: var(--primary); } .active::before { width: 100%; } .main-content { flex: 1; display: flex; flex-direction: column; padding: 30px; position: relative; z-index: 5; } .hero { display: flex; flex-direction: column; justify-content: center; margin-bottom: 40px; } .hero h1 { font-size: 40px; margin-bottom: 20px; line-height: 1.2; text-transform: uppercase; background: linear-gradient(to right, var(--primary), var(--secondary)); -webkit-background-clip: text; background-clip: text; color: transparent; position: relative; display: inline-block; } .hero h1::after { content: ''; position: absolute; width: 60px; height: 3px; background: var(--tertiary); bottom: -10px; left: 0; } .hero p { max-width: 500px; margin-bottom: 25px; font-size: 16px; line-height: 1.5; } .cta-button { display: inline-block; background: linear-gradient(45deg, var(--tertiary), var(--secondary)); padding: 12px 30px; border-radius: 30px; cursor: pointer; font-weight: bold; font-size: 16px; color: var(--text-color); border: none; transition: all 0.3s ease; position: relative; overflow: hidden; z-index: 1; box-shadow: 0 5px 15px rgba(255, 17, 199, 0.4); width: fit-content; } .cta-button::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(45deg, var(--secondary), var(--tertiary)); z-index: -1; transform: scaleX(0); transform-origin: right; transition: transform 0.5s ease; } .cta-button:hover::before { transform: scaleX(1); transform-origin: left; } .cta-button:hover { box-shadow: 0 10px 20px rgba(255, 17, 199, 0.6); } .game-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 20px; } .card { background: rgba(8, 10, 21, 0.8); border: 1px solid rgba(17, 241, 255, 0.2); border-radius: 10px; overflow: hidden; transition: all 0.3s ease; cursor: pointer; position: relative; height: 180px; backdrop-filter: blur(5px); } .card:hover { transform: translateY(-10px); box-shadow: 0 15px 25px rgba(17, 241, 255, 0.2); border-color: var(--primary); } .card-img { height: 120px; background-size: cover; background-position: center; position: relative; overflow: hidden; } .card-img::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(to bottom, transparent, rgba(8, 10, 21, 0.8)); } .card-img-1 { background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="300" height="150" viewBox="0 0 300 150"><rect width="300" height="150" fill="%23131838"/><path d="M0,75 L300,75" stroke="%2311f1ff" stroke-width="1" stroke-dasharray="10,5"/><circle cx="150" cy="75" r="40" fill="none" stroke="%23ff11c7" stroke-width="2"/><polygon points="150,35 170,55 170,95 150,115 130,95 130,55" fill="none" stroke="%236311ff" stroke-width="2"/></svg>'); } .card-img-2 { background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="300" height="150" viewBox="0 0 300 150"><rect width="300" height="150" fill="%23131838"/><circle cx="150" cy="75" r="50" fill="none" stroke="%23ff11c7" stroke-width="2"/><rect x="125" y="50" width="50" height="50" fill="none" stroke="%2311f1ff" stroke-width="2"/><line x1="50" y1="25" x2="250" y2="125" stroke="%236311ff" stroke-width="2"/><line x1="50" y1="125" x2="250" y2="25" stroke="%236311ff" stroke-width="2"/></svg>'); } .card-img-3 { background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="300" height="150" viewBox="0 0 300 150"><rect width="300" height="150" fill="%23131838"/><polygon points="150,30 180,60 180,90 150,120 120,90 120,60" fill="none" stroke="%2311f1ff" stroke-width="2"/><circle cx="150" cy="75" r="30" fill="none" stroke="%23ff11c7" stroke-width="2"/><line x1="100" y1="40" x2="200" y2="110" stroke="%236311ff" stroke-width="2"/></svg>'); } .card-content { padding: 15px; } .card-title { font-size: 16px; margin-bottom: 5px; font-weight: bold; color: var(--primary); } .card-category { font-size: 12px; color: var(--secondary); display: flex; align-items: center; gap: 5px; } .card-category::before { content: ''; display: inline-block; width: 8px; height: 8px; background: var(--secondary); border-radius: 50%; } .card::after { content: ''; position: absolute; width: 100%; height: 3px; bottom: 0; left: 0; background: linear-gradient(to right, var(--tertiary), var(--primary), var(--secondary)); transform: scaleX(0); transform-origin: left; transition: transform 0.3s ease; } .card:hover::after { transform: scaleX(1); } .footer { padding: 20px; text-align: center; font-size: 14px; background: rgba(5, 7, 15, 0.8); backdrop-filter: blur(10px); border-top: 1px solid rgba(17, 241, 255, 0.3); z-index: 10; } .footer span { color: var(--primary); } .stats { display: flex; justify-content: space-around; margin-top: 30px; background: rgba(8, 10, 21, 0.7); border-radius: 10px; padding: 15px; border: 1px solid rgba(99, 17, 255, 0.3); } .stat { text-align: center; } .stat-number { font-size: 24px; font-weight: bold; margin-bottom: 5px; color: var(--primary); position: relative; display: inline-block; } .stat-number::after { content: ''; position: absolute; width: 20px; height: 2px; background: var(--secondary); bottom: -5px; left: 50%; transform: translateX(-50%); } .stat-label { font-size: 14px; color: var(--text-color); } .dot-glow { position: absolute; width: 4px; height: 4px; background: var(--primary); border-radius: 50%; box-shadow: 0 0 15px 5px rgba(17, 241, 255, 0.5); filter: blur(1px); opacity: 0.7; z-index: -1; } @keyframes floatAnimation { 0% { transform: translateY(0); } 50% { transform: translateY(-20px); } 100% { transform: translateY(0); } } @media (max-width: 700px) { .container { width: 100%; height: 100%; } .game-cards { grid-template-columns: repeat(2, 1fr); } .header { flex-direction: column; gap: 15px; } .hero h1 { font-size: 30px; } .stats { flex-direction: column; gap: 15px; } } @media (max-width: 500px) { .game-cards { grid-template-columns: 1fr; } .nav { flex-wrap: wrap; justify-content: center; } } /* Pulse effect for interactive elements */ @keyframes pulse-border { 0% { box-shadow: 0 0 0 0 rgba(17, 241, 255, 0.7); } 70% { box-shadow: 0 0 0 10px rgba(17, 241, 255, 0); } 100% { box-shadow: 0 0 0 0 rgba(17, 241, 255, 0); } } /* Loading animation */ .loading-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: var(--bg-darker); display: flex; justify-content: center; align-items: center; z-index: 1000; transition: opacity 0.5s ease, visibility 0.5s ease; } .loading-box { width: 200px; height: 200px; position: relative; display: flex; justify-content: center; align-items: center; flex-direction: column; } .loading-spinner { width: 80px; height: 80px; border: 4px solid transparent; border-top: 4px solid var(--primary); border-right: 4px solid var(--secondary); border-bottom: 4px solid var(--tertiary); border-radius: 50%; animation: spin 1s linear infinite; margin-bottom: 20px; } .loading-text { color: var(--primary); font-size: 18px; letter-spacing: 3px; text-transform: uppercase; } @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } .hidden { opacity: 0; visibility: hidden; } .floating-cube { position: absolute; right: 50px; bottom: 100px; perspective: 800px; z-index: 2; } .cube { width: 60px; height: 60px; transform-style: preserve-3d; animation: cube-rotate 12s infinite linear; } .cube-face { position: absolute; width: 60px; height: 60px; background: rgba(17, 241, 255, 0.1); border: 1px solid var(--primary); display: flex; justify-content: center; align-items: center; font-size: 20px; box-shadow: 0 0 15px rgba(17, 241, 255, 0.3) inset; } .cube-front { transform: translateZ(30px); } .cube-back { transform: rotateY(180deg) translateZ(30px); } .cube-right { transform: rotateY(90deg) translateZ(30px); } .cube-left { transform: rotateY(-90deg) translateZ(30px); } .cube-top { transform: rotateX(90deg) translateZ(30px); } .cube-bottom { transform: rotateX(-90deg) translateZ(30px); } @keyframes cube-rotate { 0% { transform: rotateX(0deg) rotateY(0deg); } 100% { transform: rotateX(360deg) rotateY(360deg); } } .data-stream { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; opacity: 0.15; } .data-line { position: absolute; background: linear-gradient(to bottom, rgba(17, 241, 255, 0), var(--primary), rgba(17, 241, 255, 0)); width: 1px; height: 50px; top: 0; animation: data-fall linear infinite; } @keyframes data-fall { 0% { transform: translateY(-50px); opacity: 0; } 10% { opacity: 1; } 90% { opacity: 1; } 100% { transform: translateY(700px); opacity: 0; } } /* Notification Pulse */ .notification { position: absolute; top: 20px; right: 20px; width: 10px; height: 10px; background-color: var(--secondary); border-radius: 50%; animation: pulse-notification 2s infinite; } @keyframes pulse-notification { 0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 17, 199, 0.7); } 70% { transform: scale(1.2); box-shadow: 0 0 0 10px rgba(255, 17, 199, 0); } 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 17, 199, 0); } } </style> </head> <body> <div class="container"> <!-- Loading Overlay --> <div class="loading-overlay"> <div class="loading-box"> <div class="loading-spinner"></div> <div class="loading-text">Loading Nexus</div> </div> </div> <!-- Triangle Mesh Background --> <div class="triangle-mesh" id="triangleMesh"></div> <!-- Data Stream Effect --> <div class="data-stream" id="dataStream"></div> <!-- Header --> <header class="header"> <div class="logo">NeoVerse</div> <nav class="nav"> <div class="nav-item active">Home</div> <div class="nav-item">Games</div> <div class="nav-item">Tournaments</div> <div class="nav-item">Rankings</div> <div class="notification"></div> </nav> </header> <!-- Main Content --> <main class="main-content"> <section class="hero"> <h1>Enter The Next Level</h1> <p>Join 50M+ gamers pushing the boundaries of competitive gameplay across quantum servers with sub-5ms latency. Experience titles optimized for neural interfaces.</p> <button class="cta-button">ACCESS THE GRID</button> </section> <div class="stats"> <div class="stat"> <div class="stat-number" data-count="247">0</div> <div class="stat-label">Active Tournaments</div> </div> <div class="stat"> <div class="stat-number" data-count="12503">0</div> <div class="stat-label">Online Players</div> </div> <div class="stat"> <div class="stat-number" data-count="85">0</div> <div class="stat-label">Exclusive Titles</div> </div> </div> <div class="game-cards"> <div class="card"> <div class="card-img card-img-1"></div> <div class="card-content"> <div class="card-title">Quantum Drift</div> <div class="card-category">Racing Simulator</div> </div> </div> <div class="card"> <div class="card-img card-img-2"></div> <div class="card-content"> <div class="card-title">Neon Horizon</div> <div class="card-category">Open World RPG</div> </div> </div> <div class="card"> <div class="card-img card-img-3"></div> <div class="card-content"> <div class="card-title">Synapse Arena</div> <div class="card-category">Tactical FPS</div> </div> </div> </div> <!-- Floating 3D Cube --> <div class="floating-cube"> <div class="cube"> <div class="cube-face cube-front">N</div> <div class="cube-face cube-back">E</div> <div class="cube-face cube-right">O</div> <div class="cube-face cube-left">V</div> <div class="cube-face cube-top">E</div> <div class="cube-face cube-bottom">R</div> </div> </div> </main> <!-- Footer --> <footer class="footer"> <p>NeoVerse Gaming Interface <span>v2.5.7</span> • Quantum Network</p> </footer> </div> <script> // Create triangle mesh background function createTriangleMesh() { const triangleMesh = document.getElementById('triangleMesh'); const colors = ['#11f1ff', '#ff11c7', '#6311ff']; for (let i = 0; i < 25; i++) { const triangle = document.createElement('div'); triangle.classList.add('triangle'); // Randomize triangle properties const size = Math.random() * 80 + 40; const x = Math.random() * 100; const y = Math.random() * 100; const color = colors[Math.floor(Math.random() * colors.length)]; const delay = Math.random() * 5; const duration = Math.random() * 3 + 2; // Set triangle style triangle.style.borderWidth = `${size / 2}px ${size / 2}px 0 ${size / 2}px`; triangle.style.borderColor = `transparent transparent transparent ${color}`; triangle.style.left = `${x}%`; triangle.style.top = `${y}%`; triangle.style.animationDelay = `${delay}s`; triangle.style.animationDuration = `${duration}s`; triangleMesh.appendChild(triangle); } } // Create glowing dots function createGlowingDots() { const container = document.querySelector('.container'); for (let i = 0; i < 20; i++) { const dot = document.createElement('div'); dot.classList.add('dot-glow'); const x = Math.random() * 100; const y = Math.random() * 100; const delay = Math.random() * 5; const duration = Math.random() * 5 + 3; dot.style.left = `${x}%`; dot.style.top = `${y}%`; dot.style.animation = `floatAnimation ${duration}s ease-in-out ${delay}s infinite`; container.appendChild(dot); } } // Create data stream effect function createDataStream() { const dataStream = document.getElementById('dataStream'); for (let i = 0; i < 15; i++) { const dataLine = document.createElement('div'); dataLine.classList.add('data-line'); const x = Math.random() * 100; const duration = Math.random() * 5 + 5; const delay = Math.random() * 5; dataLine.style.left = `${x}%`; dataLine.style.animationDuration = `${duration}s`; dataLine.style.animationDelay = `${delay}s`; dataStream.appendChild(dataLine); } } // Animate stat numbers counting up function animateStats() { const statNumbers = document.querySelectorAll('.stat-number'); statNumbers.forEach(stat => { const target = parseInt(stat.getAttribute('data-count')); const duration = 2000; // 2 seconds const step = Math.ceil(target / (duration / 20)); // 20ms per step let current = 0; const timer = setInterval(() => { current += step; if (current >= target) { clearInterval(timer); stat.textContent = target; } else { stat.textContent = current; } }, 20); }); } // Initialize the page after "loading" function initPage() { setTimeout(() => { document.querySelector('.loading-overlay').classList.add('hidden'); createTriangleMesh(); createGlowingDots(); createDataStream(); animateStats(); }, 2000); // Simulate 2 second loading time } // Add hover animations to cards function initCardAnimations() { const cards = document.querySelectorAll('.card'); cards.forEach(card => { card.addEventListener('mouseover', function() { this.style.animation = 'pulse-border 1.5s infinite'; }); card.addEventListener('mouseout', function() { this.style.animation = ''; }); }); } // Nav item click handler function initNavClicks() { const navItems = document.querySelectorAll('.nav-item'); navItems.forEach(item => { item.addEventListener('click', function() { navItems.forEach(nav => nav.classList.remove('active')); this.classList.add('active'); }); }); } // Initialize everything document.addEventListener('DOMContentLoaded', () => { initPage(); initCardAnimations(); initNavClicks(); // Add click effect for CTA button const ctaButton = document.querySelector('.cta-button'); ctaButton.addEventListener('click', function() { this.style.transform = 'scale(0.95)'; setTimeout(() => { this.style.transform = 'scale(1)'; }, 100); }); }); </script> </body> </html>
<html> <head> <title>Waveform - Music Streaming Service</title> <style> * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; } body { overflow: hidden; background-color: #131218; color: #fff; height: 700px; width: 700px; max-width: 100%; max-height: 100%; display: flex; justify-content: center; align-items: center; position: relative; } .container { position: relative; width: 100%; height: 100%; padding: 40px; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; } canvas { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1; } .content { position: relative; z-index: 2; width: 100%; height: 100%; display: flex; flex-direction: column; justify-content: space-between; } header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 40px; } .logo { font-size: 28px; font-weight: 800; letter-spacing: -1px; background: linear-gradient(to right, #ff5e62, #ff9966); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; display: flex; align-items: center; } .logo .triangle { width: 0; height: 0; border-left: 10px solid transparent; border-right: 10px solid transparent; border-bottom: 18px solid #ff7e62; margin-right: 10px; transform: rotate(0deg); transition: transform 0.3s ease; } .logo:hover .triangle { transform: rotate(180deg); } nav { display: flex; gap: 20px; } nav a { color: rgba(255, 255, 255, 0.7); text-decoration: none; font-size: 14px; font-weight: 500; transition: color 0.3s ease; position: relative; } nav a:hover { color: #fff; } nav a::after { content: ''; position: absolute; bottom: -5px; left: 0; width: 0; height: 2px; background: linear-gradient(to right, #ff5e62, #ff9966); transition: width 0.3s ease; } nav a:hover::after { width: 100%; } .hero { text-align: center; max-width: 600px; margin: 0 auto; } h1 { font-size: 48px; font-weight: 800; margin-bottom: 20px; line-height: 1.1; background: linear-gradient(to right, #fff, rgba(255, 255, 255, 0.7)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; } p { font-size: 16px; line-height: 1.6; color: rgba(255, 255, 255, 0.7); margin-bottom: 30px; } .cta-buttons { display: flex; justify-content: center; gap: 15px; } .button { padding: 12px 24px; border-radius: 8px; font-weight: 600; font-size: 14px; cursor: pointer; transition: all 0.3s ease; border: none; outline: none; position: relative; overflow: hidden; } .primary-button { background: linear-gradient(90deg, #ff5e62, #ff9966); color: white; } .primary-button:hover { box-shadow: 0 5px 15px rgba(255, 94, 98, 0.4); transform: translateY(-2px); } .secondary-button { background: transparent; color: white; border: 1px solid rgba(255, 255, 255, 0.3); } .secondary-button:hover { border-color: white; background: rgba(255, 255, 255, 0.05); } .button span { position: relative; z-index: 1; } .wave-effect { position: absolute; top: 50%; left: 50%; width: 0; height: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.3); transform: translate(-50%, -50%); opacity: 0; } .player { display: flex; align-items: center; gap: 20px; padding: 20px; background: rgba(0, 0, 0, 0.2); backdrop-filter: blur(10px); border-radius: 16px; margin-top: 40px; } .player-controls { display: flex; align-items: center; gap: 15px; } .play-button { width: 45px; height: 45px; border-radius: 50%; background: linear-gradient(90deg, #ff5e62, #ff9966); display: flex; justify-content: center; align-items: center; cursor: pointer; box-shadow: 0 2px 10px rgba(255, 94, 98, 0.3); transition: all 0.3s ease; } .play-button:hover { transform: scale(1.05); box-shadow: 0 5px 15px rgba(255, 94, 98, 0.5); } .play-button i { color: white; font-size: 18px; } .track-info { flex: 1; } .track-title { font-weight: 700; font-size: 16px; margin-bottom: 5px; } .track-artist { font-size: 14px; color: rgba(255, 255, 255, 0.6); } .progress-container { flex: 1; height: 5px; background: rgba(255, 255, 255, 0.1); border-radius: 3px; overflow: hidden; cursor: pointer; } .progress-bar { height: 100%; width: 30%; background: linear-gradient(90deg, #ff5e62, #ff9966); border-radius: 3px; position: relative; } .progress-bar::after { content: ''; position: absolute; right: 0; top: 50%; transform: translateY(-50%); width: 12px; height: 12px; border-radius: 50%; background: white; box-shadow: 0 0 5px rgba(0, 0, 0, 0.3); opacity: 0; transition: opacity 0.2s ease; } .progress-container:hover .progress-bar::after { opacity: 1; } .time { font-size: 12px; color: rgba(255, 255, 255, 0.6); min-width: 40px; text-align: center; } .equalizer { display: flex; align-items: flex-end; height: 20px; gap: 2px; margin-right: 15px; } .eq-bar { width: 3px; background: linear-gradient(to top, #ff5e62, #ff9966); border-radius: 1px; animation: equalize 1s infinite; } .eq-bar:nth-child(1) { animation-delay: 0.1s; } .eq-bar:nth-child(2) { animation-delay: 0.3s; } .eq-bar:nth-child(3) { animation-delay: 0.5s; } .eq-bar:nth-child(4) { animation-delay: 0.2s; } .eq-bar:nth-child(5) { animation-delay: 0.4s; } @keyframes equalize { 0% { height: 5px; } 50% { height: 15px; } 100% { height: 5px; } } .features { display: flex; justify-content: space-around; margin-top: 40px; text-align: center; } .feature { flex: 1; max-width: 180px; padding: 0 10px; } .feature-icon { width: 50px; height: 50px; margin: 0 auto 15px; display: flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, 0.05); border-radius: 12px; font-size: 20px; color: #ff7e62; } .feature h3 { font-size: 16px; margin-bottom: 10px; font-weight: 600; } .feature p { font-size: 13px; color: rgba(255, 255, 255, 0.6); line-height: 1.4; } footer { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: rgba(255, 255, 255, 0.5); padding-top: 20px; } .mode-toggle { width: 50px; height: 26px; background: rgba(255, 255, 255, 0.1); border-radius: 13px; position: relative; cursor: pointer; transition: background 0.3s ease; } .mode-toggle-handle { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: white; transition: transform 0.3s ease; } .mode-toggle.active { background: #ff7e62; } .mode-toggle.active .mode-toggle-handle { transform: translateX(24px); } /* Responsive Styles */ @media (max-width: 700px) { .container { padding: 20px; } h1 { font-size: 36px; } .features { flex-wrap: wrap; gap: 20px; } .feature { min-width: 120px; } nav { display: none; } .player { flex-direction: column; align-items: stretch; gap: 10px; } .track-info { margin-bottom: 10px; } .equalizer { display: none; } } @media (max-width: 500px) { h1 { font-size: 28px; } .cta-buttons { flex-direction: column; gap: 10px; } .features { display: none; } } </style> </head> <body> <canvas id="backgroundCanvas"></canvas> <div class="container"> <div class="content"> <header> <div class="logo"> <div class="triangle"></div> <span>waveform</span> </div> <nav> <a href="#">Features</a> <a href="#">Plans</a> <a href="#">Artists</a> <a href="#">Support</a> </nav> </header> <div class="hero"> <h1>Music that moves with you</h1> <p>Experience sound visualized. Our adaptive streaming platform reacts to every beat, creating a unique visual journey that enhances your listening experience with responsive color waves and rhythmic patterns.</p> <div class="cta-buttons"> <button class="button primary-button" id="startDemo"> <span>Try Interactive Demo</span> </button> <button class="button secondary-button"> <span>Explore Plans</span> </button> </div> <div class="player"> <div class="player-controls"> <div class="play-button" id="playButton"> <i>▶</i> </div> </div> <div class="track-info"> <div class="track-title">Prismatic Waves</div> <div class="track-artist">Synth Collective</div> </div> <div class="equalizer" id="equalizer"> <div class="eq-bar"></div> <div class="eq-bar"></div> <div class="eq-bar"></div> <div class="eq-bar"></div> <div class="eq-bar"></div> </div> <div class="time">1:24</div> <div class="progress-container"> <div class="progress-bar"></div> </div> <div class="time">4:17</div> </div> </div> <div class="features"> <div class="feature"> <div class="feature-icon">🎵</div> <h3>Reactive Visuals</h3> <p>Music-driven triangular patterns that pulse with your beats</p> </div> <div class="feature"> <div class="feature-icon">🎧</div> <h3>Spatial Audio</h3> <p>Immersive 3D soundscapes with dynamic head tracking</p> </div> <div class="feature"> <div class="feature-icon">🔍</div> <h3>Smart Discovery</h3> <p>Find new tracks with our AI-powered recommendation engine</p> </div> </div> <footer> <div>© 2023 Waveform Music</div> <div class="mode-toggle" id="modeToggle"> <div class="mode-toggle-handle"></div> </div> </footer> </div> </div> <script> document.addEventListener('DOMContentLoaded', function() { // Canvas Setup const canvas = document.getElementById('backgroundCanvas'); const ctx = canvas.getContext('2d'); // Set canvas dimensions function resizeCanvas() { canvas.width = window.innerWidth; canvas.height = window.innerHeight; } resizeCanvas(); window.addEventListener('resize', resizeCanvas); // Triangle Visualization let triangles = []; const colors = ['#ff5e62', '#ff7e62', '#ff9966', '#6a4fff', '#5a5eff']; let animationActive = false; let audioReactive = false; // Create triangles function createTriangles() { triangles = []; const numTriangles = Math.floor(canvas.width * canvas.height / 15000); for (let i = 0; i < numTriangles; i++) { triangles.push({ x: Math.random() * canvas.width, y: Math.random() * canvas.height, size: 20 + Math.random() * 60, color: colors[Math.floor(Math.random() * colors.length)], alpha: 0.1 + Math.random() * 0.2, rotation: Math.random() * Math.PI * 2, rotationSpeed: (Math.random() - 0.5) * 0.01, pulse: 0, pulseSpeed: 0.02 + Math.random() * 0.04 }); } } createTriangles(); // Draw a triangle function drawTriangle(triangle) { ctx.save(); ctx.translate(triangle.x, triangle.y); ctx.rotate(triangle.rotation); const scaleFactor = 1 + triangle.pulse * 0.2; ctx.scale(scaleFactor, scaleFactor); ctx.beginPath(); ctx.moveTo(0, -triangle.size / 2); ctx.lineTo(-triangle.size / 2, triangle.size / 2); ctx.lineTo(triangle.size / 2, triangle.size / 2); ctx.closePath(); ctx.fillStyle = triangle.color; ctx.globalAlpha = triangle.alpha; ctx.fill(); ctx.restore(); } // Animation loop function animate() { ctx.clearRect(0, 0, canvas.width, canvas.height); // Draw gradient background const gradient = ctx.createLinearGradient(0, 0, canvas.width, canvas.height); gradient.addColorStop(0, '#131218'); gradient.addColorStop(1, '#231b2e'); ctx.fillStyle = gradient; ctx.fillRect(0, 0, canvas.width, canvas.height); // Draw triangles triangles.forEach(triangle => { // Update triangle properties triangle.rotation += triangle.rotationSpeed; if (animationActive) { triangle.pulse += triangle.pulseSpeed; if (triangle.pulse > 1 || triangle.pulse < 0) { triangle.pulseSpeed *= -1; } } else { // Gradually reduce pulse if animation not active triangle.pulse *= 0.95; } drawTriangle(triangle); }); requestAnimationFrame(animate); } animate(); // Create wave effect on buttons document.querySelectorAll('.button').forEach(button => { button.addEventListener('click', function(e) { const rect = this.getBoundingClientRect(); const x = e.clientX - rect.left; const y = e.clientY - rect.top; const effect = document.createElement('span'); effect.className = 'wave-effect'; this.appendChild(effect); effect.style.left = x + 'px'; effect.style.top = y + 'px'; effect.style.animation = 'ripple 0.6s linear'; effect.addEventListener('animationend', function() { effect.remove(); }); }); }); // Toggle animation and equalizer const playButton = document.getElementById('playButton'); const equalizer = document.getElementById('equalizer'); const eqBars = document.querySelectorAll('.eq-bar'); playButton.addEventListener('click', function() { animationActive = !animationActive; if (animationActive) { playButton.innerHTML = '<i>⏸</i>'; eqBars.forEach(bar => { bar.style.animation = 'equalize 1s infinite'; }); // Make triangles more active triangles.forEach(triangle => { triangle.rotationSpeed *= 2.5; triangle.pulseSpeed *= 1.5; }); } else { playButton.innerHTML = '<i>▶</i>'; eqBars.forEach(bar => { bar.style.animation = 'none'; bar.style.height = '5px'; }); // Reset triangle activity triangles.forEach(triangle => { triangle.rotationSpeed /= 2.5; triangle.pulseSpeed /= 1.5; }); } }); // Interactive demo button const startDemo = document.getElementById('startDemo'); startDemo.addEventListener('click', function() { audioReactive = !audioReactive; if (audioReactive) { startDemo.querySelector('span').textContent = 'Stop Interactive Demo'; animationActive = true; playButton.innerHTML = '<i>⏸</i>'; // Simulate audio reactivity with random pulses const reactivity = setInterval(() => { if (!audioReactive) { clearInterval(reactivity); return; } // Apply a pulse to random triangles const pulseCount = Math.floor(triangles.length * 0.2); for (let i = 0; i < pulseCount; i++) { const index = Math.floor(Math.random() * triangles.length); triangles[index].pulse = Math.random(); } // Animate equalizer bars eqBars.forEach(bar => { const height = 5 + Math.random() * 15; bar.style.height = `${height}px`; }); }, 100); } else { startDemo.querySelector('span').textContent = 'Try Interactive Demo'; audioReactive = false; // Reset equalizer animation if (!animationActive) { eqBars.forEach(bar => { bar.style.animation = 'none'; bar.style.height = '5px'; }); } } }); // Mode toggle const modeToggle = document.getElementById('modeToggle'); modeToggle.addEventListener('click', function() { this.classList.toggle('active'); if (this.classList.contains('active')) { // Change color scheme colors.splice(0, colors.length, '#9466ff', '#6a4fff', '#5a5eff', '#66d9ff', '#ff5e62'); triangles.forEach(triangle => { triangle.color = colors[Math.floor(Math.random() * colors.length)]; }); } else { // Restore original color scheme colors.splice(0, colors.length, '#ff5e62', '#ff7e62', '#ff9966', '#6a4fff', '#5a5eff'); triangles.forEach(triangle => { triangle.color = colors[Math.floor(Math.random() * colors.length)]; }); } }); // Add some CSS animations document.head.insertAdjacentHTML('beforeend', ` <style> @keyframes ripple { 0% { width: 0; height: 0; opacity: 0.5; } 100% { width: 500px; height: 500px; opacity: 0; } } </style> `); // Progress bar interaction const progressContainer = document.querySelector('.progress-container'); const progressBar = document.querySelector('.progress-bar'); progressContainer.addEventListener('click', function(e) { const rect = this.getBoundingClientRect(); const x = e.clientX - rect.left; const percentage = (x / this.offsetWidth) * 100; progressBar.style.width = percentage + '%'; // Simulate playback position change const minutes = Math.floor((percentage / 100 * 4 * 60 + 17) / 60); const seconds = Math.floor((percentage / 100 * 4 * 60 + 17) % 60); document.querySelectorAll('.time')[0].textContent = `${minutes}:${seconds < 10 ? '0' + seconds : seconds}`; }); }); </script> </body> </html>
<html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Tranquil Triangles | The Lifestyle Blend</title> <style> /* Base Styles & Reset */ *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; } :root { --pastel-pink: #ffdbeb; --pastel-peach: #ffdfd3; --pastel-mint: #e0f5e9; --pastel-lavender: #e7e0ff; --pastel-blue: #d6f0ff; --dark-text: #2d3436; --light-text: #636e72; --off-white: #f9f9f9; } @font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 300; font-display: swap; src: url(https://fonts.gstatic.com/s/montserrat/v25/JTUHjIg1_i6t8kCHKm4532VJOt5-QNFgpCs16Hw5aXo.woff2) format('woff2'); } @font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 500; font-display: swap; src: url(https://fonts.gstatic.com/s/montserrat/v25/JTUHjIg1_i6t8kCHKm4532VJOt5-QNFgpCtZ6Hw5aXo.woff2) format('woff2'); } @font-face { font-family: 'Cormorant Garamond'; font-style: normal; font-weight: 400; font-display: swap; src: url(https://fonts.gstatic.com/s/cormorantgaramond/v16/co3bmX5slCNuHLi8bLeY9MK7whWMhyjYqXtP.woff2) format('woff2'); } @font-face { font-family: 'Cormorant Garamond'; font-style: italic; font-weight: 400; font-display: swap; src: url(https://fonts.gstatic.com/s/cormorantgaramond/v16/co3ZmX5slCNuHLi8bLeY9MK7whWMhyjYrEtImSo.woff2) format('woff2'); } body { font-family: 'Montserrat', sans-serif; font-weight: 300; line-height: 1.6; color: var(--dark-text); background-color: var(--off-white); width: 100%; height: 100%; overflow-x: hidden; } .magazine-container { width: 100%; max-width: 700px; height: 700px; margin: 0 auto; position: relative; overflow: auto; scrollbar-width: none; /* Firefox */ } .magazine-container::-webkit-scrollbar { display: none; /* Chrome, Safari, Edge */ } /* Triangle Background */ .triangle-bg { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; opacity: 0.7; background-image: linear-gradient(120deg, var(--pastel-pink) 0%, transparent 40%), linear-gradient(240deg, var(--pastel-mint) 0%, transparent 40%), linear-gradient(0deg, var(--pastel-lavender) 0%, transparent 30%); filter: contrast(1.05); transition: all 0.5s ease; } .triangle-texture { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; opacity: 0.05; background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23000000' fill-opacity='0.15'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"); } /* Navigation */ nav { padding: 20px 25px; display: flex; justify-content: space-between; align-items: center; background-color: rgba(255, 255, 255, 0.8); backdrop-filter: blur(10px); border-bottom: 1px solid rgba(0, 0, 0, 0.05); position: sticky; top: 0; z-index: 100; } .logo { font-family: 'Cormorant Garamond', serif; font-size: 24px; font-weight: 400; letter-spacing: 1px; position: relative; cursor: pointer; } .logo::after { content: ''; position: absolute; width: 0; height: 2px; bottom: -2px; left: 0; background: linear-gradient(90deg, var(--pastel-pink), var(--pastel-mint)); transition: width 0.3s ease; } .logo:hover::after { width: 100%; } .menu-icon { width: 24px; height: 20px; position: relative; cursor: pointer; z-index: 200; } .menu-icon span { display: block; width: 100%; height: 2px; background-color: var(--dark-text); position: absolute; transition: all 0.3s ease; } .menu-icon span:nth-child(1) { top: 0; } .menu-icon span:nth-child(2) { top: 9px; } .menu-icon span:nth-child(3) { bottom: 0; } .menu-icon.active span:nth-child(1) { transform: rotate(45deg); top: 9px; } .menu-icon.active span:nth-child(2) { opacity: 0; } .menu-icon.active span:nth-child(3) { transform: rotate(-45deg); bottom: 9px; } .menu { position: fixed; top: 0; right: -300px; width: 300px; height: 100%; background: rgba(255, 255, 255, 0.95); padding: 80px 40px; z-index: 100; transition: right 0.4s cubic-bezier(0.65, 0, 0.35, 1); backdrop-filter: blur(10px); box-shadow: -5px 0 20px rgba(0, 0, 0, 0.05); } .menu.active { right: 0; } .menu ul { list-style: none; } .menu li { margin-bottom: 25px; } .menu a { color: var(--dark-text); text-decoration: none; font-size: 18px; position: relative; display: inline-block; padding-bottom: 5px; transition: color 0.3s ease; } .menu a::after { content: ''; position: absolute; width: 0; height: 1px; bottom: 0; left: 0; background-color: var(--dark-text); transition: width 0.3s ease; } .menu a:hover { color: var(--light-text); } .menu a:hover::after { width: 100%; } /* Main Content */ main { padding: 30px 25px; } .featured-article { margin-bottom: 40px; } .article-category { text-transform: uppercase; font-size: 11px; letter-spacing: 1.5px; color: var(--light-text); margin-bottom: 10px; position: relative; display: inline-block; } .article-category::after { content: ''; position: absolute; width: 30px; height: 1px; background-color: var(--light-text); right: -40px; top: 50%; } h1 { font-family: 'Cormorant Garamond', serif; font-size: 38px; line-height: 1.2; margin-bottom: 20px; position: relative; display: inline-block; } .article-meta { display: flex; align-items: center; margin-bottom: 20px; font-size: 13px; color: var(--light-text); } .article-meta span:not(:last-child) { margin-right: 15px; } .article-meta .dot { width: 3px; height: 3px; background-color: var(--light-text); border-radius: 50%; display: inline-block; margin: 0 10px; } .article-image { width: 100%; height: 300px; border-radius: 8px; background-color: var(--pastel-lavender); overflow: hidden; margin-bottom: 25px; position: relative; transform: translateZ(0); } .article-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; } .article-image:hover img { transform: scale(1.05); } .article-excerpt { font-size: 16px; color: var(--light-text); line-height: 1.7; margin-bottom: 20px; } .article-link { display: inline-block; color: var(--dark-text); text-decoration: none; font-weight: 500; font-size: 14px; padding-bottom: 2px; border-bottom: 1px solid currentColor; transition: all 0.3s ease; } .article-link:hover { color: var(--light-text); padding-bottom: 5px; } .articles-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 25px; margin-top: 50px; } .grid-article { display: flex; flex-direction: column; } .grid-article .article-image { height: 180px; margin-bottom: 15px; } .grid-article h2 { font-family: 'Cormorant Garamond', serif; font-size: 22px; line-height: 1.3; margin-bottom: 10px; } .grid-article .article-meta { margin-bottom: 12px; font-size: 12px; } .grid-article .article-excerpt { font-size: 14px; margin-bottom: 12px; } /* Newsletter */ .newsletter { margin-top: 50px; padding: 30px 25px; background: linear-gradient(135deg, var(--pastel-peach), var(--pastel-pink)); border-radius: 10px; text-align: center; position: relative; overflow: hidden; } .newsletter::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: radial-gradient(circle, transparent 30%, rgba(255, 255, 255, 0.1) 100%); z-index: 0; } .newsletter h3 { font-family: 'Cormorant Garamond', serif; font-size: 26px; margin-bottom: 15px; position: relative; z-index: 1; } .newsletter p { font-size: 14px; color: var(--dark-text); margin-bottom: 20px; max-width: 400px; margin-left: auto; margin-right: auto; position: relative; z-index: 1; } .newsletter-form { display: flex; max-width: 400px; margin: 0 auto; position: relative; z-index: 1; } .newsletter-input { flex: 1; padding: 12px 15px; border: none; border-radius: 5px 0 0 5px; font-family: 'Montserrat', sans-serif; font-size: 14px; outline: none; } .newsletter-button { background-color: var(--dark-text); color: white; border: none; padding: 0 20px; border-radius: 0 5px 5px 0; font-family: 'Montserrat', sans-serif; font-size: 14px; font-weight: 500; cursor: pointer; transition: background-color 0.3s ease; } .newsletter-button:hover { background-color: #1e272e; } /* Footer */ footer { padding: 30px 25px; text-align: center; font-size: 13px; color: var(--light-text); margin-top: 50px; } .social-links { display: flex; justify-content: center; margin-bottom: 20px; } .social-link { width: 36px; height: 36px; border-radius: 50%; background-color: white; display: flex; align-items: center; justify-content: center; margin: 0 8px; transition: transform 0.3s ease, box-shadow 0.3s ease; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05); } .social-link:hover { transform: translateY(-3px); box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1); } .social-icon { width: 18px; height: 18px; fill: var(--dark-text); } /* Animations */ @keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } } .fade-in { animation: fadeIn 0.8s ease forwards; opacity: 0; } .delay-1 { animation-delay: 0.1s; } .delay-2 { animation-delay: 0.2s; } .delay-3 { animation-delay: 0.3s; } .delay-4 { animation-delay: 0.4s; } /* Responsive */ @media (max-width: 600px) { h1 { font-size: 32px; } .articles-grid { grid-template-columns: 1fr; } .newsletter h3 { font-size: 22px; } .newsletter-form { flex-direction: column; } .newsletter-input { border-radius: 5px; margin-bottom: 10px; } .newsletter-button { border-radius: 5px; padding: 12px; } } /* Cursor effect */ .cursor-dot { width: 5px; height: 5px; background-color: var(--dark-text); border-radius: 50%; position: fixed; pointer-events: none; z-index: 999; opacity: 0; transition: opacity 0.3s ease; } .cursor-circle { width: 40px; height: 40px; border: 1px solid var(--dark-text); border-radius: 50%; position: fixed; pointer-events: none; z-index: 999; opacity: 0; transition: width 0.3s ease, height 0.3s ease, opacity 0.3s ease; } </style> </head> <body> <div class="triangle-bg"></div> <div class="triangle-texture"></div> <div class="cursor-dot"></div> <div class="cursor-circle"></div> <div class="magazine-container"> <nav> <div class="logo">Tranquil Triangles</div> <div class="menu-icon"> <span></span> <span></span> <span></span> </div> <div class="menu"> <ul> <li><a href="#">Home</a></li> <li><a href="#">Lifestyle</a></li> <li><a href="#">Wellness</a></li> <li><a href="#">Creativity</a></li> <li><a href="#">About</a></li> <li><a href="#">Contact</a></li> </ul> </div> </nav> <main> <article class="featured-article fade-in"> <div class="article-category">Mindful Living</div> <h1>The Art of Creating Peaceful Spaces in a Chaotic World</h1> <div class="article-meta"> <span>By Emma Laurent</span> <span class="dot"></span> <span>June 12, 2023</span> <span class="dot"></span> <span>8 min read</span> </div> <div class="article-image"> <img src="https://images.unsplash.com/photo-1617104678098-de229db51175?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=2072&q=80" alt="A minimalist living room with soft pastel colors and natural light"> </div> <p class="article-excerpt">In today's constantly connected environment, creating intentional moments of calm isn't just a luxury—it's essential. Discover how thoughtful design choices and mindful arrangements can transform your living space into a sanctuary that nurtures your wellbeing and creativity.</p> <a href="#" class="article-link">Continue Reading →</a> </article> <div class="articles-grid"> <article class="grid-article fade-in delay-1"> <div class="article-image"> <img src="https://images.unsplash.com/photo-1533090161767-e6ffed986c88?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=2069&q=80" alt="Morning ritual with coffee and journal"> </div> <div class="article-category">Daily Rituals</div> <h2>Morning Routines That Spark Joy and Creativity</h2> <div class="article-meta"> <span>By James Cole</span> <span class="dot"></span> <span>June 10</span> </div> <p class="article-excerpt">Elevate your mornings with intentional practices that set a positive tone for your entire day.</p> <a href="#" class="article-link">Read More →</a> </article> <article class="grid-article fade-in delay-2"> <div class="article-image"> <img src="https://images.unsplash.com/photo-1515266591878-f93e32bc5937?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=2187&q=80" alt="A person journaling in a sunlit room"> </div> <div class="article-category">Wellness</div> <h2>The Therapeutic Power of Journaling with Intention</h2> <div class="article-meta"> <span>By Olivia Chen</span> <span class="dot"></span> <span>June 8</span> </div> <p class="article-excerpt">More than just writing down thoughts—discover how structured reflection can transform your mindset.</p> <a href="#" class="article-link">Read More →</a> </article> <article class="grid-article fade-in delay-3"> <div class="article-image"> <img src="https://images.unsplash.com/photo-1583847268964-b28dc8f51f92?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1974&q=80" alt="Pastel color palette with paint brushes"> </div> <div class="article-category">Design Trends</div> <h2>Pastel Palettes: How Soft Colors Impact Your Mood</h2> <div class="article-meta"> <span>By Nina Patel</span> <span class="dot"></span> <span>June 5</span> </div> <p class="article-excerpt">The psychology behind why gentle hues create spaces that feel both vibrant and calming.</p> <a href="#" class="article-link">Read More →</a> </article> <article class="grid-article fade-in delay-4"> <div class="article-image"> <img src="https://images.unsplash.com/photo-1486312338219-ce68d2c6f44d?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=2072&q=80" alt="Person working on a laptop with plants nearby"> </div> <div class="article-category">Digital Wellbeing</div> <h2>Creating Boundaries in an Always-On Culture</h2> <div class="article-meta"> <span>By Marcus Rey</span> <span class="dot"></span> <span>June 3</span> </div> <p class="article-excerpt">Practical strategies for maintaining focus and presence when notifications never stop.</p> <a href="#" class="article-link">Read More →</a> </article> </div> <div class="newsletter fade-in"> <h3>Moments of Inspiration</h3> <p>Join our thoughtfully curated newsletter for weekly doses of creative ideas, mindful practices, and design inspiration.</p> <div class="newsletter-form"> <input type="email" class="newsletter-input" placeholder="Your email address"> <button class="newsletter-button">Subscribe</button> </div> </div> </main> <footer> <div class="social-links"> <a href="#" class="social-link"> <svg class="social-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 2.163c3.204 0 3.584.012 4.85.07 3.252.148 4.771 1.691 4.919 4.919.058 1.265.069 1.645.069 4.849 0 3.205-.012 3.584-.069 4.849-.149 3.225-1.664 4.771-4.919 4.919-1.266.058-1.644.07-4.85.07-3.204 0-3.584-.012-4.849-.07-3.26-.149-4.771-1.699-4.919-4.92-.058-1.265-.07-1.644-.07-4.849 0-3.204.013-3.583.07-4.849.149-3.227 1.664-4.771 4.919-4.919 1.266-.057 1.645-.069 4.849-.069zm0-2.163c-3.259 0-3.667.014-4.947.072-4.358.2-6.78 2.618-6.98 6.98-.059 1.281-.073 1.689-.073 4.948 0 3.259.014 3.668.072 4.948.2 4.358 2.618 6.78 6.98 6.98 1.281.058 1.689.072 4.948.072 3.259 0 3.668-.014 4.948-.072 4.354-.2 6.782-2.618 6.979-6.98.059-1.28.073-1.689.073-4.948 0-3.259-.014-3.667-.072-4.947-.196-4.354-2.617-6.78-6.979-6.98-1.281-.059-1.69-.073-4.949-.073zm0 5.838c-3.403 0-6.162 2.759-6.162 6.162s2.759 6.163 6.162 6.163 6.162-2.759 6.162-6.163c0-3.403-2.759-6.162-6.162-6.162zm0 10.162c-2.209 0-4-1.79-4-4 0-2.209 1.791-4 4-4s4 1.791 4 4c0 2.21-1.791 4-4 4zm6.406-11.845c-.796 0-1.441.645-1.441 1.44s.645 1.44 1.441 1.44c.795 0 1.439-.645 1.439-1.44s-.644-1.44-1.439-1.44z"/></svg> </a> <a href="#" class="social-link"> <svg class="social-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M22.675 0h-21.35c-.732 0-1.325.593-1.325 1.325v21.351c0 .731.593 1.324 1.325 1.324h11.495v-9.294h-3.128v-3.622h3.128v-2.671c0-3.1 1.893-4.788 4.659-4.788 1.325 0 2.463.099 2.795.143v3.24l-1.918.001c-1.504 0-1.795.715-1.795 1.763v2.313h3.587l-.467 3.622h-3.12v9.293h6.116c.73 0 1.323-.593 1.323-1.325v-21.35c0-.732-.593-1.325-1.325-1.325z"/></svg> </a> <a href="#" class="social-link"> <svg class="social-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M24 4.557c-.883.392-1.832.656-2.828.775 1.017-.609 1.798-1.574 2.165-2.724-.951.564-2.005.974-3.127 1.195-.897-.957-2.178-1.555-3.594-1.555-3.179 0-5.515 2.966-4.797 6.045-4.091-.205-7.719-2.165-10.148-5.144-1.29 2.213-.669 5.108 1.523 6.574-.806-.026-1.566-.247-2.229-.616-.054 2.281 1.581 4.415 3.949 4.89-.693.188-1.452.232-2.224.084.626 1.956 2.444 3.379 4.6 3.419-2.07 1.623-4.678 2.348-7.29 2.04 2.179 1.397 4.768 2.212 7.548 2.212 9.142 0 14.307-7.721 13.995-14.646.962-.695 1.797-1.562 2.457-2.549z"/></svg> </a> <a href="#" class="social-link"> <svg class="social-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 0c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm-2 16h-2v-6h2v6zm-1-6.891c-.607 0-1.1-.496-1.1-1.109 0-.612.492-1.109 1.1-1.109s1.1.497 1.1 1.109c0 .613-.493 1.109-1.1 1.109zm8 6.891h-1.998v-2.861c0-1.881-2.002-1.722-2.002 0v2.861h-2v-6h2v1.093c.872-1.616 4-1.736 4 1.548v3.359z"/></svg> </a> </div> <p>© 2023 Tranquil Triangles. All rights reserved.</p> </footer> </div> <script> document.addEventListener('DOMContentLoaded', function() { // Menu toggle const menuIcon = document.querySelector('.menu-icon'); const menu = document.querySelector('.menu'); menuIcon.addEventListener('click', function() { this.classList.toggle('active'); menu.classList.toggle('active'); }); // Close menu when clicking outside document.addEventListener('click', function(e) { if (!menu.contains(e.target) && !menuIcon.contains(e.target) && menu.classList.contains('active')) { menu.classList.remove('active'); menuIcon.classList.remove('active'); } }); // Custom cursor effect const cursorDot = document.querySelector('.cursor-dot'); const cursorCircle = document.querySelector('.cursor-circle'); if (window.innerWidth > 768) { // Only on desktop // Show cursors after a delay setTimeout(() => { cursorDot.style.opacity = '1'; cursorCircle.style.opacity = '0.5'; }, 1000); // Move custom cursor with mouse document.addEventListener('mousemove', function(e) { cursorDot.style.left = e.clientX + 'px'; cursorDot.style.top = e.clientY + 'px'; // Delayed movement for circle setTimeout(() => { cursorCircle.style.left = (e.clientX - 20) + 'px'; cursorCircle.style.top = (e.clientY - 20) + 'px'; }, 100); }); // Hover effect for links const links = document.querySelectorAll('a, .menu-icon, button'); links.forEach(link => { link.addEventListener('mouseenter', () => { cursorCircle.style.width = '60px'; cursorCircle.style.height = '60px'; cursorCircle.style.borderColor = 'var(--pastel-pink)'; }); link.addEventListener('mouseleave', () => { cursorCircle.style.width = '40px'; cursorCircle.style.height = '40px'; cursorCircle.style.borderColor = 'var(--dark-text)'; }); }); } // Background parallax effect document.addEventListener('mousemove', function(e) { const triangleBg = document.querySelector('.triangle-bg'); if (triangleBg) { const x = e.clientX / window.innerWidth; const y = e.clientY / window.innerHeight; triangleBg.style.backgroundPosition = `${x * 20}px ${y * 20}px`; } }); // Newsletter form const newsletterForm = document.querySelector('.newsletter-form'); const newsletterInput = document.querySelector('.newsletter-input'); const newsletterButton = document.querySelector('.newsletter-button'); newsletterButton.addEventListener('click', function(e) { e.preventDefault(); if (newsletterInput.value.trim() !== '') { // Show success animation instead of submitting newsletterInput.style.display = 'none'; newsletterButton.style.display = 'none'; const successMessage = document.createElement('div'); successMessage.textContent = 'Thanks for subscribing!'; successMessage.style.padding = '12px'; successMessage.style.backgroundColor = 'white'; successMessage.style.borderRadius = '5px'; successMessage.style.fontWeight = '500'; newsletterForm.appendChild(successMessage); } }); // Gentle hover effect for article images const articleImages = document.querySelectorAll('.article-image'); articleImages.forEach(image => { image.addEventListener('mouseenter', function() { this.style.boxShadow = '0 10px 30px rgba(0, 0, 0, 0.1)'; }); image.addEventListener('mouseleave', function() { this.style.boxShadow = 'none'; }); }); }); </script> </body> </html>
<html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Tranquil Mind - Health and Wellness App</title> <style> * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; } body, html { width: 100%; height: 100%; overflow: hidden; background-color: #f0f8ff; } .app-container { position: relative; width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px; overflow: hidden; } .triangle-pattern { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; overflow: hidden; } .app-content { background-color: rgba(255, 255, 255, 0.85); border-radius: 20px; padding: 30px; width: 90%; max-width: 600px; max-height: 80%; overflow-y: auto; box-shadow: 0 8px 32px rgba(78, 139, 139, 0.1); backdrop-filter: blur(8px); z-index: 2; transition: transform 0.5s ease, box-shadow 0.5s ease; } .app-content:hover { transform: translateY(-5px); box-shadow: 0 12px 40px rgba(78, 139, 139, 0.2); } .app-header { display: flex; align-items: center; margin-bottom: 25px; } .app-logo { width: 50px; height: 50px; background: linear-gradient(135deg, #4facb8, #6bbaa7); border-radius: 12px; margin-right: 15px; display: flex; align-items: center; justify-content: center; color: white; font-size: 24px; font-weight: bold; box-shadow: 0 4px 15px rgba(79, 172, 184, 0.3); } .app-title { color: #2d7d8a; } .app-title h1 { font-size: 1.8rem; margin-bottom: 5px; font-weight: 600; } .app-title p { color: #59999f; font-size: 0.9rem; } .app-features { margin-top: 30px; } .feature-card { background: white; border-radius: 15px; padding: 20px; margin-bottom: 15px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05); transition: all 0.3s ease; position: relative; z-index: 1; overflow: hidden; } .feature-card:before { content: ''; position: absolute; top: 0; left: 0; width: 4px; height: 100%; background: linear-gradient(to bottom, #4facb8, #6bbaa7); transition: width 0.3s ease; z-index: -1; } .feature-card:hover:before { width: 100%; } .feature-card:hover { transform: translateX(5px); color: white; } .feature-card:hover h3, .feature-card:hover p { color: white; } .feature-card h3 { color: #2d7d8a; margin-bottom: 10px; font-weight: 600; transition: color 0.3s ease; } .feature-card p { color: #666; font-size: 0.9rem; transition: color 0.3s ease; } .mindfulness-meter { margin-top: 30px; text-align: center; } .meter-label { display: flex; justify-content: space-between; margin-bottom: 10px; color: #2d7d8a; font-weight: 500; } .meter-track { width: 100%; height: 10px; background-color: #e0f2f1; border-radius: 5px; position: relative; overflow: hidden; } .meter-fill { position: absolute; left: 0; top: 0; height: 100%; width: 0; background: linear-gradient(90deg, #4facb8, #6bbaa7); border-radius: 5px; transition: width 1.5s cubic-bezier(0.65, 0, 0.35, 1); } .breathing-circle { width: 100px; height: 100px; border-radius: 50%; background: radial-gradient(circle, #6bbaa7, #4facb8); margin: 30px auto; display: flex; align-items: center; justify-content: center; color: white; font-size: 0.9rem; text-align: center; cursor: pointer; box-shadow: 0 0 0 rgba(79, 172, 184, 0.4); animation: pulse 4s infinite; transition: transform 0.3s ease; } .breathing-circle:hover { transform: scale(1.05); } @keyframes pulse { 0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(79, 172, 184, 0.7); } 70% { transform: scale(1); box-shadow: 0 0 0 15px rgba(79, 172, 184, 0); } 100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(79, 172, 184, 0); } } .cta-button { display: block; width: 100%; padding: 15px; background: linear-gradient(135deg, #4facb8, #6bbaa7); color: white; border: none; border-radius: 10px; font-weight: 600; text-align: center; margin-top: 30px; cursor: pointer; transition: all 0.3s ease; box-shadow: 0 4px 15px rgba(79, 172, 184, 0.3); } .cta-button:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(79, 172, 184, 0.4); } @media (max-width: 600px) { .app-content { padding: 20px; width: 95%; } .app-header { flex-direction: column; text-align: center; } .app-logo { margin-right: 0; margin-bottom: 15px; } } /* Custom scrollbar */ ::-webkit-scrollbar { width: 8px; } ::-webkit-scrollbar-track { background: #e0f2f1; border-radius: 10px; } ::-webkit-scrollbar-thumb { background: #4facb8; border-radius: 10px; } ::-webkit-scrollbar-thumb:hover { background: #409aa6; } .breathing-state { transition: opacity 0.5s ease; font-weight: 500; } .tooltip { position: absolute; background: rgba(255, 255, 255, 0.95); border-radius: 8px; padding: 10px 15px; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); font-size: 0.85rem; color: #2d7d8a; opacity: 0; transform: translateY(10px); transition: opacity 0.3s, transform 0.3s; pointer-events: none; z-index: 100; max-width: 200px; text-align: center; } .tooltip.visible { opacity: 1; transform: translateY(0); } .highlight-area { position: absolute; background: radial-gradient(circle, rgba(107, 186, 167, 0.2) 0%, rgba(107, 186, 167, 0) 70%); border-radius: 50%; pointer-events: none; z-index: -1; transition: opacity 1s ease; } </style> </head> <body> <div class="app-container"> <div class="triangle-pattern" id="trianglePattern"></div> <div class="app-content"> <div class="app-header"> <div class="app-logo">TM</div> <div class="app-title"> <h1>Tranquil Mind</h1> <p>Cultivate peace in your daily routine</p> </div> </div> <div class="app-features"> <div class="feature-card"> <h3>Guided Meditation</h3> <p>Personalized sessions that adapt to your stress levels and breathing patterns for deeper mindfulness practice.</p> </div> <div class="feature-card"> <h3>Sleep Analysis</h3> <p>Track sleep cycles and receive custom recommendations to improve rest quality using non-invasive monitoring.</p> </div> <div class="feature-card"> <h3>Mindful Moments</h3> <p>Gentle reminders throughout your day to pause, breathe, and reconnect with your center.</p> </div> </div> <div class="mindfulness-meter"> <div class="meter-label"> <span>Daily Mindfulness Progress</span> <span id="progressPercentage">0%</span> </div> <div class="meter-track"> <div class="meter-fill" id="meterFill"></div> </div> </div> <div class="breathing-circle" id="breathingCircle"> <span class="breathing-state" id="breathingText">Tap to<br>start<br>breathing</span> </div> <button class="cta-button" id="ctaButton">Begin Your Journey</button> </div> <div class="tooltip" id="tooltip"></div> </div> <script> document.addEventListener('DOMContentLoaded', function() { // Create triangle pattern createTrianglePattern(); // Animate meter fill setTimeout(() => { const meterFill = document.getElementById('meterFill'); const progressPercentage = document.getElementById('progressPercentage'); const progress = Math.floor(Math.random() * 40) + 30; // Random between 30% and 70% meterFill.style.width = `${progress}%`; progressPercentage.textContent = `${progress}%`; }, 500); // Breathing exercise const breathingCircle = document.getElementById('breathingCircle'); const breathingText = document.getElementById('breathingText'); let isBreathing = false; let breathingInterval; breathingCircle.addEventListener('click', () => { if (!isBreathing) { startBreathing(); } else { stopBreathing(); } }); function startBreathing() { isBreathing = true; let phase = 0; // 0: inhale, 1: hold, 2: exhale, 3: hold let seconds = 4; // Starting with 4 seconds inhale updateBreathingUI(phase, seconds); breathingInterval = setInterval(() => { seconds--; if (seconds <= 0) { phase = (phase + 1) % 4; switch(phase) { case 0: // Inhale seconds = 4; break; case 1: // Hold seconds = 2; break; case 2: // Exhale seconds = 6; break; case 3: // Hold seconds = 2; break; } } updateBreathingUI(phase, seconds); }, 1000); } function updateBreathingUI(phase, seconds) { switch(phase) { case 0: breathingText.textContent = `Inhale\n${seconds}`; breathingCircle.style.animation = 'none'; breathingCircle.style.transform = `scale(${1 + (0.3 * (4 - seconds) / 4)})`; break; case 1: breathingText.textContent = `Hold\n${seconds}`; breathingCircle.style.transform = 'scale(1.3)'; break; case 2: breathingText.textContent = `Exhale\n${seconds}`; breathingCircle.style.transform = `scale(${1.3 - (0.35 * (6 - seconds) / 6)})`; break; case 3: breathingText.textContent = `Hold\n${seconds}`; breathingCircle.style.transform = 'scale(0.95)'; break; } } function stopBreathing() { isBreathing = false; clearInterval(breathingInterval); breathingText.textContent = "Tap to\nstart\nbreathing"; breathingCircle.style.animation = 'pulse 4s infinite'; breathingCircle.style.transform = 'scale(1)'; } // Tooltip functionality const tooltip = document.getElementById('tooltip'); const featureCards = document.querySelectorAll('.feature-card'); featureCards.forEach(card => { card.addEventListener('mouseenter', (e) => { const title = card.querySelector('h3').textContent; let tooltipText = ''; switch(title) { case 'Guided Meditation': tooltipText = 'Our AI analyzes your heart rate and breathing to create a personalized meditation experience'; break; case 'Sleep Analysis': tooltipText = 'Uses ambient sound monitoring to detect sleep phases without wearable devices'; break; case 'Mindful Moments': tooltipText = 'Intelligently schedules brief moments of mindfulness during natural breaks in your day'; break; } tooltip.textContent = tooltipText; tooltip.style.left = `${e.pageX - 100}px`; tooltip.style.top = `${e.pageY - 80}px`; tooltip.classList.add('visible'); }); card.addEventListener('mouseleave', () => { tooltip.classList.remove('visible'); }); }); // CTA button effect const ctaButton = document.getElementById('ctaButton'); ctaButton.addEventListener('click', () => { ctaButton.textContent = 'Journey Started!'; setTimeout(() => { ctaButton.textContent = 'Begin Your Journey'; }, 2000); // Create highlight effect createHighlightEffect(ctaButton); }); // Create moving highlight areas setInterval(createRandomHighlight, 3000); }); function createTrianglePattern() { const trianglePattern = document.getElementById('trianglePattern'); const canvas = document.createElement('canvas'); const ctx = canvas.getContext('2d'); // Set canvas size canvas.width = window.innerWidth; canvas.height = window.innerHeight; // Define triangle size and spacing const size = Math.min(canvas.width, canvas.height) / 10; const spacing = size * 0.5; // Create triangle pattern for (let y = -size; y < canvas.height + size; y += size + spacing) { for (let x = -size; x < canvas.width + size * 2; x += size + spacing) { // Add some randomness to positions const offsetX = Math.random() * spacing * 0.5; const offsetY = Math.random() * spacing * 0.5; // Calculate distance from center for color gradient const centerX = canvas.width / 2; const centerY = canvas.height / 2; const distance = Math.sqrt(Math.pow(x - centerX, 2) + Math.pow(y - centerY, 2)); const maxDistance = Math.sqrt(Math.pow(canvas.width, 2) + Math.pow(canvas.height, 2)) / 2; const opacity = Math.max(0.05, 1 - distance / maxDistance); // Choose color based on position const hue = 180 + Math.sin(x / canvas.width * Math.PI) * 20 + Math.cos(y / canvas.height * Math.PI) * 20; const saturation = 60 + Math.sin(y / canvas.height * Math.PI) * 20; const lightness = 60 + Math.cos(x / canvas.width * Math.PI) * 10; // Draw triangle ctx.beginPath(); ctx.moveTo(x + offsetX, y + offsetY); ctx.lineTo(x + size + offsetX, y + offsetY); ctx.lineTo(x + size/2 + offsetX, y + size + offsetY); ctx.closePath(); // Fill with gradient ctx.fillStyle = `hsla(${hue}, ${saturation}%, ${lightness}%, ${opacity})`; ctx.fill(); } } // Add canvas to pattern container trianglePattern.appendChild(canvas); } function createHighlightEffect(element) { const rect = element.getBoundingClientRect(); const highlight = document.createElement('div'); highlight.classList.add('highlight-area'); highlight.style.width = '250px'; highlight.style.height = '250px'; highlight.style.left = `${rect.left + rect.width / 2 - 125}px`; highlight.style.top = `${rect.top + rect.height / 2 - 125}px`; document.body.appendChild(highlight); setTimeout(() => { highlight.style.opacity = '0'; setTimeout(() => { highlight.remove(); }, 1000); }, 1500); } function createRandomHighlight() { const appContent = document.querySelector('.app-content'); const rect = appContent.getBoundingClientRect(); const highlight = document.createElement('div'); highlight.classList.add('highlight-area'); const size = Math.random() * 150 + 100; const x = Math.random() * rect.width; const y = Math.random() * rect.height; highlight.style.width = `${size}px`; highlight.style.height = `${size}px`; highlight.style.left = `${rect.left + x - size/2}px`; highlight.style.top = `${rect.top + y - size/2}px`; highlight.style.opacity = '0.4'; document.body.appendChild(highlight); setTimeout(() => { highlight.style.opacity = '0'; setTimeout(() => { highlight.remove(); }, 1000); }, 2000); } </script> </body> </html>