Dividers are essential elements in web design, providing structure and clarity to your content. They help break up sections, making your website more readable and visually appealing.
In this article, we will explore 10 divider examples that can enhance your UI design. Each example showcases different styles and functionalities to suit various design needs.
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 it easy to create pixel-perfect UI every time. Loved by designers and developers alike, Subframe ensures your dividers are both stunning and functional.
Start for free and elevate your design game 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 UI design game? With Subframe, you can create pixel-perfect dividers and stunning UIs in minutes. Our drag-and-drop editor ensures efficiency and precision.
Start for free and begin designing immediately. Transform your ideas into beautiful, functional interfaces today!
<html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>The Brief | Minimalist News</title> <style> @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap'); :root { --primary-color: #212121; --secondary-color: #f8f8f8; --accent-color: #3a86ff; --divider-color: #e0e0e0; --text-light: #757575; --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); } * { box-sizing: border-box; margin: 0; padding: 0; } body { font-family: 'Inter', sans-serif; line-height: 1.6; color: var(--primary-color); background-color: var(--secondary-color); overflow-x: hidden; max-width: 700px; margin: 0 auto; height: 700px; overflow-y: auto; } header { padding: 1.5rem 1rem; background-color: white; position: sticky; top: 0; z-index: 100; box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05); } .header-content { display: flex; justify-content: space-between; align-items: center; max-width: 650px; margin: 0 auto; } .logo { font-weight: 700; font-size: 1.5rem; letter-spacing: -0.02em; color: var(--primary-color); } .logo span { color: var(--accent-color); } .nav-toggle { background: none; border: none; cursor: pointer; display: flex; flex-direction: column; justify-content: space-between; height: 14px; width: 22px; } .nav-toggle span { display: block; height: 2px; width: 100%; background-color: var(--primary-color); transition: var(--transition); } .nav-toggle:hover span:nth-child(2) { width: 70%; margin-left: auto; } main { max-width: 650px; margin: 0 auto; padding: 0.5rem 1rem 2rem; } .article { padding: 1.5rem 0; transform: translateY(20px); opacity: 0; transition: var(--transition); } .article.visible { transform: translateY(0); opacity: 1; } .article-meta { display: flex; align-items: center; margin-bottom: 0.5rem; font-size: 0.85rem; color: var(--text-light); } .article-category { background-color: rgba(58, 134, 255, 0.1); color: var(--accent-color); padding: 0.2rem 0.5rem; border-radius: 3px; margin-right: 1rem; font-weight: 500; letter-spacing: 0.01em; } .article-time { display: flex; align-items: center; } .article-time svg { margin-right: 0.3rem; height: 14px; width: 14px; opacity: 0.6; } .article h2 { font-size: 1.5rem; font-weight: 600; line-height: 1.3; margin-bottom: 0.75rem; letter-spacing: -0.01em; } .article p { color: #454545; margin-bottom: 0.75rem; } .article-footer { display: flex; justify-content: space-between; align-items: center; padding-top: 0.5rem; } .read-more { display: inline-flex; align-items: center; color: var(--accent-color); text-decoration: none; font-weight: 500; font-size: 0.9rem; transition: var(--transition); } .read-more svg { margin-left: 0.3rem; transition: var(--transition); } .read-more:hover { opacity: 0.85; } .read-more:hover svg { transform: translateX(3px); } .article-interactions { display: flex; align-items: center; } .interaction-btn { background: none; border: none; display: flex; align-items: center; color: var(--text-light); font-size: 0.85rem; margin-left: 1rem; cursor: pointer; transition: var(--transition); } .interaction-btn svg { margin-right: 0.3rem; height: 16px; width: 16px; transition: var(--transition); } .interaction-btn:hover { color: var(--primary-color); } .interaction-btn.like:hover svg { fill: #ff4d4d; transform: scale(1.1); } .interaction-btn.bookmark:hover svg { fill: var(--accent-color); transform: scale(1.1); } .divider { height: 1px; background-color: var(--divider-color); width: 100%; position: relative; transition: transform 0.6s ease; transform-origin: left; transform: scaleX(0); } .divider.visible { transform: scaleX(1); } .divider::after { content: ""; position: absolute; top: 0; left: 0; height: 1px; width: 30px; background-color: var(--accent-color); opacity: 0; transition: opacity 0.3s ease 0.3s; } .divider.visible::after { opacity: 1; } @media (max-width: 480px) { .header-content { padding: 0; } .article h2 { font-size: 1.3rem; } .article-meta { flex-wrap: wrap; } .interaction-btn span { display: none; } .interaction-btn { margin-left: 0.8rem; } } </style> </head> <body> <header> <div class="header-content"> <div class="logo">the<span>brief</span></div> <button class="nav-toggle" aria-label="Toggle navigation"> <span></span> <span></span> <span></span> </button> </div> </header> <main> <article class="article"> <div class="article-meta"> <span class="article-category">Technology</span> <div class="article-time"> <svg xmlns="http://www.w3.org/2000/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="10"></circle> <polyline points="12 6 12 12 16 14"></polyline> </svg> <span>5 min read</span> </div> </div> <h2>Researchers Develop New AI Model That Can Detect Misinformation With 93% Accuracy</h2> <p>Stanford researchers have created an advanced deep learning model capable of identifying subtle patterns in fake news across multiple languages and formats. The model analyzes linguistic cues, citation credibility, and comparative data analysis.</p> <div class="article-footer"> <a href="#" class="read-more">Continue reading <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="5" y1="12" x2="19" y2="12"></line> <polyline points="12 5 19 12 12 19"></polyline> </svg> </a> <div class="article-interactions"> <button class="interaction-btn like"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <path d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"></path> </svg> <span>126</span> </button> <button class="interaction-btn bookmark"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <path d="M19 21l-7-5-7 5V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z"></path> </svg> <span>Save</span> </button> </div> </div> </article> <div class="divider"></div> <article class="article"> <div class="article-meta"> <span class="article-category">Climate</span> <div class="article-time"> <svg xmlns="http://www.w3.org/2000/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="10"></circle> <polyline points="12 6 12 12 16 14"></polyline> </svg> <span>3 min read</span> </div> </div> <h2>European Cities Implement Radical Urban Cooling Systems to Combat Heatwaves</h2> <p>Barcelona, Paris, and Vienna are pioneering innovative cooling infrastructure including mist networks, reflective building materials, and underground cooling grids. With temperatures rising 2.5°C above pre-industrial levels, these systems have reduced ambient temperatures by up to 8°C in test zones.</p> <div class="article-footer"> <a href="#" class="read-more">Continue reading <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="5" y1="12" x2="19" y2="12"></line> <polyline points="12 5 19 12 12 19"></polyline> </svg> </a> <div class="article-interactions"> <button class="interaction-btn like"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <path d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"></path> </svg> <span>87</span> </button> <button class="interaction-btn bookmark"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <path d="M19 21l-7-5-7 5V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z"></path> </svg> <span>Save</span> </button> </div> </div> </article> <div class="divider"></div> <article class="article"> <div class="article-meta"> <span class="article-category">Business</span> <div class="article-time"> <svg xmlns="http://www.w3.org/2000/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="10"></circle> <polyline points="12 6 12 12 16 14"></polyline> </svg> <span>4 min read</span> </div> </div> <h2>Four-Day Work Week Trial Reports 35% Productivity Increase Across Participating Companies</h2> <p>A six-month trial involving 73 companies and over 2,900 workers has shown remarkable results, with 92% of organizations planning to continue the reduced schedule. Employee well-being metrics improved dramatically with stress levels down by 39% and work-life satisfaction up by 44%.</p> <div class="article-footer"> <a href="#" class="read-more">Continue reading <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="5" y1="12" x2="19" y2="12"></line> <polyline points="12 5 19 12 12 19"></polyline> </svg> </a> <div class="article-interactions"> <button class="interaction-btn like"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <path d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"></path> </svg> <span>204</span> </button> <button class="interaction-btn bookmark"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <path d="M19 21l-7-5-7 5V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z"></path> </svg> <span>Save</span> </button> </div> </div> </article> <div class="divider"></div> <article class="article"> <div class="article-meta"> <span class="article-category">Health</span> <div class="article-time"> <svg xmlns="http://www.w3.org/2000/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="10"></circle> <polyline points="12 6 12 12 16 14"></polyline> </svg> <span>6 min read</span> </div> </div> <h2>New Blood Test Can Detect 50 Types of Cancer Before Symptoms Appear</h2> <p>Scientists have developed a groundbreaking multi-cancer early detection test that identifies specific DNA fragments shed by tumors. The test has a false positive rate of just 0.5% and can pinpoint the tissue of origin with 89% accuracy, potentially revolutionizing cancer screening protocols worldwide.</p> <div class="article-footer"> <a href="#" class="read-more">Continue reading <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="5" y1="12" x2="19" y2="12"></line> <polyline points="12 5 19 12 12 19"></polyline> </svg> </a> <div class="article-interactions"> <button class="interaction-btn like"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <path d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"></path> </svg> <span>173</span> </button> <button class="interaction-btn bookmark"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <path d="M19 21l-7-5-7 5V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z"></path> </svg> <span>Save</span> </button> </div> </div> </article> </main> <script> // Intersection Observer to handle scroll animations document.addEventListener('DOMContentLoaded', () => { const articles = document.querySelectorAll('.article'); const dividers = document.querySelectorAll('.divider'); // Observer for articles const articleObserver = new IntersectionObserver((entries) => { entries.forEach(entry => { if (entry.isIntersecting) { entry.target.classList.add('visible'); articleObserver.unobserve(entry.target); } }); }, { threshold: 0.1, rootMargin: '-10px 0px' }); // Observer for dividers const dividerObserver = new IntersectionObserver((entries) => { entries.forEach(entry => { if (entry.isIntersecting) { entry.target.classList.add('visible'); dividerObserver.unobserve(entry.target); } }); }, { threshold: 0.5 }); // Observe all articles and dividers articles.forEach(article => articleObserver.observe(article)); dividers.forEach(divider => dividerObserver.observe(divider)); // Navigation toggle button const navToggle = document.querySelector('.nav-toggle'); navToggle.addEventListener('click', () => { navToggle.classList.toggle('active'); // If we had a navigation menu, we would toggle it here // For now, just do a simple animation if (navToggle.classList.contains('active')) { navToggle.querySelector('span:nth-child(1)').style.transform = 'translateY(6px) rotate(45deg)'; navToggle.querySelector('span:nth-child(2)').style.opacity = '0'; navToggle.querySelector('span:nth-child(3)').style.transform = 'translateY(-6px) rotate(-45deg)'; } else { navToggle.querySelector('span:nth-child(1)').style.transform = 'none'; navToggle.querySelector('span:nth-child(2)').style.opacity = '1'; navToggle.querySelector('span:nth-child(3)').style.transform = 'none'; } }); // Interaction buttons const likeButtons = document.querySelectorAll('.interaction-btn.like'); likeButtons.forEach(button => { button.addEventListener('click', () => { const countElement = button.querySelector('span'); let count = parseInt(countElement.textContent); if (button.classList.contains('liked')) { button.classList.remove('liked'); count--; } else { button.classList.add('liked'); count++; // Add like animation const heart = button.querySelector('svg'); heart.animate([ { transform: 'scale(1)' }, { transform: 'scale(1.3)' }, { transform: 'scale(1)' } ], { duration: 300, easing: 'ease-in-out' }); } countElement.textContent = count; }); }); const bookmarkButtons = document.querySelectorAll('.interaction-btn.bookmark'); bookmarkButtons.forEach(button => { button.addEventListener('click', () => { button.classList.toggle('bookmarked'); button.querySelector('span').textContent = button.classList.contains('bookmarked') ? 'Saved' : 'Save'; // Add bookmark animation const bookmark = button.querySelector('svg'); bookmark.animate([ { transform: 'scale(1)' }, { transform: 'scale(1.2)' }, { transform: 'scale(1)' } ], { duration: 300, easing: 'ease-in-out' }); }); }); // Add staggered animation to articles on initial load articles.forEach((article, index) => { setTimeout(() => { article.classList.add('visible'); }, 100 * index); }); // Add staggered animation to dividers on initial load dividers.forEach((divider, index) => { setTimeout(() => { divider.classList.add('visible'); }, 300 * index + 200); }); }); </script> </body> </html>
<html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>E-commerce Gradient Divider</title> <style> * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Poppins', sans-serif; } body { background-color: #f8f9fa; color: #333; width: 100%; height: 100%; overflow-x: hidden; } .container { max-width: 700px; margin: 0 auto; padding: 20px; height: 700px; overflow-y: auto; position: relative; } .section-title { font-size: 1.8rem; margin-bottom: 15px; color: #2a2a2a; font-weight: 600; } .top-products { margin-bottom: 30px; } .product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; margin-bottom: 10px; } .product-card { background: white; border-radius: 10px; overflow: hidden; box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05); transition: transform 0.3s ease, box-shadow 0.3s ease; position: relative; } .product-card:hover { transform: translateY(-5px); box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1); } .product-img { width: 100%; height: 120px; object-fit: cover; display: block; } .product-info { padding: 12px; } .product-name { font-size: 0.9rem; font-weight: 500; margin-bottom: 5px; color: #333; } .product-price { font-size: 1rem; font-weight: 600; color: #ff6b6b; } /* The Gradient Divider */ .gradient-divider { position: relative; height: 80px; width: 100%; margin: 20px 0; background: linear-gradient(90deg, #ff6b6b, #3a1c71, #43cea2); border-radius: 8px; overflow: hidden; box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1); cursor: pointer; transform-style: preserve-3d; perspective: 1000px; } .gradient-divider::before { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: linear-gradient(45deg, transparent 25%, rgba(255, 255, 255, 0.1) 25%, rgba(255, 255, 255, 0.1) 50%, transparent 50%, transparent 75%, rgba(255, 255, 255, 0.1) 75%); background-size: 15px 15px; animation: movePattern 8s linear infinite; z-index: 1; } .divider-content { position: relative; z-index: 2; height: 100%; display: flex; align-items: center; justify-content: center; padding: 0 20px; color: white; text-align: center; transform: translateZ(20px); transition: transform 0.3s ease; } .divider-title { font-size: 1.4rem; font-weight: 700; text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); } .divider-tagline { font-size: 0.9rem; opacity: 0.9; margin-top: 5px; } .featured-collection { position: relative; } .featured-badge { position: absolute; top: -8px; right: -8px; background: #ff6b6b; color: white; padding: 5px 10px; border-radius: 20px; font-size: 0.7rem; font-weight: 600; z-index: 10; box-shadow: 0 4px 8px rgba(255, 107, 107, 0.3); transform: scale(0); animation: pop 0.3s ease forwards; } .bottom-products { padding-top: 10px; } @keyframes movePattern { 0% { background-position: 0 0; } 100% { background-position: 50px 50px; } } @keyframes pop { 0% { transform: scale(0); } 70% { transform: scale(1.2); } 100% { transform: scale(1); } } /* Promotion Banner */ .promo-banner { width: 100%; height: 100px; background: linear-gradient(135deg, #43cea2 0%, #3a1c71 100%); border-radius: 8px; margin-bottom: 20px; position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; padding: 0 20px; box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1); } .promo-content { color: white; z-index: 2; } .promo-title { font-size: 1.2rem; font-weight: 700; margin-bottom: 5px; } .promo-desc { font-size: 0.85rem; opacity: 0.9; } .promo-cta { background: white; color: #3a1c71; border: none; padding: 8px 15px; border-radius: 20px; font-weight: 600; cursor: pointer; transition: all 0.3s ease; box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1); z-index: 2; } .promo-cta:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15); } .promo-banner::after { content: ''; position: absolute; width: 150px; height: 150px; background: rgba(255, 255, 255, 0.1); border-radius: 50%; top: -50px; right: -50px; } .promo-banner::before { content: ''; position: absolute; width: 100px; height: 100px; background: rgba(255, 255, 255, 0.1); border-radius: 50%; bottom: -30px; left: 30px; } /* Responsive styles */ @media (max-width: 600px) { .product-grid { grid-template-columns: repeat(2, 1fr); } .section-title { font-size: 1.5rem; } .divider-title { font-size: 1.2rem; } .gradient-divider { height: 70px; } .promo-banner { flex-direction: column; height: auto; padding: 15px; justify-content: center; text-align: center; } .promo-content { margin-bottom: 10px; } } @media (max-width: 400px) { .product-grid { grid-template-columns: 1fr; } } </style> </head> <body> <div class="container"> <section class="top-products"> <h2 class="section-title">Trending Now</h2> <div class="product-grid"> <div class="product-card"> <img src="https://images.unsplash.com/photo-1511499767150-a48a237f0083?ixlib=rb-1.2.1&auto=format&fit=crop&w=800&q=80" alt="Wireless Headphones" class="product-img"> <div class="product-info"> <h3 class="product-name">Noise-Canceling Headphones</h3> <p class="product-price">$129.99</p> </div> </div> <div class="product-card"> <img src="https://images.unsplash.com/photo-1585386930608-70f23b19ead7?ixlib=rb-1.2.1&auto=format&fit=crop&w=800&q=80" alt="Smart Watch" class="product-img"> <div class="product-info"> <h3 class="product-name">Fitness Tracker 3.0</h3> <p class="product-price">$89.95</p> </div> </div> <div class="product-card"> <img src="https://images.unsplash.com/photo-1556656793-08538906a9f8?ixlib=rb-1.2.1&auto=format&fit=crop&w=800&q=80" alt="Backpack" class="product-img"> <div class="product-info"> <h3 class="product-name">Urban Commuter Backpack</h3> <p class="product-price">$75.00</p> </div> </div> </div> </section> <div class="gradient-divider" id="gradient-divider"> <div class="divider-content"> <div> <h3 class="divider-title">Summer Collection 2023</h3> <p class="divider-tagline">Bold styles for the season ahead</p> </div> </div> </div> <section class="promo-banner"> <div class="promo-content"> <h3 class="promo-title">Flash Sale: 48 Hours Only</h3> <p class="promo-desc">30% off all seasonal items with code: SUMMER30</p> </div> <button class="promo-cta">Shop Now</button> </section> <section class="bottom-products"> <h2 class="section-title">Featured Collection</h2> <div class="product-grid"> <div class="product-card featured-collection"> <span class="featured-badge">New</span> <img src="https://images.unsplash.com/photo-1523275335684-37898b6baf30?ixlib=rb-1.2.1&auto=format&fit=crop&w=800&q=80" alt="Smart Watch" class="product-img"> <div class="product-info"> <h3 class="product-name">Minimalist Watch</h3> <p class="product-price">$149.99</p> </div> </div> <div class="product-card featured-collection"> <span class="featured-badge">Hot</span> <img src="https://images.unsplash.com/photo-1491553895911-0055eca6402d?ixlib=rb-1.2.1&auto=format&fit=crop&w=800&q=80" alt="Sneakers" class="product-img"> <div class="product-info"> <h3 class="product-name">Ultralight Runners</h3> <p class="product-price">$119.95</p> </div> </div> <div class="product-card featured-collection"> <span class="featured-badge">Best</span> <img src="https://images.unsplash.com/photo-1542291026-7eec264c27ff?ixlib=rb-1.2.1&auto=format&fit=crop&w=800&q=80" alt="Red Sneakers" class="product-img"> <div class="product-info"> <h3 class="product-name">Limited Edition Kicks</h3> <p class="product-price">$159.00</p> </div> </div> </div> </section> </div> <script> document.addEventListener('DOMContentLoaded', function() { // 3D effect for the gradient divider const divider = document.getElementById('gradient-divider'); divider.addEventListener('mousemove', function(e) { const rect = divider.getBoundingClientRect(); const x = e.clientX - rect.left; const y = e.clientY - rect.top; const xRotation = ((y / rect.height) * 10) - 5; const yRotation = ((x / rect.width) * -10) + 5; divider.style.transform = `perspective(1000px) rotateX(${xRotation}deg) rotateY(${yRotation}deg) scale3d(1.02, 1.02, 1.02)`; }); divider.addEventListener('mouseout', function() { divider.style.transform = 'perspective(1000px) rotateX(0) rotateY(0) scale3d(1, 1, 1)'; }); // Animated pulse effect for the divider when clicked divider.addEventListener('click', function() { this.style.animation = 'none'; setTimeout(() => { this.style.animation = 'pulse 0.5s ease'; }, 5); // Change gradient on click for interactive effect const gradients = [ 'linear-gradient(90deg, #ff6b6b, #3a1c71, #43cea2)', 'linear-gradient(90deg, #8E2DE2, #4A00E0, #5614B0)', 'linear-gradient(90deg, #F953C6, #B91D73, #F12711)', 'linear-gradient(90deg, #FC466B, #3F5EFB, #667eea)' ]; const currentGradient = divider.style.background; let nextGradient; do { nextGradient = gradients[Math.floor(Math.random() * gradients.length)]; } while (nextGradient === currentGradient); divider.style.background = nextGradient; }); // Add hover effect to product cards const productCards = document.querySelectorAll('.product-card'); productCards.forEach(card => { card.addEventListener('mouseenter', function() { const productImg = this.querySelector('.product-img'); productImg.style.transition = 'transform 0.5s ease'; productImg.style.transform = 'scale(1.1)'; }); card.addEventListener('mouseleave', function() { const productImg = this.querySelector('.product-img'); productImg.style.transform = 'scale(1)'; }); }); // Animation for promo CTA button const promoCta = document.querySelector('.promo-cta'); promoCta.addEventListener('click', function(e) { e.preventDefault(); this.style.animation = 'none'; setTimeout(() => { this.style.animation = 'pop 0.3s ease'; }, 5); }); }); </script> </body> </html>
<html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Samuel Chen — Interactive Portfolio</title> <style> @import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&display=swap'); @import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display&display=swap'); :root { --primary: #0d0e26; --secondary: #ff6b6b; --accent: #4ecdc4; --light: #f7f7f7; --dark: #222639; --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1); } * { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: 'Space Grotesk', sans-serif; background-color: var(--light); color: var(--primary); line-height: 1.6; overflow-x: hidden; height: 100vh; } .container { max-width: 700px; width: 100%; margin: 0 auto; padding: 0; position: relative; overflow: hidden; height: 100vh; } .scroll-container { height: 100vh; overflow-y: auto; overflow-x: hidden; scroll-behavior: smooth; position: relative; scroll-snap-type: y mandatory; } section { height: 100vh; scroll-snap-align: start; padding: 2rem; display: flex; flex-direction: column; justify-content: center; position: relative; } section:nth-child(even) { background-color: var(--light); } h1 { font-family: 'DM Serif Display', serif; font-size: 3.5rem; margin-bottom: 1.5rem; line-height: 1.1; position: relative; z-index: 2; } h2 { font-family: 'DM Serif Display', serif; font-size: 2.5rem; margin-bottom: 1rem; position: relative; z-index: 2; } p { font-size: 1.1rem; margin-bottom: 1.5rem; max-width: 40ch; position: relative; z-index: 2; } .btn { display: inline-block; padding: 0.8rem 1.5rem; background: var(--dark); color: var(--light); text-decoration: none; border-radius: 50px; font-weight: 500; border: none; cursor: pointer; transition: var(--transition); position: relative; overflow: hidden; z-index: 2; } .btn:hover { background: var(--secondary); transform: translateY(-2px); box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1); } .divider-container { position: absolute; bottom: 0; left: 0; width: 100%; height: 150px; overflow: hidden; z-index: 1; } .divider { width: 100%; height: 100%; background-color: var(--light); transition: var(--transition); position: relative; } .divider-path { width: 100%; height: 100%; position: absolute; top: 0; left: 0; } .project-card { background: white; border-radius: 12px; padding: 1.5rem; margin-bottom: 1.5rem; box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05); transition: var(--transition); cursor: pointer; position: relative; z-index: 2; } .project-card:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1); } .project-card h3 { margin-bottom: 0.5rem; color: var(--dark); } .project-card p { font-size: 0.9rem; margin-bottom: 0; } .tag { display: inline-block; padding: 0.2rem 0.6rem; background: rgba(78, 205, 196, 0.2); color: var(--accent); border-radius: 50px; font-size: 0.7rem; margin-right: 0.5rem; margin-bottom: 0.5rem; } .cursor { width: 20px; height: 20px; border-radius: 50%; background-color: var(--secondary); position: fixed; pointer-events: none; mix-blend-mode: difference; z-index: 9999; transform: translate(-50%, -50%); transition: width 0.2s, height 0.2s; opacity: 0.7; } @media (max-width: 768px) { h1 { font-size: 2.5rem; } h2 { font-size: 2rem; } .divider-container { height: 100px; } } .highlight { color: var(--secondary); position: relative; display: inline-block; } .highlight::after { content: ''; position: absolute; width: 100%; height: 8px; background-color: rgba(78, 205, 196, 0.3); bottom: 5px; left: 0; z-index: -1; } .shapes-container { position: absolute; width: 100%; height: 100%; top: 0; left: 0; overflow: hidden; z-index: 1; opacity: 0.1; } .shape { position: absolute; border-radius: 50%; background: var(--accent); animation: floatAnimation 10s infinite ease-in-out; } .shape:nth-child(1) { width: 100px; height: 100px; top: 20%; left: 10%; animation-delay: 0s; background: var(--secondary); } .shape:nth-child(2) { width: 150px; height: 150px; top: 60%; left: 80%; animation-delay: 1s; } .shape:nth-child(3) { width: 70px; height: 70px; top: 40%; left: 60%; animation-delay: 2s; background: var(--dark); } @keyframes floatAnimation { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-20px) rotate(5deg); } } /* Custom scrollbar */ .scroll-container::-webkit-scrollbar { width: 5px; } .scroll-container::-webkit-scrollbar-track { background: transparent; } .scroll-container::-webkit-scrollbar-thumb { background-color: var(--secondary); border-radius: 10px; } .progress-container { position: fixed; top: 0; left: 0; width: 100%; height: 5px; background: transparent; z-index: 1000; } .progress-bar { height: 100%; background: var(--secondary); width: 0%; transition: width 0.1s linear; } </style> </head> <body> <div class="cursor"></div> <div class="progress-container"> <div class="progress-bar" id="progressBar"></div> </div> <div class="container"> <div class="scroll-container" id="scrollContainer"> <section id="hero"> <div class="shapes-container"> <div class="shape"></div> <div class="shape"></div> <div class="shape"></div> </div> <h1>Crafting <span class="highlight">interactive</span> experiences that tell your story</h1> <p>I'm Samuel Chen, a digital designer and frontend developer focused on creating fluid, animated interfaces that engage users through meaningful transitions.</p> <a href="#work" class="btn">See my work</a> <div class="divider-container"> <div class="divider"> <svg class="divider-path" viewBox="0 0 1200 200" preserveAspectRatio="none"> <path id="path-hero" d="M0,0 C300,100 900,0 1200,80 L1200,200 L0,200 Z" fill="var(--dark)"></path> </svg> </div> </div> </section> <section id="work" style="background-color: var(--dark); color: var(--light);"> <h2>Recent <span class="highlight">Projects</span></h2> <p>Each project is crafted with attention to both aesthetic and functional details, focusing on smooth transitions and engaging animations.</p> <div class="project-card"> <h3>Morphing E-commerce Experience</h3> <p>Custom scroll animations that transform product views with fluid shape transitions.</p> <div class="tags"> <span class="tag">Animation</span> <span class="tag">E-commerce</span> <span class="tag">WebGL</span> </div> </div> <div class="project-card"> <h3>Interactive Story Navigation</h3> <p>A narrative-driven interface where transitions between chapters use morphing SVG dividers.</p> <div class="tags"> <span class="tag">SVG Animation</span> <span class="tag">Storytelling</span> <span class="tag">GSAP</span> </div> </div> <div class="divider-container"> <div class="divider"> <svg class="divider-path" viewBox="0 0 1200 200" preserveAspectRatio="none"> <path id="path-work" d="M0,100 C400,180 800,0 1200,100 L1200,200 L0,200 Z" fill="var(--light)"></path> </svg> </div> </div> </section> <section id="about"> <div class="shapes-container"> <div class="shape"></div> <div class="shape"></div> <div class="shape"></div> </div> <h2>My <span class="highlight">Approach</span></h2> <p>I believe transitions aren't just decorative elements—they're storytelling tools that guide users through a digital journey, creating memorable experiences that resonate.</p> <p>By carefully choreographing how elements enter, exit, and transform on the page, I create intuitive interfaces that feel alive and responsive.</p> <a href="#contact" class="btn">Get in touch</a> <div class="divider-container"> <div class="divider"> <svg class="divider-path" viewBox="0 0 1200 200" preserveAspectRatio="none"> <path id="path-about" d="M0,50 C200,150 1000,0 1200,100 L1200,200 L0,200 Z" fill="var(--dark)"></path> </svg> </div> </div> </section> <section id="contact" style="background-color: var(--dark); color: var(--light);"> <h2>Let's <span class="highlight">Connect</span></h2> <p>Interested in adding fluid transitions and engaging animations to your next project? Let's discuss how we can bring your vision to life with movement and interaction.</p> <div style="margin-top: 1rem;"> <button class="btn" id="contactBtn" style="background: var(--secondary); margin-right: 1rem;">Send message</button> <button class="btn" style="background: transparent; border: 1px solid var(--light);">View resume</button> </div> <div id="successMessage" style="margin-top: 1rem; display: none; color: var(--accent); font-weight: 500;"> Thanks for reaching out! I'll get back to you soon. </div> </section> </div> </div> <script> document.addEventListener('DOMContentLoaded', () => { const cursor = document.querySelector('.cursor'); const scrollContainer = document.getElementById('scrollContainer'); const progressBar = document.getElementById('progressBar'); const contactBtn = document.getElementById('contactBtn'); const successMessage = document.getElementById('successMessage'); // Paths for morphing const pathHero = document.getElementById('path-hero'); const pathWork = document.getElementById('path-work'); const pathAbout = document.getElementById('path-about'); // Original path values const originalPaths = { hero: "M0,0 C300,100 900,0 1200,80 L1200,200 L0,200 Z", work: "M0,100 C400,180 800,0 1200,100 L1200,200 L0,200 Z", about: "M0,50 C200,150 1000,0 1200,100 L1200,200 L0,200 Z" }; // Target path values (for morphing) const targetPaths = { hero: "M0,40 C500,0 700,180 1200,60 L1200,200 L0,200 Z", work: "M0,80 C300,0 900,180 1200,60 L1200,200 L0,200 Z", about: "M0,120 C400,20 800,160 1200,80 L1200,200 L0,200 Z" }; // Custom Cursor document.addEventListener('mousemove', (e) => { cursor.style.left = `${e.clientX}px`; cursor.style.top = `${e.clientY}px`; }); document.addEventListener('mousedown', () => { cursor.style.width = '15px'; cursor.style.height = '15px'; }); document.addEventListener('mouseup', () => { cursor.style.width = '20px'; cursor.style.height = '20px'; }); // Buttons and links hover effect const interactiveElements = document.querySelectorAll('a, button, .project-card'); interactiveElements.forEach(el => { el.addEventListener('mouseenter', () => { cursor.style.width = '50px'; cursor.style.height = '50px'; cursor.style.mixBlendMode = 'normal'; cursor.style.backgroundColor = 'rgba(78, 205, 196, 0.3)'; }); el.addEventListener('mouseleave', () => { cursor.style.width = '20px'; cursor.style.height = '20px'; cursor.style.mixBlendMode = 'difference'; cursor.style.backgroundColor = 'var(--secondary)'; }); }); // Contact form button contactBtn.addEventListener('click', () => { successMessage.style.display = 'block'; contactBtn.style.backgroundColor = 'var(--accent)'; contactBtn.textContent = 'Message sent!'; setTimeout(() => { successMessage.style.display = 'none'; contactBtn.style.backgroundColor = 'var(--secondary)'; contactBtn.textContent = 'Send message'; }, 3000); }); // Scroll progress scrollContainer.addEventListener('scroll', () => { const scrollTop = scrollContainer.scrollTop; const height = scrollContainer.scrollHeight - scrollContainer.clientHeight; const scrolled = (scrollTop / height) * 100; progressBar.style.width = scrolled + '%'; // Calculate which section we're in const scrollPosition = scrollTop / scrollContainer.scrollHeight; // Morphing animation based on scroll if (scrollPosition < 0.33) { const progress = scrollPosition / 0.33; const pathData = interpolatePath(originalPaths.hero, targetPaths.hero, progress); pathHero.setAttribute('d', pathData); } else if (scrollPosition < 0.66) { const progress = (scrollPosition - 0.33) / 0.33; const pathData = interpolatePath(originalPaths.work, targetPaths.work, progress); pathWork.setAttribute('d', pathData); } else { const progress = (scrollPosition - 0.66) / 0.34; const pathData = interpolatePath(originalPaths.about, targetPaths.about, progress); pathAbout.setAttribute('d', pathData); } }); // Function to interpolate between two SVG paths function interpolatePath(pathA, pathB, progress) { // Extract control points from the paths const pointsA = extractPoints(pathA); const pointsB = extractPoints(pathB); // Interpolate between control points const interpolatedPoints = pointsA.map((point, index) => { const targetPoint = pointsB[index]; return { x: point.x + (targetPoint.x - point.x) * progress, y: point.y + (targetPoint.y - point.y) * progress }; }); // Reconstruct the path return constructPath(interpolatedPoints); } // Extract control points from SVG path function extractPoints(path) { // This is a simplified version - a real implementation would parse the SVG path syntax correctly const numbers = path.match(/-?\d+(\.\d+)?/g).map(Number); const points = []; // M0,0 C300,100 900,0 1200,80 L1200,200 L0,200 Z // Extract the starting point points.push({ x: numbers[0], y: numbers[1] }); // Extract the three control points of the cubic bezier points.push({ x: numbers[2], y: numbers[3] }); points.push({ x: numbers[4], y: numbers[5] }); points.push({ x: numbers[6], y: numbers[7] }); // Extract the line-to points points.push({ x: numbers[8], y: numbers[9] }); points.push({ x: numbers[10], y: numbers[11] }); return points; } // Construct SVG path from control points function constructPath(points) { return `M${points[0].x},${points[0].y} C${points[1].x},${points[1].y} ${points[2].x},${points[2].y} ${points[3].x},${points[3].y} L${points[4].x},${points[4].y} L${points[5].x},${points[5].y} Z`; } // Smooth scrolling for anchor links document.querySelectorAll('a[href^="#"]').forEach(anchor => { anchor.addEventListener('click', function(e) { e.preventDefault(); const targetId = this.getAttribute('href'); const targetElement = document.querySelector(targetId); if (targetElement) { targetElement.scrollIntoView({ behavior: 'smooth' }); } }); }); }); </script> </body> </html>
<html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Organic Food Blog Divider</title> <style> * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Playfair Display', serif; } body { width: 100%; height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; background-color: #fdfbf7; overflow-x: hidden; padding: 20px; } .blog-container { width: 100%; max-width: 650px; position: relative; overflow: hidden; } .blog-header { text-align: center; margin-bottom: 30px; } .blog-title { font-size: 2.2rem; color: #4a3c30; margin-bottom: 10px; font-weight: 700; } .blog-subtitle { font-size: 1.1rem; color: #968674; font-style: italic; } .content-section { margin-bottom: 35px; } p { line-height: 1.8; color: #5b5146; font-size: 1rem; margin-bottom: 15px; font-family: 'Lora', serif; } /* The organic divider */ .organic-divider { position: relative; height: 120px; width: 100%; display: flex; align-items: center; justify-content: center; transition: all 0.4s ease; cursor: pointer; margin: 10px 0 30px; } .organic-divider:hover { transform: translateY(-5px); } .divider-shape { width: 100%; height: 70px; position: relative; overflow: hidden; opacity: 0; transform: scale(0.95); transition: all 1s cubic-bezier(0.23, 1, 0.32, 1); } .divider-inner { position: absolute; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; } .wave-path { fill: none; stroke-width: 3; stroke-linecap: round; stroke-dasharray: 1000; stroke-dashoffset: 1000; transition: stroke-dashoffset 2s ease-in-out; } .leaf { position: absolute; width: 30px; height: 30px; opacity: 0; transform: translateY(20px) rotate(0deg); transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275); } .leaf-1 { left: 30%; top: 10px; } .leaf-2 { right: 30%; top: 10px; } .divider-text { position: absolute; color: #b78d65; font-size: 1.1rem; letter-spacing: 2px; font-weight: 400; opacity: 0; transform: translateY(10px); transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1); text-align: center; width: 100%; } .active .divider-shape { opacity: 1; transform: scale(1); } .active .wave-path { stroke-dashoffset: 0; } .active .leaf { opacity: 1; transform: translateY(0) rotate(5deg); } .active .leaf-1 { transition-delay: 1.2s; } .active .leaf-2 { transition-delay: 1.4s; } .active .divider-text { opacity: 1; transform: translateY(0); transition-delay: 1s; } .herb-accent { position: absolute; width: 70px; height: 70px; background-size: contain; background-repeat: no-repeat; z-index: -1; opacity: 0.2; transition: all 0.3s ease; } .herb-1 { top: 20px; left: 5px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' fill='%23a86c41'%3E%3Cpath d='M50,10 C30,20 20,50 30,80 C40,60 45,30 50,10 C55,30 60,60 70,80 C80,50 70,20 50,10 Z'/%3E%3C/svg%3E"); transform: rotate(-30deg); } .herb-2 { bottom: 20px; right: 5px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' fill='%238e5e3b'%3E%3Cpath d='M50,10 C40,30 35,60 40,80 C20,60 25,30 50,10 C75,30 80,60 60,80 C65,60 60,30 50,10 Z'/%3E%3C/svg%3E"); transform: rotate(25deg); } .content-section:hover .herb-accent { opacity: 0.4; transform: rotate(0deg) scale(1.1); } @media (max-width: 600px) { .blog-title { font-size: 1.8rem; } .blog-subtitle { font-size: 1rem; } .organic-divider { height: 100px; } .divider-shape { height: 50px; } .leaf { width: 20px; height: 20px; } .divider-text { font-size: 0.9rem; } } /* Tags */ .tags { display: flex; flex-wrap: wrap; margin-bottom: 20px; justify-content: center; } .tag { background-color: #f0e6d9; color: #8e5e3b; padding: 6px 14px; border-radius: 30px; margin: 0 5px 8px 0; font-size: 0.85rem; transition: all 0.3s ease; cursor: pointer; border: 1px solid transparent; opacity: 0; transform: translateY(20px); animation: tagAppear 0.5s forwards; } .tag:hover { background-color: #e0cdb4; transform: translateY(-2px); box-shadow: 0 4px 8px rgba(178, 136, 98, 0.1); border-color: #d1b494; } @keyframes tagAppear { to { opacity: 1; transform: translateY(0); } } .tag:nth-child(1) { animation-delay: 0.1s; } .tag:nth-child(2) { animation-delay: 0.2s; } .tag:nth-child(3) { animation-delay: 0.3s; } .tag:nth-child(4) { animation-delay: 0.4s; } .tag:nth-child(5) { animation-delay: 0.5s; } /* Footer */ .footer { margin-top: 20px; text-align: center; font-size: 0.85rem; color: #a3917f; } .footer a { color: #8e5e3b; text-decoration: none; transition: all 0.3s ease; } .footer a:hover { color: #b78d65; text-decoration: underline; } </style> </head> <body> <div class="blog-container"> <div class="blog-header"> <h1 class="blog-title">Rooted in Season</h1> <h2 class="blog-subtitle">A journal of mindful eating & seasonal harvest</h2> </div> <div class="tags"> <div class="tag">Farm to Table</div> <div class="tag">Seasonal Recipes</div> <div class="tag">Sustainable Living</div> <div class="tag">Organic Cooking</div> <div class="tag">Harvest Stories</div> </div> <div class="content-section"> <div class="herb-accent herb-1"></div> <p>The heirloom tomatoes arrived at the farmers' market this morning, their imperfect shapes telling stories of generations of careful seed-saving. Each variety—Black Krim, Green Zebra, Brandywine—carries flavors that supermarket tomatoes forgot decades ago. The farmer's weathered hands, stained with soil, handed me these treasures with pride.</p> <p>Summer's bounty requires little intervention—just good olive oil, flaky salt, and perhaps a scatter of just-picked basil. The simplicity honors both the grower and the land. This is food at its most honest.</p> </div> <div class="organic-divider" id="divider"> <div class="divider-shape"> <div class="divider-inner"> <svg width="100%" height="100%" viewBox="0 0 800 100"> <path class="wave-path" stroke="#c49a6c" d="M0,50 C100,20 200,80 300,50 C400,20 500,80 600,50 C700,20 800,80 800,50" /> </svg> <img class="leaf leaf-1" src="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' fill='%23a97c51'%3E%3Cpath d='M50,0 C20,20 0,60 30,80 C10,100 90,100 70,80 C100,60 80,20 50,0 Z'/%3E%3C/svg%3E" alt=""> <img class="leaf leaf-2" src="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' fill='%23c49a6c'%3E%3Cpath d='M50,0 C20,20 0,60 30,80 C10,100 90,100 70,80 C100,60 80,20 50,0 Z'/%3E%3C/svg%3E" alt=""> </div> </div> <div class="divider-text">from earth to table</div> </div> <div class="content-section"> <div class="herb-accent herb-2"></div> <p>Today's kitchen meditation: preserving autumn apples. The rhythmic motion of the peeler, the sweet-tart perfume filling the kitchen, and the knowledge that January breakfasts will taste of October orchards. This is how our grandmothers understood sustainability—not as a buzzword but as common sense.</p> <p>As the jars cool on the countertop, each ping of a sealing lid feels like a small victory. These aren't just preserves; they're time capsules of sunshine, rainfall, and careful tending. When winter comes, we'll taste autumn's generosity again.</p> </div> <div class="footer"> <p>Join our seasonal ingredient newsletter • <a href="#">New posts every harvest week</a></p> </div> </div> <script> document.addEventListener('DOMContentLoaded', function() { // Animate the divider on page load setTimeout(() => { document.getElementById('divider').classList.add('active'); }, 500); // Handle divider click to trigger animation again document.getElementById('divider').addEventListener('click', function() { this.classList.remove('active'); setTimeout(() => { this.classList.add('active'); }, 100); }); // Make tags interactive const tags = document.querySelectorAll('.tag'); tags.forEach(tag => { tag.addEventListener('click', function() { // Visually select the tag tags.forEach(t => t.style.fontWeight = 'normal'); this.style.fontWeight = 'bold'; // Animation for the clicked tag this.animate([ { transform: 'scale(0.95)' }, { transform: 'scale(1.1)' }, { transform: 'scale(1)' } ], { duration: 400, easing: 'cubic-bezier(0.175, 0.885, 0.32, 1.275)' }); }); }); // Add background color animation to sections const sections = document.querySelectorAll('.content-section'); sections.forEach(section => { section.addEventListener('mouseenter', function() { this.style.transition = 'background-color 0.5s ease'; this.style.backgroundColor = 'rgba(240, 230, 215, 0.3)'; this.style.borderRadius = '12px'; this.style.padding = '15px'; }); section.addEventListener('mouseleave', function() { this.style.backgroundColor = 'transparent'; }); }); }); </script> </body> </html>
<html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>TechNexus Conference 2024</title> <style> :root { --primary: #0077FF; --secondary: #002A5C; --accent: #00CCFF; --dark: #111827; --light: #F3F4F6; --divider-height: 120px; } * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; } body { background-color: var(--dark); color: var(--light); width: 100%; height: 100%; overflow-x: hidden; } .container { max-width: 700px; margin: 0 auto; padding: 20px; height: 100%; overflow-y: auto; position: relative; } header { text-align: center; padding: 1.5rem 0; } .logo { font-size: 1.8rem; font-weight: 800; background: linear-gradient(90deg, var(--primary), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; letter-spacing: -0.5px; margin-bottom: 0.5rem; } .subtitle { font-size: 0.9rem; color: rgba(255, 255, 255, 0.7); letter-spacing: 2px; text-transform: uppercase; margin-bottom: 1rem; } .date-location { display: flex; justify-content: center; gap: 20px; font-size: 0.85rem; color: rgba(255, 255, 255, 0.8); margin-top: 0.5rem; } .date-location span { display: flex; align-items: center; gap: 5px; } .date-location i { color: var(--accent); } /* Divider Styles */ .geometric-divider { width: 100%; height: var(--divider-height); position: relative; margin: 2rem 0; overflow: hidden; } .divider-container { width: 100%; height: 100%; position: relative; } .divider-line { position: absolute; height: 1px; background-color: rgba(255, 255, 255, 0.1); width: 100%; top: 50%; transform: translateY(-50%); z-index: 1; } .geometric-shape { position: absolute; background: var(--secondary); transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1); } .shape-1 { width: 60px; height: 60px; top: 30%; left: 10%; clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%); background: linear-gradient(135deg, var(--primary), var(--accent)); } .shape-2 { width: 40px; height: 40px; bottom: 25%; left: 30%; transform: rotate(45deg); background-color: rgba(0, 204, 255, 0.3); } .shape-3 { width: 70px; height: 70px; top: 25%; right: 20%; border-radius: 50%; background-color: rgba(0, 119, 255, 0.15); } .shape-4 { width: 30px; height: 30px; bottom: 30%; right: 10%; clip-path: polygon(0 0, 100% 0, 100% 100%); background-color: var(--accent); } .dots-grid { position: absolute; left: 0; top: 0; width: 100%; height: 100%; display: flex; justify-content: space-around; align-items: center; } .dot { width: 3px; height: 3px; background-color: rgba(255, 255, 255, 0.3); border-radius: 50%; } .dot:nth-child(odd) { animation: pulse 3s infinite alternate; } .dot:nth-child(even) { animation: pulse 4s 0.5s infinite alternate; } @keyframes pulse { 0% { transform: scale(1); opacity: 0.3; } 100% { transform: scale(2); opacity: 0.7; } } .digital-line { position: absolute; height: 1px; background: linear-gradient(90deg, transparent, var(--accent), transparent); width: 80%; left: 10%; top: 50%; transform: translateY(-50%); opacity: 0.8; z-index: 2; } .binary { position: absolute; font-family: monospace; font-size: 0.7rem; color: rgba(0, 204, 255, 0.3); z-index: 1; } .binary-1 { top: 20%; left: 20%; } .binary-2 { bottom: 25%; right: 30%; } /* Animated particle */ .particle { position: absolute; width: 4px; height: 4px; background-color: var(--accent); border-radius: 50%; z-index: 3; box-shadow: 0 0 10px 2px rgba(0, 204, 255, 0.5); animation: moveParticle 8s linear infinite; } @keyframes moveParticle { 0% { left: -5px; top: 50%; } 100% { left: 105%; top: 50%; } } /* Content Sections */ section { padding: 1.5rem 0; opacity: 0; transform: translateY(20px); transition: all 0.8s ease; } section.visible { opacity: 1; transform: translateY(0); } h2 { font-size: 1.5rem; margin-bottom: 1rem; color: white; position: relative; display: inline-block; } h2::after { content: ""; position: absolute; bottom: -5px; left: 0; width: 40px; height: 2px; background-color: var(--accent); } p { line-height: 1.6; margin-bottom: 1rem; color: rgba(255, 255, 255, 0.8); } .features { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 15px; margin-top: 1.5rem; } .feature-card { background: rgba(0, 42, 92, 0.4); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 8px; padding: 1rem; transition: all 0.3s ease; cursor: pointer; position: relative; overflow: hidden; } .feature-card:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2); border-color: var(--accent); } .feature-card:hover::before { opacity: 1; } .feature-card::before { content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(135deg, rgba(0, 119, 255, 0.1), rgba(0, 204, 255, 0.1)); opacity: 0; transition: opacity 0.3s ease; } .feature-card i { font-size: 1.5rem; color: var(--accent); margin-bottom: 0.5rem; } .feature-card h3 { font-size: 0.9rem; margin-bottom: 0.5rem; position: relative; z-index: 1; } .feature-card p { font-size: 0.8rem; position: relative; z-index: 1; } .speakers { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 15px; margin-top: 1.5rem; } .speaker-card { text-align: center; transition: all 0.3s ease; } .speaker-image { width: 80px; height: 80px; border-radius: 50%; overflow: hidden; margin: 0 auto 0.5rem; border: 2px solid rgba(255, 255, 255, 0.1); transition: all 0.3s ease; background-color: var(--secondary); position: relative; } .speaker-image::before { content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 119, 255, 0.2); opacity: 0; transition: opacity 0.3s ease; } .speaker-card:hover .speaker-image { transform: scale(1.1); border-color: var(--accent); } .speaker-card:hover .speaker-image::before { opacity: 1; } .speaker-name { font-size: 0.85rem; font-weight: 600; margin-bottom: 0.2rem; } .speaker-role { font-size: 0.7rem; color: rgba(255, 255, 255, 0.6); } .cta-button { display: inline-block; padding: 0.8rem 1.5rem; margin-top: 1rem; background: linear-gradient(90deg, var(--primary), var(--accent)); color: white; border: none; border-radius: 4px; font-weight: 600; cursor: pointer; transition: all 0.3s ease; text-decoration: none; position: relative; overflow: hidden; z-index: 1; } .cta-button::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: left 0.7s ease; z-index: -1; } .cta-button:hover { box-shadow: 0 5px 15px rgba(0, 119, 255, 0.4); transform: translateY(-2px); } .cta-button:hover::before { left: 100%; } .schedule { margin-top: 1.5rem; } .schedule-item { padding: 1rem; border-left: 2px solid var(--accent); background: rgba(0, 42, 92, 0.2); margin-bottom: 1rem; position: relative; transition: all 0.3s ease; } .schedule-item:hover { background: rgba(0, 42, 92, 0.4); transform: translateX(5px); } .schedule-time { font-size: 0.8rem; color: var(--accent); margin-bottom: 0.5rem; font-weight: 600; } .schedule-title { font-size: 1rem; margin-bottom: 0.3rem; } .schedule-speaker { font-size: 0.8rem; color: rgba(255, 255, 255, 0.7); } .schedule-item::before { content: ""; position: absolute; left: -6px; top: 1rem; width: 10px; height: 10px; background-color: var(--accent); border-radius: 50%; } /* For screens smaller than 480px */ @media (max-width: 480px) { .logo { font-size: 1.5rem; } .subtitle { font-size: 0.8rem; } .date-location { flex-direction: column; gap: 10px; } .geometric-divider { height: 80px; } .features, .speakers { grid-template-columns: 1fr 1fr; } h2 { font-size: 1.2rem; } } /* Scrollbar styling */ ::-webkit-scrollbar { width: 8px; } ::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.1); } ::-webkit-scrollbar-thumb { background: var(--secondary); border-radius: 4px; } ::-webkit-scrollbar-thumb:hover { background: var(--primary); } </style> </head> <body> <div class="container"> <header> <div class="logo">TechNexus 2024</div> <div class="subtitle">Future of AI & Quantum Computing</div> <div class="date-location"> <span><i class="far fa-calendar-alt"></i> October 15-17, 2024</span> <span><i class="fas fa-map-marker-alt"></i> Silicon Valley Hub</span> </div> </header> <div class="geometric-divider"> <div class="divider-container"> <div class="divider-line"></div> <div class="digital-line"></div> <div class="geometric-shape shape-1"></div> <div class="geometric-shape shape-2"></div> <div class="geometric-shape shape-3"></div> <div class="geometric-shape shape-4"></div> <div class="binary binary-1">01011001</div> <div class="binary binary-2">10100110</div> <div class="dots-grid"> <div class="dot"></div> <div class="dot"></div> <div class="dot"></div> <div class="dot"></div> <div class="dot"></div> <div class="dot"></div> <div class="dot"></div> </div> <div class="particle"></div> </div> </div> <section id="about"> <h2>About the Conference</h2> <p>TechNexus 2024 brings together leading innovators, researchers, and entrepreneurs at the forefront of AI and quantum computing. Explore groundbreaking technologies and network with industry pioneers who are shaping our digital future.</p> <p>This exclusive three-day event features keynote speeches, interactive workshops, and specialized sessions on neural networks, quantum algorithms, and ethical tech development.</p> <a href="#" class="cta-button">Register Now</a> </section> <div class="geometric-divider"> <div class="divider-container"> <div class="divider-line"></div> <div class="digital-line"></div> <div class="geometric-shape shape-1"></div> <div class="geometric-shape shape-2"></div> <div class="geometric-shape shape-3"></div> <div class="geometric-shape shape-4"></div> <div class="binary binary-1">01010101</div> <div class="binary binary-2">11110000</div> <div class="dots-grid"> <div class="dot"></div> <div class="dot"></div> <div class="dot"></div> <div class="dot"></div> <div class="dot"></div> <div class="dot"></div> <div class="dot"></div> </div> <div class="particle"></div> </div> </div> <section id="highlights"> <h2>Conference Highlights</h2> <div class="features"> <div class="feature-card"> <i class="fas fa-brain"></i> <h3>Neural Architecture Workshop</h3> <p>Explore advanced neural network designs with hands-on implementation sessions.</p> </div> <div class="feature-card"> <i class="fas fa-atom"></i> <h3>Quantum Computing Panel</h3> <p>Top quantum physicists discuss breakthrough computation methods.</p> </div> <div class="feature-card"> <i class="fas fa-robot"></i> <h3>AI Ethics Forum</h3> <p>Debate ethical frameworks for responsible AI development.</p> </div> <div class="feature-card"> <i class="fas fa-network-wired"></i> <h3>Tech Career Fair</h3> <p>Connect with leading tech companies hiring in AI and quantum fields.</p> </div> </div> </section> <div class="geometric-divider"> <div class="divider-container"> <div class="divider-line"></div> <div class="digital-line"></div> <div class="geometric-shape shape-1"></div> <div class="geometric-shape shape-2"></div> <div class="geometric-shape shape-3"></div> <div class="geometric-shape shape-4"></div> <div class="binary binary-1">10101010</div> <div class="binary binary-2">00110011</div> <div class="dots-grid"> <div class="dot"></div> <div class="dot"></div> <div class="dot"></div> <div class="dot"></div> <div class="dot"></div> <div class="dot"></div> <div class="dot"></div> </div> <div class="particle"></div> </div> </div> <section id="speakers"> <h2>Featured Speakers</h2> <div class="speakers"> <div class="speaker-card"> <div class="speaker-image"></div> <div class="speaker-name">Dr. Maya Chen</div> <div class="speaker-role">Quantum AI Director, IBM</div> </div> <div class="speaker-card"> <div class="speaker-image"></div> <div class="speaker-name">Prof. James Liu</div> <div class="speaker-role">MIT Neural Systems</div> </div> <div class="speaker-card"> <div class="speaker-image"></div> <div class="speaker-name">Sophia Rodriguez</div> <div class="speaker-role">CTO, QuantumLeap</div> </div> <div class="speaker-card"> <div class="speaker-image"></div> <div class="speaker-name">Dr. Aiden Kumar</div> <div class="speaker-role">Ethics in AI Foundation</div> </div> </div> </section> <div class="geometric-divider"> <div class="divider-container"> <div class="divider-line"></div> <div class="digital-line"></div> <div class="geometric-shape shape-1"></div> <div class="geometric-shape shape-2"></div> <div class="geometric-shape shape-3"></div> <div class="geometric-shape shape-4"></div> <div class="binary binary-1">11001100</div> <div class="binary binary-2">00111100</div> <div class="dots-grid"> <div class="dot"></div> <div class="dot"></div> <div class="dot"></div> <div class="dot"></div> <div class="dot"></div> <div class="dot"></div> <div class="dot"></div> </div> <div class="particle"></div> </div> </div> <section id="schedule"> <h2>Conference Schedule</h2> <div class="schedule"> <div class="schedule-item"> <div class="schedule-time">Day 1 - 9:30 AM</div> <div class="schedule-title">Opening Keynote: The Quantum Revolution</div> <div class="schedule-speaker">Dr. Maya Chen</div> </div> <div class="schedule-item"> <div class="schedule-time">Day 1 - 2:00 PM</div> <div class="schedule-title">Workshop: Neural Network Architecture Design</div> <div class="schedule-speaker">Prof. James Liu</div> </div> <div class="schedule-item"> <div class="schedule-time">Day 2 - 10:00 AM</div> <div class="schedule-title">Panel: Future of Quantum Algorithms</div> <div class="schedule-speaker">Multiple Speakers</div> </div> <div class="schedule-item"> <div class="schedule-time">Day 3 - 11:30 AM</div> <div class="schedule-title">Closing Session: AI Ethics & Society</div> <div class="schedule-speaker">Dr. Aiden Kumar</div> </div> </div> <a href="#" class="cta-button">View Full Schedule</a> </section> </div> <script src="https://kit.fontawesome.com/a076d05399.js" crossorigin="anonymous"></script> <script> document.addEventListener('DOMContentLoaded', function() { // Animate sections when they come into view const sections = document.querySelectorAll('section'); function checkVisibility() { sections.forEach(section => { const position = section.getBoundingClientRect(); // If section is in viewport if(position.top < window.innerHeight && position.bottom >= 0) { section.classList.add('visible'); } }); } // Check visibility initially and on scroll checkVisibility(); document.querySelector('.container').addEventListener('scroll', checkVisibility); // Animate divider on hover const dividers = document.querySelectorAll('.geometric-divider'); dividers.forEach(divider => { divider.addEventListener('mouseover', function() { const shapes = this.querySelectorAll('.geometric-shape'); shapes.forEach(shape => { const randomX = Math.random() * 20 - 10; const randomY = Math.random() * 20 - 10; const randomRotate = Math.random() * 45 - 22.5; shape.style.transform = `translate(${randomX}px, ${randomY}px) rotate(${randomRotate}deg)`; }); }); divider.addEventListener('mouseout', function() { const shapes = this.querySelectorAll('.geometric-shape'); shapes.forEach(shape => { if (shape.classList.contains('shape-2')) { shape.style.transform = 'rotate(45deg)'; } else { shape.style.transform = 'none'; } }); }); }); // Prevent default on buttons to avoid page refreshes const buttons = document.querySelectorAll('.cta-button'); buttons.forEach(button => { button.addEventListener('click', function(e) { e.preventDefault(); // Add a little animation when clicked this.style.transform = 'scale(0.95)'; setTimeout(() => { this.style.transform = ''; }, 200); }); }); // Feature card interaction const featureCards = document.querySelectorAll('.feature-card'); featureCards.forEach(card => { card.addEventListener('click', function() { // Toggle active state const isActive = this.classList.contains('active'); // Reset all cards featureCards.forEach(c => c.classList.remove('active')); if (!isActive) { this.classList.add('active'); } }); }); // Make all sections visible initially for better experience setTimeout(() => { sections.forEach(section => { section.classList.add('visible'); }); }, 300); }); </script> </body> </html>
<html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Ocean Voyages Travel Blog</title> <style> @import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&family=Playfair+Display:wght@400;500;600;700&display=swap'); * { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: 'Montserrat', sans-serif; background-color: #f8fbfd; color: #2c3e50; overflow-x: hidden; width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; } .container { max-width: 700px; width: 100%; padding: 20px; overflow-y: auto; height: 700px; position: relative; } .blog-header { text-align: center; margin-bottom: 20px; position: relative; } .blog-title { font-family: 'Playfair Display', serif; font-size: 2.5rem; color: #1a5276; margin-bottom: 5px; position: relative; display: inline-block; } .blog-title::after { content: ""; position: absolute; bottom: -8px; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, transparent, #5dacbd, #3498db, #5dacbd, transparent); } .blog-subtitle { font-size: 1rem; color: #5dacbd; font-weight: 500; letter-spacing: 1px; } .blog-entry { margin-bottom: 40px; overflow: hidden; position: relative; padding-bottom: 20px; } .blog-entry:last-child { margin-bottom: 0; } .entry-header { margin-bottom: 15px; } .entry-title { font-family: 'Playfair Display', serif; font-size: 1.8rem; color: #2c3e50; margin-bottom: 8px; transition: color 0.3s ease; } .entry-meta { display: flex; align-items: center; font-size: 0.85rem; color: #7f8c8d; margin-bottom: 12px; } .entry-date, .entry-location { margin-right: 20px; display: flex; align-items: center; } .entry-date i, .entry-location i { margin-right: 5px; color: #5dacbd; } .entry-content { line-height: 1.6; color: #34495e; margin-bottom: 15px; } .entry-image { width: 100%; height: 220px; object-fit: cover; border-radius: 8px; margin-bottom: 15px; transition: transform 0.5s ease; box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1); } .entry-image:hover { transform: scale(1.02); } .read-more { display: inline-block; margin-top: 5px; color: #3498db; font-weight: 500; text-decoration: none; position: relative; transition: color 0.3s ease; } .read-more::after { content: ""; position: absolute; bottom: -2px; left: 0; width: 0; height: 2px; background-color: #3498db; transition: width 0.3s ease; } .read-more:hover { color: #1a5276; } .read-more:hover::after { width: 100%; } /* Wave Divider */ .wave-divider { height: 100px; width: 100%; position: relative; margin: 10px 0 30px; overflow: hidden; } .wave { position: absolute; width: 200%; height: 100%; background-repeat: repeat-x; background-position: 0 bottom; transform-origin: center bottom; background-size: 50% 100px; animation: wave-animation 12s linear infinite; opacity: 0.7; } .wave1 { background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 1200 120' xmlns='http://www.w3.org/2000/svg' preserveAspectRatio='none'><path d='M0,0V46.29c47.79,22.2,103.59,32.17,158,28,70.36-5.37,136.33-33.31,206.8-37.5C438.64,32.43,512.34,53.67,583,72.05c69.27,18,138.3,24.88,209.4,13.08,36.15-6,69.85-17.84,104.45-29.34C989.49,25,1113-14.29,1200,52.47V0Z' fill='%233498db' opacity='.25'/></svg>"); z-index: 3; animation-delay: 0s; } .wave2 { background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 1200 120' xmlns='http://www.w3.org/2000/svg' preserveAspectRatio='none'><path d='M0,0V46.29c47.79,22.2,103.59,32.17,158,28,70.36-5.37,136.33-33.31,206.8-37.5C438.64,32.43,512.34,53.67,583,72.05c69.27,18,138.3,24.88,209.4,13.08,36.15-6,69.85-17.84,104.45-29.34C989.49,25,1113-14.29,1200,52.47V0Z' fill='%235dacbd' opacity='.25'/></svg>"); z-index: 2; animation-delay: -5s; animation-duration: 15s; } .wave3 { background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 1200 120' xmlns='http://www.w3.org/2000/svg' preserveAspectRatio='none'><path d='M0,0V46.29c47.79,22.2,103.59,32.17,158,28,70.36-5.37,136.33-33.31,206.8-37.5C438.64,32.43,512.34,53.67,583,72.05c69.27,18,138.3,24.88,209.4,13.08,36.15-6,69.85-17.84,104.45-29.34C989.49,25,1113-14.29,1200,52.47V0Z' fill='%2382ccdd' opacity='.25'/></svg>"); z-index: 1; animation-delay: -2s; animation-duration: 10s; } @keyframes wave-animation { 0% { transform: translateX(0) translateZ(0); } 50% { transform: translateX(-25%) translateZ(0); } 100% { transform: translateX(-50%) translateZ(0); } } /* Interactive Elements */ .tag { display: inline-block; padding: 4px 10px; margin-right: 8px; border-radius: 15px; background: linear-gradient(135deg, #3498db, #5dacbd); color: white; font-size: 0.75rem; font-weight: 500; transition: transform 0.3s ease, box-shadow 0.3s ease; } .tag:hover { transform: translateY(-2px); box-shadow: 0 4px 10px rgba(93, 172, 189, 0.3); cursor: pointer; } .tags { margin-bottom: 12px; } /* Water Drop Effect */ .water-drop { position: absolute; background: radial-gradient(circle at center, rgba(93, 172, 189, 0.8) 0%, rgba(93, 172, 189, 0) 70%); border-radius: 50%; transform: scale(0); animation: ripple 1s ease-out; pointer-events: none; } @keyframes ripple { to { transform: scale(2); opacity: 0; } } /* Scroll Indicator */ .scroll-indicator { position: sticky; top: 0; left: 0; right: 0; height: 4px; background: linear-gradient(90deg, #3498db, #5dacbd); transform-origin: left; transform: scaleX(0); z-index: 10; } /* Responsive Design */ @media (max-width: 500px) { .blog-title { font-size: 2rem; } .entry-title { font-size: 1.5rem; } .entry-image { height: 180px; } .wave-divider { height: 70px; } .wave { background-size: 50% 70px; } } /* Light hover effect for entries */ .blog-entry { transition: transform 0.3s ease; } .blog-entry:hover { transform: translateY(-5px); } /* Interactive cursors */ .cursor-dot { position: fixed; width: 8px; height: 8px; background-color: #3498db; border-radius: 50%; transform: translate(-50%, -50%); pointer-events: none; z-index: 9999; opacity: 0.7; transition: opacity 0.3s ease; } .cursor-outline { position: fixed; width: 30px; height: 30px; border: 2px solid rgba(93, 172, 189, 0.5); border-radius: 50%; transform: translate(-50%, -50%); pointer-events: none; z-index: 9998; transition: width 0.3s ease, height 0.3s ease, border-color 0.3s ease; } a:hover ~ .cursor-outline, .tag:hover ~ .cursor-outline, .entry-image:hover ~ .cursor-outline { width: 50px; height: 50px; border-color: rgba(93, 172, 189, 0.2); } /* Fade in animation on load */ @keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } } .blog-entry { animation: fadeIn 0.8s ease forwards; opacity: 0; } .blog-entry:nth-child(1) { animation-delay: 0.1s; } .blog-entry:nth-child(2) { animation-delay: 0.3s; } .blog-entry:nth-child(3) { animation-delay: 0.5s; } </style> </head> <body> <div class="cursor-dot"></div> <div class="cursor-outline"></div> <div class="scroll-indicator"></div> <div class="container"> <header class="blog-header"> <h1 class="blog-title">Ocean Voyages</h1> <p class="blog-subtitle">EXPLORING COASTAL WONDERS & MARITIME ADVENTURES</p> </header> <article class="blog-entry"> <header class="entry-header"> <h2 class="entry-title">Turquoise Dreams: The Hidden Coves of Sardinia</h2> <div class="entry-meta"> <div class="entry-date"> <i class="date-icon">📅</i> May 15, 2023 </div> <div class="entry-location"> <i class="location-icon">📍</i> Sardinia, Italy </div> </div> <div class="tags"> <span class="tag">Mediterranean</span> <span class="tag">Island Life</span> <span class="tag">Sailing</span> </div> </header> <img src="https://images.unsplash.com/photo-1566241832378-917a0f30db2c?ixlib=rb-4.0.3&auto=format&fit=crop&w=800&q=80" alt="Sardinia Coastline" class="entry-image"> <div class="entry-content"> <p>Our sailboat glided silently into Cala Mariolu just as dawn broke over Sardinia's eastern coast. The water here transitions between seven distinct shades of blue—from deep cobalt to the palest aquamarine. What makes these hidden coves special isn't just their beauty, but their inaccessibility. Many can only be reached by water, preserving their pristine nature from the usual tourist crowds.</p> <a href="#" class="read-more">Continue reading</a> </div> </article> <div class="wave-divider"> <div class="wave wave1"></div> <div class="wave wave2"></div> <div class="wave wave3"></div> </div> <article class="blog-entry"> <header class="entry-header"> <h2 class="entry-title">Midnight Bioluminescence in the Maldivian Waters</h2> <div class="entry-meta"> <div class="entry-date"> <i class="date-icon">📅</i> August 3, 2023 </div> <div class="entry-location"> <i class="location-icon">📍</i> Vaadhoo Island, Maldives </div> </div> <div class="tags"> <span class="tag">Bioluminescence</span> <span class="tag">Night Swimming</span> <span class="tag">Marine Life</span> </div> </header> <img src="https://images.unsplash.com/photo-1562059392-096320bccc7e?ixlib=rb-4.0.3&auto=format&fit=crop&w=800&q=80" alt="Maldives Bioluminescence" class="entry-image"> <div class="entry-content"> <p>They call it the "Sea of Stars"—a phenomenon caused by marine microorganisms that emit light when disturbed. Walking along Vaadhoo's shoreline after nightfall feels otherworldly. Each footstep in the shallow tide leaves behind a glowing blue footprint that lingers for moments before fading. The local fishermen time their night excursions with the lunar calendar, knowing exactly when the plankton bloom will be at its brightest.</p> <a href="#" class="read-more">Continue reading</a> </div> </article> <div class="wave-divider"> <div class="wave wave1"></div> <div class="wave wave2"></div> <div class="wave wave3"></div> </div> <article class="blog-entry"> <header class="entry-header"> <h2 class="entry-title">Riding Nazaré's Giants: The World's Most Fearsome Waves</h2> <div class="entry-meta"> <div class="entry-date"> <i class="date-icon">📅</i> November 12, 2023 </div> <div class="entry-location"> <i class="location-icon">📍</i> Nazaré, Portugal </div> </div> <div class="tags"> <span class="tag">Big Wave Surfing</span> <span class="tag">Atlantic Coast</span> <span class="tag">Extreme Sports</span> </div> </header> <img src="https://images.unsplash.com/photo-1516362481947-93c5456c89fd?ixlib=rb-4.0.3&auto=format&fit=crop&w=800&q=80" alt="Nazaré Giant Waves" class="entry-image"> <div class="entry-content"> <p>The geology of Nazaré's underwater canyon is what creates these monsters—waves that can reach up to 100 feet in height. I spent three weeks with the Big Wave Chasers, a tight-knit community that monitors weather patterns obsessively. They can predict, almost to the hour, when conditions will align for the perfect storm swell. "We're not surfing waves," João told me as we watched the horizon from Forte de São Miguel Arcanjo, "we're surfing mountains of moving water."</p> <a href="#" class="read-more">Continue reading</a> </div> </article> </div> <script> document.addEventListener('DOMContentLoaded', function() { // Custom cursor const cursorDot = document.querySelector('.cursor-dot'); const cursorOutline = document.querySelector('.cursor-outline'); window.addEventListener('mousemove', function(e) { const posX = e.clientX; const posY = e.clientY; cursorDot.style.left = `${posX}px`; cursorDot.style.top = `${posY}px`; cursorOutline.style.left = `${posX}px`; cursorOutline.style.top = `${posY}px`; }); document.addEventListener('mousedown', function() { cursorDot.style.transform = 'translate(-50%, -50%) scale(0.7)'; cursorOutline.style.transform = 'translate(-50%, -50%) scale(0.7)'; }); document.addEventListener('mouseup', function() { cursorDot.style.transform = 'translate(-50%, -50%) scale(1)'; cursorOutline.style.transform = 'translate(-50%, -50%) scale(1)'; }); // Hide cursor when it leaves the window document.addEventListener('mouseleave', function() { cursorDot.style.opacity = '0'; cursorOutline.style.opacity = '0'; }); document.addEventListener('mouseenter', function() { cursorDot.style.opacity = '0.7'; cursorOutline.style.opacity = '1'; }); // Water drop effect document.querySelectorAll('.blog-entry, .wave-divider').forEach(element => { element.addEventListener('mouseenter', function(e) { const waterDrop = document.createElement('div'); waterDrop.classList.add('water-drop'); waterDrop.style.width = '50px'; waterDrop.style.height = '50px'; waterDrop.style.left = e.offsetX + 'px'; waterDrop.style.top = e.offsetY + 'px'; this.appendChild(waterDrop); setTimeout(() => { waterDrop.remove(); }, 1000); }); }); // Scroll indicator const scrollIndicator = document.querySelector('.scroll-indicator'); const container = document.querySelector('.container'); container.addEventListener('scroll', function() { const scrollableHeight = container.scrollHeight - container.clientHeight; const scrollProgress = container.scrollTop / scrollableHeight; scrollIndicator.style.transform = `scaleX(${scrollProgress})`; }); // Add wave interaction const waves = document.querySelectorAll('.wave'); container.addEventListener('mousemove', function(e) { // Calculate mouse position relative to container const containerRect = container.getBoundingClientRect(); const mouseX = e.clientX - containerRect.left; const containerWidth = containerRect.width; // Calculate position percentage (0-1) const positionRatio = mouseX / containerWidth; // Apply subtle animation speed changes based on mouse position waves.forEach((wave, index) => { // Different effect for each wave const speedModifier = 1 + (positionRatio - 0.5) * (0.3 * (index + 1)); wave.style.animationDuration = `${12 / speedModifier}s`; }); }); // Add click event to tags document.querySelectorAll('.tag').forEach(tag => { tag.addEventListener('click', function() { // Just for visual feedback this.style.transform = 'scale(0.95)'; setTimeout(() => { this.style.transform = ''; }, 200); }); }); // Add transition for image hover document.querySelectorAll('.entry-image').forEach(img => { img.addEventListener('mouseenter', function() { this.style.boxShadow = '0 8px 20px rgba(52, 152, 219, 0.3)'; }); img.addEventListener('mouseleave', function() { this.style.boxShadow = '0 5px 15px rgba(0, 0, 0, 0.1)'; }); }); }); </script> </body> </html>
<html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Content Divider with Shadow Effect</title> <style> * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; } :root { --primary-color: #4260ff; --secondary-color: #07b38b; --text-color: #2c3e50; --light-color: #f8f9fa; --divider-height: 2px; --divider-shadow-size: 9px; } body { display: flex; justify-content: center; align-items: center; min-height: 100vh; background-color: #f0f2f5; overflow-x: hidden; padding: 20px; } .mobile-app { position: relative; width: 100%; max-width: 360px; height: 660px; background-color: white; border-radius: 32px; overflow: hidden; box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1); transition: transform 0.3s ease; } .app-header { padding: 25px 20px 15px; background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)); color: white; border-radius: 32px 32px 0 0; } .app-header h1 { font-size: 1.4rem; margin-bottom: 5px; font-weight: 600; } .app-header p { font-size: 0.9rem; opacity: 0.85; } .content-section { padding: 25px 20px; position: relative; } .divider { position: relative; height: var(--divider-height); background-color: var(--light-color); width: 92%; margin: 0 auto; border-radius: 1px; transition: all 0.3s ease; overflow: visible; } .divider::after { content: ''; position: absolute; top: var(--divider-height); left: 0; width: 100%; height: var(--divider-shadow-size); background: radial-gradient(ellipse at top, rgba(0, 0, 0, 0.1), transparent 70%); opacity: 0.5; transition: opacity 0.3s ease; } .divider.active { background-color: var(--primary-color); } .divider.active::after { opacity: 0.7; } .feature-card { background-color: white; border-radius: 16px; padding: 18px; margin-bottom: 16px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04); transform: translateY(0); transition: transform 0.25s ease, box-shadow 0.25s ease; cursor: pointer; } .feature-card:active { transform: translateY(2px); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04); } .feature-card h3 { color: var(--text-color); font-size: 1.1rem; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; } .feature-card h3 i { font-size: 1rem; color: var(--primary-color); } .feature-card p { color: #666; font-size: 0.9rem; line-height: 1.5; } .pull-indicator { display: flex; justify-content: center; padding: 6px 0; } .pull-indicator-pill { width: 40px; height: 5px; background-color: #ddd; border-radius: 3px; transition: background-color 0.3s ease; } .pull-indicator:active .pull-indicator-pill { background-color: var(--primary-color); } .action-buttons { padding: 0 20px 20px; display: flex; gap: 12px; } .btn { flex: 1; padding: 14px 0; border: none; border-radius: 12px; font-weight: 600; font-size: 0.95rem; cursor: pointer; transition: all 0.2s ease; position: relative; overflow: hidden; } .btn-primary { background-color: var(--primary-color); color: white; } .btn-outline { background-color: transparent; color: var(--primary-color); border: 2px solid var(--primary-color); } .btn:active { transform: scale(0.97); } .btn::after { content: ''; position: absolute; width: 100%; height: 100%; top: 0; left: 0; background-color: rgba(255, 255, 255, 0.2); border-radius: 12px; transform: scale(0); opacity: 0; transition: transform 0.5s ease, opacity 0.3s ease; } .btn:active::after { transform: scale(2); opacity: 0.3; } .tag { display: inline-block; background-color: rgba(66, 96, 255, 0.1); color: var(--primary-color); padding: 4px 10px; border-radius: 12px; font-size: 0.75rem; font-weight: 600; margin-bottom: 10px; } .scroll-container { height: calc(100% - 66px); overflow-y: auto; overflow-x: hidden; scrollbar-width: none; } .scroll-container::-webkit-scrollbar { display: none; } @media (max-width: 380px) { .mobile-app { border-radius: 24px; height: 640px; } .app-header { padding: 20px 15px 10px; } .feature-card { padding: 15px; } .content-section { padding: 20px 15px; } } @keyframes pulse { 0% { opacity: 0.5; } 50% { opacity: 1; } 100% { opacity: 0.5; } } .pulse { animation: pulse 2s infinite ease-in-out; } /* Night mode toggle */ .night-mode-toggle { position: absolute; top: 20px; right: 20px; width: 40px; height: 40px; border-radius: 50%; background-color: rgba(255, 255, 255, 0.2); display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 10; transition: background-color 0.3s ease; } .night-mode-toggle i { color: white; font-size: 1.1rem; transition: transform 0.3s ease; } .night-mode-toggle:active { background-color: rgba(255, 255, 255, 0.3); } .night-mode-toggle:active i { transform: rotate(30deg); } /* Dark mode */ body.dark-mode { background-color: #121212; } body.dark-mode .mobile-app { background-color: #1e1e1e; box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25); } body.dark-mode .feature-card { background-color: #2a2a2a; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); } body.dark-mode .feature-card h3 { color: #e1e1e1; } body.dark-mode .feature-card p { color: #b0b0b0; } body.dark-mode .divider { background-color: #333; } body.dark-mode .divider::after { background: radial-gradient(ellipse at top, rgba(255, 255, 255, 0.05), transparent 70%); } body.dark-mode .pull-indicator-pill { background-color: #444; } body.dark-mode .btn-outline { color: #b0b0b0; border-color: #555; } body.dark-mode .tag { background-color: rgba(66, 96, 255, 0.15); } </style> </head> <body> <div class="mobile-app"> <div class="app-header"> <div class="night-mode-toggle" id="nightModeToggle"> <i class="fas fa-moon"></i> </div> <h1>Content Sections</h1> <p>Tap dividers to see interactive shadows</p> </div> <div class="scroll-container"> <div class="pull-indicator"> <div class="pull-indicator-pill"></div> </div> <div class="content-section"> <span class="tag">Today's Feeds</span> <div class="feature-card"> <h3><i class="fas fa-layer-group"></i> Smart Dividers</h3> <p>Our responsive dividers create clear visual separation between content blocks, with subtle shadows that adjust based on user interaction.</p> </div> <div class="feature-card"> <h3><i class="fas fa-fingerprint"></i> Touch Feedback</h3> <p>Subtle elevation changes and shadow effects provide instant visual feedback when users interact with interface elements.</p> </div> </div> <div class="divider" id="divider1"></div> <div class="content-section"> <span class="tag">Interface Design</span> <div class="feature-card"> <h3><i class="fas fa-mobile-alt"></i> Compact UI</h3> <p>Our dividers maintain perfect spacing in small viewports, ensuring your content remains scannable on any screen size.</p> </div> <div class="feature-card"> <h3><i class="fas fa-paint-brush"></i> Flat Design+</h3> <p>We combine flat design simplicity with subtle depth cues, creating interfaces that are both modern and intuitive to navigate.</p> </div> </div> <div class="divider" id="divider2"></div> <div class="content-section"> <span class="tag">Developer Tools</span> <div class="feature-card"> <h3><i class="fas fa-code"></i> Easy Implementation</h3> <p>Just a few lines of HTML/CSS creates an interactive divider that adapts to your content structure automatically.</p> </div> </div> <div class="action-buttons"> <button class="btn btn-primary">Apply Effects</button> <button class="btn btn-outline">Reset View</button> </div> </div> </div> <script> // Add Font Awesome const fontAwesome = document.createElement('link'); fontAwesome.rel = 'stylesheet'; fontAwesome.href = 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css'; document.head.appendChild(fontAwesome); // Divider interaction const dividers = document.querySelectorAll('.divider'); dividers.forEach(divider => { divider.addEventListener('click', function() { this.classList.toggle('active'); }); divider.addEventListener('touchstart', function(e) { this.classList.add('active'); e.preventDefault(); // Prevent default touch behavior }, {passive: false}); divider.addEventListener('touchend', function() { setTimeout(() => { this.classList.remove('active'); }, 300); }); }); // Prevent form submissions and page refreshes document.querySelectorAll('.btn').forEach(btn => { btn.addEventListener('click', function(e) { e.preventDefault(); // Divider animation on button click const randomDivider = dividers[Math.floor(Math.random() * dividers.length)]; randomDivider.classList.add('active', 'pulse'); setTimeout(() => { randomDivider.classList.remove('active', 'pulse'); }, 1500); }); }); // Feature card touch effect const featureCards = document.querySelectorAll('.feature-card'); featureCards.forEach(card => { card.addEventListener('click', function() { const nearestDivider = this.parentElement.nextElementSibling || this.parentElement.previousElementSibling; if (nearestDivider && nearestDivider.classList.contains('divider')) { nearestDivider.classList.add('active'); setTimeout(() => { nearestDivider.classList.remove('active'); }, 400); } }); }); // Night mode toggle const nightModeToggle = document.getElementById('nightModeToggle'); const body = document.body; nightModeToggle.addEventListener('click', function() { body.classList.toggle('dark-mode'); const icon = this.querySelector('i'); if (body.classList.contains('dark-mode')) { icon.classList.remove('fa-moon'); icon.classList.add('fa-sun'); } else { icon.classList.remove('fa-sun'); icon.classList.add('fa-moon'); } // Animate dividers when toggling dividers.forEach(divider => { divider.classList.add('active'); setTimeout(() => { divider.classList.remove('active'); }, 500); }); }); // Pull to refresh indicator effect const pullIndicator = document.querySelector('.pull-indicator'); pullIndicator.addEventListener('click', function() { this.querySelector('.pull-indicator-pill').style.backgroundColor = getComputedStyle(document.documentElement).getPropertyValue('--primary-color'); setTimeout(() => { this.querySelector('.pull-indicator-pill').style.backgroundColor = ''; }, 500); }); // Responsive sizing adjustments function adjustForScreenSize() { const mobileApp = document.querySelector('.mobile-app'); const viewportHeight = window.innerHeight; const viewportWidth = window.innerWidth; if (viewportHeight < 700) { mobileApp.style.height = Math.min(viewportHeight - 40, 660) + 'px'; } else { mobileApp.style.height = '660px'; } if (viewportWidth < 700) { mobileApp.style.maxWidth = Math.min(viewportWidth - 40, 360) + 'px'; } else { mobileApp.style.maxWidth = '360px'; } } window.addEventListener('resize', adjustForScreenSize); adjustForScreenSize(); </script> </body> </html>
<html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Banking App Secure Divider</title> <style> :root { --primary-color: #0a2e5c; --secondary-color: #1656a4; --accent-color: #2e7dd1; --secure-green: #18a37a; --light-gray: #f2f6fa; --medium-gray: #e0e5ee; --dark-gray: #687588; --text-color: #1e2b3c; --card-shadow: 0 10px 20px rgba(10, 46, 92, 0.1); --divider-shadow: 0 4px 8px rgba(10, 46, 92, 0.15); } * { 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 { background-color: var(--light-gray); color: var(--text-color); display: flex; justify-content: center; align-items: center; min-height: 100vh; padding: 1rem; overflow: hidden; } .app-container { width: 100%; max-width: 700px; height: 650px; background: white; border-radius: 16px; box-shadow: var(--card-shadow); display: flex; flex-direction: column; overflow: hidden; position: relative; } header { background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)); color: white; padding: 1.25rem 1.5rem; display: flex; justify-content: space-between; align-items: center; } .logo { display: flex; align-items: center; gap: 0.75rem; } .logo-icon { width: 32px; height: 32px; background: white; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: var(--primary-color); font-weight: bold; font-size: 16px; } .logo-text { font-weight: 600; font-size: 1.25rem; } .user-profile { display: flex; align-items: center; gap: 0.75rem; cursor: pointer; } .avatar { width: 36px; height: 36px; background: rgba(255, 255, 255, 0.2); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600; } .content { flex: 1; padding: 1.5rem; overflow-y: auto; } .balance-section { margin-bottom: 2rem; } .section-title { font-size: 0.875rem; font-weight: 500; color: var(--dark-gray); margin-bottom: 0.75rem; } .card-container { background: linear-gradient(135deg, var(--secondary-color), var(--accent-color)); color: white; border-radius: 12px; padding: 1.5rem; margin-bottom: 1.5rem; position: relative; overflow: hidden; } .card-pattern { position: absolute; top: 0; right: 0; width: 200px; height: 100%; opacity: 0.1; background: repeating-linear-gradient( 45deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.1) 10px, transparent 10px, transparent 20px ); } .card-balance { font-size: 2rem; font-weight: 700; margin-bottom: 1rem; } .card-number { display: flex; gap: 0.5rem; font-size: 1rem; letter-spacing: 1px; margin-bottom: 1.5rem; } .card-info { display: flex; justify-content: space-between; } .card-detail { font-size: 0.8125rem; } .card-label { opacity: 0.8; margin-bottom: 0.25rem; font-size: 0.75rem; } /* 3D Embossed Divider - Main Feature */ .secure-divider { position: relative; height: 16px; margin: 1.5rem 0; cursor: pointer; overflow: visible; } .divider-container { position: relative; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; } .divider-line { position: absolute; width: 100%; height: 4px; border-radius: 2px; background: var(--medium-gray); box-shadow: var(--divider-shadow); transform: translateY(0); transition: all 0.3s ease; } .divider-emboss { position: absolute; width: calc(100% - 4px); height: 1px; top: -2px; background: white; opacity: 0.7; } .divider-deboss { position: absolute; width: calc(100% - 4px); height: a1px; bottom: -2px; background: rgba(10, 46, 92, 0.2); } .divider-text { position: absolute; background: white; color: var(--secure-green); font-weight: 600; font-size: 0.75rem; padding: 0.25rem 0.75rem; border-radius: 12px; box-shadow: 0 2px 4px rgba(10, 46, 92, 0.1); display: flex; align-items: center; gap: 0.375rem; z-index: 2; transform: translateY(0); transition: all 0.3s ease; } .divider-icon { width: 14px; height: 14px; display: flex; align-items: center; justify-content: center; } .secure-divider:hover .divider-line { transform: translateY(2px); background: linear-gradient(90deg, var(--medium-gray), var(--secondary-color), var(--medium-gray)); box-shadow: 0 6px 12px rgba(10, 46, 92, 0.2); } .secure-divider:hover .divider-text { transform: translateY(-2px); box-shadow: 0 4px 8px rgba(10, 46, 92, 0.15); } .sensitive-info { background: var(--light-gray); border-radius: 12px; padding: 1.5rem; transition: all 0.3s ease; } .sensitive-area-hidden .sensitive-info { filter: blur(8px); } .sensitive-area-hidden .sensitive-value { color: transparent; text-shadow: 0 0 8px rgba(10, 46, 92, 0.5); } .info-row { display: flex; justify-content: space-between; margin-bottom: 1rem; align-items: center; } .info-label { color: var(--dark-gray); font-size: 0.875rem; } .sensitive-value { font-weight: 600; font-size: 0.9375rem; transition: all 0.3s ease; } .copy-button { background: transparent; border: none; color: var(--accent-color); cursor: pointer; padding: 0.25rem; border-radius: 4px; transition: all 0.2s ease; } .copy-button:hover { background: rgba(46, 125, 209, 0.1); } /* Transaction List */ .transaction-list { margin-top: 1.5rem; } .transaction-item { display: flex; align-items: center; padding: 1rem 0; border-bottom: 1px solid var(--medium-gray); } .transaction-icon { width: 40px; height: 40px; border-radius: 50%; background: var(--light-gray); display: flex; align-items: center; justify-content: center; margin-right: 1rem; flex-shrink: 0; } .transaction-details { flex: 1; } .transaction-name { font-weight: 600; margin-bottom: 0.25rem; } .transaction-date { font-size: 0.75rem; color: var(--dark-gray); } .transaction-amount { font-weight: 600; } .amount-debit { color: var(--text-color); } .amount-credit { color: var(--secure-green); } /* Bottom Navigation */ .bottom-nav { display: flex; justify-content: space-around; background: white; border-top: 1px solid var(--medium-gray); padding: 0.875rem 0; } .nav-item { display: flex; flex-direction: column; align-items: center; gap: 0.375rem; cursor: pointer; transition: all 0.2s ease; position: relative; } .nav-icon { width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; color: var(--dark-gray); } .nav-label { font-size: 0.75rem; color: var(--dark-gray); } .nav-item.active .nav-icon, .nav-item.active .nav-label { color: var(--primary-color); font-weight: 500; } .nav-item.active::after { content: ''; position: absolute; top: -1rem; width: 4px; height: 4px; border-radius: 50%; background: var(--primary-color); } /* Tooltip */ .tooltip { position: absolute; background: rgba(30, 43, 60, 0.95); color: white; padding: 0.5rem 0.75rem; border-radius: 6px; font-size: 0.75rem; max-width: 200px; z-index: 100; opacity: 0; transition: opacity 0.2s ease; pointer-events: none; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); } /* Copy animation */ @keyframes copyFeedback { 0% { transform: scale(1); } 50% { transform: scale(1.2); } 100% { transform: scale(1); } } .copy-animated { animation: copyFeedback 0.3s ease forwards; color: var(--secure-green); } /* Responsive adjustments */ @media (max-width: 500px) { .card-balance { font-size: 1.75rem; } .card-number { font-size: 0.875rem; } .content { padding: 1rem; } } </style> </head> <body> <div class="app-container"> <header> <div class="logo"> <div class="logo-icon">SB</div> <div class="logo-text">SecureBank</div> </div> <div class="user-profile"> <span>Alex Morgan</span> <div class="avatar">AM</div> </div> </header> <div class="content"> <div class="balance-section"> <div class="section-title">TOTAL BALANCE</div> <div class="card-container"> <div class="card-pattern"></div> <div class="card-balance">$12,458.63</div> <div class="card-number"> <span>••••</span> <span>••••</span> <span>••••</span> <span>3672</span> </div> <div class="card-info"> <div class="card-detail"> <div class="card-label">CARD HOLDER</div> <div>Alex Morgan</div> </div> <div class="card-detail"> <div class="card-label">EXPIRES</div> <div>05/26</div> </div> </div> </div> </div> <!-- 3D Embossed Divider - The main feature --> <div class="secure-divider" id="securityDivider"> <div class="divider-container"> <div class="divider-line"> <div class="divider-emboss"></div> <div class="divider-deboss"></div> </div> <div class="divider-text"> <div class="divider-icon"> <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" width="14" height="14"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z" /> </svg> </div> <span id="securityText">Secure Information</span> </div> </div> </div> <!-- Sensitive Information Section --> <div class="sensitive-area" id="sensitiveArea"> <div class="sensitive-info"> <div class="info-row"> <div class="info-label">Account Number</div> <div class="sensitive-value">8241-7563-2197-3672</div> <button class="copy-button" data-value="8241-7563-2197-3672" data-tooltip="Copy account number"> <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" width="16" height="16"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 5H6a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2v-1M8 5a2 2 0 002 2h2a2 2 0 002-2M8 5a2 2 0 012-2h2a2 2 0 012 2m0 0h2a2 2 0 012 2v3m2 4H10m0 0l3-3m-3 3l3 3" /> </svg> </button> </div> <div class="info-row"> <div class="info-label">Routing Number</div> <div class="sensitive-value">074532891</div> <button class="copy-button" data-value="074532891" data-tooltip="Copy routing number"> <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" width="16" height="16"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 5H6a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2v-1M8 5a2 2 0 002 2h2a2 2 0 002-2M8 5a2 2 0 012-2h2a2 2 0 012 2m0 0h2a2 2 0 012 2v3m2 4H10m0 0l3-3m-3 3l3 3" /> </svg> </button> </div> <div class="info-row"> <div class="info-label">SWIFT Code</div> <div class="sensitive-value">SBANKUS33XXX</div> <button class="copy-button" data-value="SBANKUS33XXX" data-tooltip="Copy SWIFT code"> <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" width="16" height="16"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 5H6a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2v-1M8 5a2 2 0 002 2h2a2 2 0 002-2M8 5a2 2 0 012-2h2a2 2 0 012 2m0 0h2a2 2 0 012 2v3m2 4H10m0 0l3-3m-3 3l3 3" /> </svg> </button> </div> </div> </div> <div class="transaction-list"> <div class="section-title">RECENT TRANSACTIONS</div> <div class="transaction-item"> <div class="transaction-icon"> <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="#1656a4" width="20" height="20"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 10h18M7 15h1m4 0h1m-7 4h12a3 3 0 003-3V8a3 3 0 00-3-3H6a3 3 0 00-3 3v8a3 3 0 003 3z" /> </svg> </div> <div class="transaction-details"> <div class="transaction-name">Online Payment - Amazon</div> <div class="transaction-date">Today, 2:34 PM</div> </div> <div class="transaction-amount amount-debit">-$84.29</div> </div> <div class="transaction-item"> <div class="transaction-icon"> <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="#18a37a" width="20" height="20"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 6v6m0 0v6m0-6h6m-6 0H6" /> </svg> </div> <div class="transaction-details"> <div class="transaction-name">Direct Deposit - Payroll</div> <div class="transaction-date">Oct 15, 9:15 AM</div> </div> <div class="transaction-amount amount-credit">+$2,458.63</div> </div> <div class="transaction-item"> <div class="transaction-icon"> <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="#1656a4" width="20" height="20"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 10h18M7 15h1m4 0h1m-7 4h12a3 3 0 003-3V8a3 3 0 00-3-3H6a3 3 0 00-3 3v8a3 3 0 003 3z" /> </svg> </div> <div class="transaction-details"> <div class="transaction-name">Whole Foods Market</div> <div class="transaction-date">Oct 14, 6:42 PM</div> </div> <div class="transaction-amount amount-debit">-$67.81</div> </div> </div> </div> <div class="bottom-nav"> <div class="nav-item active"> <div class="nav-icon"> <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" width="20" height="20"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6" /> </svg> </div> <div class="nav-label">Home</div> </div> <div class="nav-item"> <div class="nav-icon"> <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" width="20" height="20"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8c-1.657 0-3 .895-3 2s1.343 2 3 2 3 .895 3 2-1.343 2-3 2m0-8c1.11 0 2.08.402 2.599 1M12 8V7m0 1v8m0 0v1m0-1c-1.11 0-2.08-.402-2.599-1M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /> </svg> </div> <div class="nav-label">Payments</div> </div> <div class="nav-item"> <div class="nav-icon"> <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" width="20" height="20"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M16 8v8m-4-5v5m-4-2v2m-2 4h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z" /> </svg> </div> <div class="nav-label">Analytics</div> </div> <div class="nav-item"> <div class="nav-icon"> <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" width="20" height="20"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z" /> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z" /> </svg> </div> <div class="nav-label">Settings</div> </div> </div> <div class="tooltip" id="tooltip"></div> </div> <script> document.addEventListener('DOMContentLoaded', () => { const securityDivider = document.getElementById('securityDivider'); const sensitiveArea = document.getElementById('sensitiveArea'); const securityText = document.getElementById('securityText'); const tooltip = document.getElementById('tooltip'); const copyButtons = document.querySelectorAll('.copy-button'); let isHidden = false; // Toggle sensitive information visibility securityDivider.addEventListener('click', () => { isHidden = !isHidden; if (isHidden) { sensitiveArea.classList.add('sensitive-area-hidden'); securityText.textContent = 'Show Secure Information'; } else { sensitiveArea.classList.remove('sensitive-area-hidden'); securityText.textContent = 'Secure Information'; } }); // Copy functionality copyButtons.forEach(button => { button.addEventListener('click', (e) => { e.stopPropagation(); const value = button.getAttribute('data-value'); // Copy to clipboard navigator.clipboard.writeText(value).then(() => { // Visual feedback button.classList.add('copy-animated'); setTimeout(() => { button.classList.remove('copy-animated'); }, 500); }); }); // Tooltip handling button.addEventListener('mouseenter', (e) => { const tooltipText = button.getAttribute('data-tooltip'); tooltip.textContent = tooltipText; tooltip.style.opacity = '1'; // Position the tooltip above the button const rect = button.getBoundingClientRect(); tooltip.style.top = `${rect.top - 40}px`; tooltip.style.left = `${rect.left + (rect.width / 2) - (tooltip.offsetWidth / 2)}px`; }); button.addEventListener('mouseleave', () => { tooltip.style.opacity = '0'; }); }); // Enhanced tactile feedback for the divider securityDivider.addEventListener('mousedown', () => { const dividerLine = securityDivider.querySelector('.divider-line'); dividerLine.style.transform = 'translateY(4px)'; dividerLine.style.boxShadow = '0 2px 4px rgba(10, 46, 92, 0.1)'; const dividerText = securityDivider.querySelector('.divider-text'); dividerText.style.transform = 'translateY(-4px)'; }); securityDivider.addEventListener('mouseup', () => { const dividerLine = securityDivider.querySelector('.divider-line'); dividerLine.style.transform = isHidden ? 'translateY(2px)' : 'translateY(0)'; dividerLine.style.boxShadow = isHidden ? '0 6px 12px rgba(10, 46, 92, 0.2)' : '0 4px 8px rgba(10, 46, 92, 0.15)'; const dividerText = securityDivider.querySelector('.divider-text'); dividerText.style.transform = isHidden ? 'translateY(-2px)' : 'translateY(0)'; }); }); </script> </body> </html>
<html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Asymmetric Dashboard</title> <style> :root { --primary: #3a86ff; --secondary: #8338ec; --accent: #ff006e; --light: #f8f9fa; --dark: #212529; --gray: #6c757d; --background: #f0f2f5; --card-bg: #ffffff; --divider-color: #ff006e; } * { 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 { background-color: var(--background); color: var(--dark); display: flex; justify-content: center; align-items: center; min-height: 100vh; padding: 20px; overflow-x: hidden; } .dashboard-container { width: 100%; max-width: 700px; height: 700px; position: relative; overflow: hidden; border-radius: 16px; box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08); background-color: var(--card-bg); } .dashboard-header { padding: 20px 25px; display: flex; justify-content: space-between; align-items: center; background: linear-gradient(135deg, var(--primary), var(--secondary)); color: white; border-radius: 16px 16px 0 0; } .dashboard-header h1 { font-size: 1.5rem; font-weight: 700; } .user-profile { display: flex; align-items: center; gap: 10px; cursor: pointer; transition: all 0.3s ease; } .user-profile:hover { transform: translateY(-2px); } .avatar { width: 36px; height: 36px; border-radius: 50%; background-color: var(--accent); display: flex; justify-content: center; align-items: center; color: white; font-weight: 600; } .dashboard-content { display: grid; grid-template-columns: repeat(12, 1fr); grid-template-rows: repeat(8, 1fr); height: calc(100% - 80px); position: relative; overflow-y: auto; padding: 20px; gap: 15px; } /* The asymmetric divider */ .asymmetric-divider { position: absolute; height: calc(100% - 40px); width: 6px; top: 20px; left: 35%; background-color: var(--divider-color); transform: rotate(5deg); transform-origin: top center; z-index: 1; clip-path: polygon(0 0, 100% 5%, 100% 95%, 0% 100%); transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1); } .asymmetric-divider::before { content: ''; position: absolute; height: 100%; width: 100%; background-color: rgba(255, 0, 110, 0.3); left: -6px; filter: blur(8px); } .card { background: var(--card-bg); border-radius: 12px; padding: 18px; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05); transition: all 0.3s ease; display: flex; flex-direction: column; position: relative; overflow: hidden; z-index: 2; } .card:hover { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1); } .card::after { content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 4px; background: linear-gradient(90deg, var(--primary), var(--secondary)); transform: scaleX(0); transform-origin: left; transition: transform 0.3s ease; } .card:hover::after { transform: scaleX(1); } .card-title { font-weight: 600; margin-bottom: 10px; font-size: 1rem; color: var(--dark); display: flex; justify-content: space-between; align-items: center; } .card-icon { width: 24px; height: 24px; display: flex; justify-content: center; align-items: center; border-radius: 6px; background-color: var(--light); color: var(--primary); transition: all 0.3s ease; } .card:hover .card-icon { background-color: var(--primary); color: white; transform: rotate(10deg); } .metrics { display: flex; flex-direction: column; gap: 10px; margin-top: auto; } .metric { display: flex; justify-content: space-between; font-size: 0.875rem; } .metric-value { font-weight: 600; position: relative; display: inline-block; } .metric-value.positive::after { content: '↑'; color: #38b000; margin-left: 4px; } .metric-value.negative::after { content: '↓'; color: var(--accent); margin-left: 4px; } .progress-container { width: 100%; height: 6px; background-color: var(--light); border-radius: 3px; overflow: hidden; margin-top: 10px; } .progress-bar { height: 100%; border-radius: 3px; transition: width 1s cubic-bezier(0.4, 0, 0.2, 1); } /* Card positioning */ .performance-card { grid-column: 1 / 5; grid-row: 1 / 5; } .traffic-card { grid-column: 1 / 5; grid-row: 5 / 9; } .conversion-card { grid-column: 5 / 9; grid-row: 1 / 4; } .engagement-card { grid-column: 5 / 9; grid-row: 4 / 9; } .sales-card { grid-column: 9 / 13; grid-row: 1 / 6; } .retention-card { grid-column: 9 / 13; grid-row: 6 / 9; } /* For the chart elements */ .chart { margin-top: 15px; height: 120px; position: relative; } .bar-chart { display: flex; align-items: flex-end; height: 100%; gap: 8px; } .bar { flex: 1; background: linear-gradient(to top, var(--primary), var(--secondary)); border-radius: 3px 3px 0 0; transition: height 1s cubic-bezier(0.4, 0, 0.2, 1); position: relative; cursor: pointer; min-height: 4px; } .bar:hover { opacity: 0.8; } .bar::before { content: attr(data-value); position: absolute; top: -25px; left: 50%; transform: translateX(-50%); font-size: 0.75rem; font-weight: 600; opacity: 0; transition: opacity 0.3s ease; } .bar:hover::before { opacity: 1; } .donut-chart { position: relative; width: 120px; height: 120px; margin: 15px auto 0; } .donut-segment { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border-radius: 50%; clip-path: polygon(50% 50%, 100% 0, 100% 100%, 50% 100%); transform-origin: 50% 50%; transition: transform 1s cubic-bezier(0.4, 0, 0.2, 1); } .donut-label { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 1rem; font-weight: 700; text-align: center; } .line-chart { height: 100%; position: relative; display: flex; align-items: flex-end; } .line-chart-svg { width: 100%; height: 100%; overflow: visible; } .line-path { fill: none; stroke: var(--primary); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; transition: stroke-dashoffset 1.5s ease; } .area-path { fill: url(#area-gradient); opacity: 0.2; } .point { fill: var(--secondary); r: 4; transition: r 0.3s ease; } .point:hover { r: 6; fill: var(--accent); } /* Tooltip */ .tooltip { position: absolute; background-color: var(--dark); color: white; padding: 8px 12px; border-radius: 6px; font-size: 0.75rem; pointer-events: none; opacity: 0; transition: opacity 0.3s ease; z-index: 100; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); max-width: 200px; } .tooltip::after { content: ''; position: absolute; bottom: -5px; left: 50%; transform: translateX(-50%); width: 0; height: 0; border-left: 6px solid transparent; border-right: 6px solid transparent; border-top: 6px solid var(--dark); } /* Animation for cards on load */ @keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } } .card { animation: fadeInUp 0.6s ease forwards; opacity: 0; } .performance-card { animation-delay: 0.1s; } .traffic-card { animation-delay: 0.2s; } .conversion-card { animation-delay: 0.3s; } .engagement-card { animation-delay: 0.4s; } .sales-card { animation-delay: 0.5s; } .retention-card { animation-delay: 0.6s; } /* Responsive adjustments */ @media (max-width: 700px) { .dashboard-content { grid-template-columns: 1fr; grid-template-rows: auto; height: auto; overflow-y: visible; } .asymmetric-divider { display: none; } .card { grid-column: 1 / -1 !important; grid-row: auto !important; margin-bottom: 15px; } .dashboard-container { height: auto; overflow-y: auto; } .dashboard-header h1 { font-size: 1.2rem; } } /* Dark theme toggle */ .theme-toggle { position: absolute; top: 20px; right: 20px; z-index: 10; background: none; border: none; color: white; cursor: pointer; font-size: 1.2rem; } .dark-theme { --background: #121212; --card-bg: #1e1e1e; --dark: #f8f9fa; --light: #333; --gray: #adb5bd; } </style> </head> <body> <div class="dashboard-container"> <div class="dashboard-header"> <h1>Performance Analytics</h1> <div class="user-profile"> <span>Alex Wu</span> <div class="avatar">AW</div> </div> </div> <div class="dashboard-content"> <div class="asymmetric-divider"></div> <!-- Performance Card --> <div class="card performance-card"> <div class="card-title"> <span>User Growth</span> <div class="card-icon">📈</div> </div> <div class="chart"> <div class="bar-chart" id="growth-chart"> <div class="bar" data-value="283" style="height: 40%;"></div> <div class="bar" data-value="419" style="height: 65%;"></div> <div class="bar" data-value="352" style="height: 55%;"></div> <div class="bar" data-value="576" style="height: 85%;"></div> <div class="bar" data-value="641" style="height: 95%;"></div> </div> </div> <div class="metrics"> <div class="metric"> <span>Monthly Growth</span> <span class="metric-value positive">14.2%</span> </div> <div class="metric"> <span>New Users</span> <span class="metric-value">641</span> </div> </div> </div> <!-- Traffic Card --> <div class="card traffic-card"> <div class="card-title"> <span>Traffic Sources</span> <div class="card-icon">🔍</div> </div> <div class="donut-chart" id="traffic-donut"> <div class="donut-segment" style="background-color: #3a86ff; transform: rotate(0deg);"></div> <div class="donut-segment" style="background-color: #8338ec; transform: rotate(130deg);"></div> <div class="donut-segment" style="background-color: #ff006e; transform: rotate(230deg);"></div> <div class="donut-label">+41%</div> </div> <div class="metrics"> <div class="metric"> <span>Organic Search</span> <span class="metric-value">36%</span> </div> <div class="metric"> <span>Social Media</span> <span class="metric-value positive">28%</span> </div> <div class="metric"> <span>Direct</span> <span class="metric-value">36%</span> </div> </div> </div> <!-- Conversion Card --> <div class="card conversion-card"> <div class="card-title"> <span>Conversion Rate</span> <div class="card-icon">🎯</div> </div> <div class="metrics"> <div class="metric"> <span>Current Rate</span> <span class="metric-value positive">3.8%</span> </div> <div class="progress-container"> <div class="progress-bar" style="width: 38%; background-color: var(--secondary);"></div> </div> <div class="metric"> <span>Target</span> <span>10%</span> </div> </div> </div> <!-- Engagement Card --> <div class="card engagement-card"> <div class="card-title"> <span>User Engagement</span> <div class="card-icon">👥</div> </div> <div class="chart"> <svg class="line-chart-svg" id="engagement-chart"> <defs> <linearGradient id="area-gradient" x1="0%" y1="0%" x2="0%" y2="100%"> <stop offset="0%" stop-color="var(--primary)" stop-opacity="0.7" /> <stop offset="100%" stop-color="var(--primary)" stop-opacity="0" /> </linearGradient> </defs> <path class="line-path" d="M0,80 L40,60 L80,70 L120,30 L160,45 L200,20" stroke-dasharray="320" stroke-dashoffset="320"></path> <path class="area-path" d="M0,80 L40,60 L80,70 L120,30 L160,45 L200,20 L200,100 L0,100 Z"></path> <circle class="point" cx="0" cy="80" r="0"></circle> <circle class="point" cx="40" cy="60" r="0"></circle> <circle class="point" cx="80" cy="70" r="0"></circle> <circle class="point" cx="120" cy="30" r="0"></circle> <circle class="point" cx="160" cy="45" r="0"></circle> <circle class="point" cx="200" cy="20" r="0"></circle> </svg> </div> <div class="metrics"> <div class="metric"> <span>Avg. Session Duration</span> <span class="metric-value">4m 12s</span> </div> <div class="metric"> <span>Pages Per Session</span> <span class="metric-value positive">3.2</span> </div> </div> </div> <!-- Sales Card --> <div class="card sales-card"> <div class="card-title"> <span>Revenue Trends</span> <div class="card-icon">💰</div> </div> <div class="chart"> <div class="bar-chart" id="revenue-chart"> <div class="bar" data-value="$8,541" style="height: 50%;"></div> <div class="bar" data-value="$10,284" style="height: 60%;"></div> <div class="bar" data-value="$9,671" style="height: 56%;"></div> <div class="bar" data-value="$12,865" style="height: 75%;"></div> <div class="bar" data-value="$15,382" style="height: 90%;"></div> </div> </div> <div class="metrics"> <div class="metric"> <span>Current Month</span> <span class="metric-value positive">$15,382</span> </div> <div class="metric"> <span>Growth MoM</span> <span class="metric-value positive">19.6%</span> </div> <div class="metric"> <span>Avg. Order Value</span> <span class="metric-value">$89.42</span> </div> </div> </div> <!-- Retention Card --> <div class="card retention-card"> <div class="card-title"> <span>Customer Retention</span> <div class="card-icon">🔄</div> </div> <div class="metrics"> <div class="metric"> <span>30-day Retention</span> <span class="metric-value negative">68%</span> </div> <div class="progress-container"> <div class="progress-bar" style="width: 68%; background-color: var(--accent);"></div> </div> <div class="metric"> <span>Churn Rate</span> <span class="metric-value positive">4.2%</span> </div> </div> </div> </div> <div class="tooltip" id="tooltip"></div> </div> <script> document.addEventListener('DOMContentLoaded', function() { // Initialize the dashboard initializeCharts(); addInteractivity(); // For the asymmetric divider animation setInterval(() => { const divider = document.querySelector('.asymmetric-divider'); const currentRotation = parseFloat(getComputedStyle(divider).transform.split('(')[1]); // Randomly adjust the rotation a bit for subtle movement const newRotation = 5 + (Math.random() * 2 - 1); divider.style.transform = `rotate(${newRotation}deg)`; // Also slightly adjust the position const newLeft = 35 + (Math.random() * 2 - 1); divider.style.left = `${newLeft}%`; }, 3000); }); function initializeCharts() { // Initialize the line chart setTimeout(() => { const linePath = document.querySelector('.line-path'); linePath.style.strokeDashoffset = '0'; // Animate the points const points = document.querySelectorAll('.point'); points.forEach((point, index) => { setTimeout(() => { point.setAttribute('r', '4'); }, index * 100); }); }, 500); // Initialize progress bars const progressBars = document.querySelectorAll('.progress-bar'); progressBars.forEach(bar => { const targetWidth = bar.style.width; bar.style.width = '0'; setTimeout(() => { bar.style.width = targetWidth; }, 500); }); // Initialize bar charts const barCharts = document.querySelectorAll('.bar-chart'); barCharts.forEach(chart => { const bars = chart.querySelectorAll('.bar'); bars.forEach(bar => { const targetHeight = bar.style.height; bar.style.height = '0'; setTimeout(() => { bar.style.height = targetHeight; }, 300 + Math.random() * 500); }); }); } function addInteractivity() { // Tooltip functionality for bars const bars = document.querySelectorAll('.bar'); const tooltip = document.getElementById('tooltip'); bars.forEach(bar => { bar.addEventListener('mousemove', (e) => { const value = bar.getAttribute('data-value'); tooltip.textContent = value; tooltip.style.opacity = '1'; tooltip.style.left = `${e.pageX}px`; tooltip.style.top = `${e.pageY - 40}px`; }); bar.addEventListener('mouseleave', () => { tooltip.style.opacity = '0'; }); }); // Points on line chart const points = document.querySelectorAll('.point'); const engagementValues = ['2m 10s', '3m 45s', '3m 20s', '5m 55s', '4m 30s', '6m 15s']; points.forEach((point, index) => { point.addEventListener('mousemove', (e) => { tooltip.textContent = `Session: ${engagementValues[index]}`; tooltip.style.opacity = '1'; tooltip.style.left = `${e.pageX}px`; tooltip.style.top = `${e.pageY - 40}px`; }); point.addEventListener('mouseleave', () => { tooltip.style.opacity = '0'; }); }); // Dark theme toggle functionality const userProfile = document.querySelector('.user-profile'); userProfile.addEventListener('click', () => { document.body.classList.toggle('dark-theme'); }); } </script> </body> </html>
<html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>HealthConnect - Medical Information Portal</title> <style> * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; } :root { --primary: #4a8fe7; --primary-light: #c3d8f5; --secondary: #3fd2c0; --secondary-light: #c9f0eb; --accent: #6772e5; --text-dark: #2c3e50; --text-med: #546778; --text-light: #7f8c9a; --white: #ffffff; --off-white: #f9fafc; --gray-light: #f0f4f8; --border: #e0e6ed; } body { background-color: var(--off-white); color: var(--text-dark); width: 100%; height: 100vh; overflow-x: hidden; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; } .container { width: 100%; max-width: 700px; padding: 20px; margin: 0 auto; height: 100%; overflow-y: auto; overflow-x: hidden; } header { margin-bottom: 20px; text-align: center; } .logo { display: flex; align-items: center; justify-content: center; margin-bottom: 15px; } .logo .icon { font-size: 28px; color: var(--primary); margin-right: 10px; } .logo h1 { font-size: 24px; font-weight: 600; color: var(--primary); transition: transform 0.3s ease; } .logo:hover h1 { transform: translateY(-2px); } nav { display: flex; justify-content: center; gap: 20px; margin-bottom: 25px; } nav a { color: var(--text-med); text-decoration: none; font-size: 14px; font-weight: 500; padding: 5px 0; position: relative; transition: color 0.3s ease; } nav a:hover { color: var(--primary); } nav a::after { content: ''; position: absolute; width: 0; height: 2px; bottom: 0; left: 0; background-color: var(--primary); transition: width 0.3s ease; } nav a:hover::after { width: 100%; } .section { background-color: var(--white); border-radius: 12px; padding: 25px; margin-bottom: 30px; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05); transition: transform 0.3s ease, box-shadow 0.3s ease; } .section:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08); } .section-header { display: flex; align-items: center; margin-bottom: 20px; } .section-header i { font-size: 18px; color: var(--primary); margin-right: 10px; } .section-header h2 { font-size: 18px; font-weight: 600; color: var(--text-dark); } .dotted-divider { height: 3px; width: 100%; margin: 20px 0; background-image: radial-gradient(circle, var(--primary-light) 1px, transparent 1px); background-size: 8px 8px; position: relative; overflow: hidden; } .dotted-divider::after { content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%; background: linear-gradient(90deg, var(--primary-light) 30%, var(--secondary-light) 70%); opacity: 0.4; animation: shine 2s infinite; } @keyframes shine { 0% { left: -100%; } 100% { left: 100%; } } .content-block { margin-bottom: 20px; } .content-block h3 { font-size: 16px; font-weight: 500; color: var(--accent); margin-bottom: 10px; } .content-block p { font-size: 14px; line-height: 1.6; color: var(--text-med); margin-bottom: 15px; } .data-box { border: 1px solid var(--border); border-radius: 8px; padding: 15px; margin-bottom: 15px; display: flex; flex-direction: column; transition: background-color 0.3s ease; } .data-box:hover { background-color: var(--gray-light); } .data-box .title { font-size: 15px; font-weight: 500; color: var(--text-dark); margin-bottom: 8px; } .data-box .value { font-size: 14px; color: var(--text-med); } .highlight { font-weight: 600; color: var(--primary); } .action-buttons { display: flex; gap: 10px; margin-top: 15px; } .btn { padding: 8px 16px; border-radius: 6px; font-size: 14px; font-weight: 500; cursor: pointer; border: none; transition: all 0.3s ease; } .btn-primary { background-color: var(--primary); color: var(--white); } .btn-primary:hover { background-color: #3a7fd7; transform: translateY(-2px); } .btn-secondary { background-color: var(--white); color: var(--primary); border: 1px solid var(--primary-light); } .btn-secondary:hover { background-color: var(--primary-light); transform: translateY(-2px); } .tag { display: inline-block; padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 500; margin-right: 6px; margin-bottom: 6px; } .tag-blue { background-color: var(--primary-light); color: var(--primary); } .tag-green { background-color: var(--secondary-light); color: var(--secondary); } .tag-purple { background-color: #e5e1fa; color: var(--accent); } .info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; } @media (max-width: 480px) { .info-grid { grid-template-columns: 1fr; } nav { flex-wrap: wrap; gap: 15px; } .section { padding: 20px; } } /* Tooltip styles */ .tooltip { position: relative; display: inline-block; cursor: help; } .tooltip::after { content: "ⓘ"; font-size: 14px; color: var(--primary); margin-left: 4px; } .tooltip .tooltip-text { visibility: hidden; width: 200px; background-color: var(--text-dark); color: var(--white); text-align: center; border-radius: 6px; padding: 8px; position: absolute; z-index: 1; bottom: 125%; left: 50%; transform: translateX(-50%); opacity: 0; transition: opacity 0.3s; font-size: 12px; line-height: 1.4; pointer-events: none; } .tooltip .tooltip-text::after { content: ""; position: absolute; top: 100%; left: 50%; margin-left: -5px; border-width: 5px; border-style: solid; border-color: var(--text-dark) transparent transparent transparent; } .tooltip:hover .tooltip-text { visibility: visible; opacity: 1; } /* Toggle switches */ .toggle-switch { position: relative; display: inline-block; width: 40px; height: 20px; margin-left: auto; } .toggle-switch input { opacity: 0; width: 0; height: 0; } .slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #ccc; transition: .4s; border-radius: 20px; } .slider:before { position: absolute; content: ""; height: 16px; width: 16px; left: 2px; bottom: 2px; background-color: white; transition: .4s; border-radius: 50%; } input:checked + .slider { background-color: var(--primary); } input:focus + .slider { box-shadow: 0 0 1px var(--primary); } input:checked + .slider:before { transform: translateX(20px); } .toggle-row { display: flex; align-items: center; margin-bottom: 15px; } .toggle-row .label { font-size: 14px; color: var(--text-med); } /* Search field */ .search-container { position: relative; margin-bottom: 20px; } .search-input { width: 100%; padding: 10px 20px 10px 40px; border-radius: 30px; border: 1px solid var(--border); font-size: 14px; transition: all 0.3s ease; background-color: var(--white); color: var(--text-med); } .search-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); } .search-icon { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--text-light); } /* Pulse animation for notifications */ @keyframes pulse { 0% { transform: scale(1); } 50% { transform: scale(1.1); } 100% { transform: scale(1); } } .notification { position: relative; } .notification::after { content: ''; position: absolute; top: -5px; right: -5px; width: 8px; height: 8px; background-color: #e74c3c; border-radius: 50%; animation: pulse 1.5s infinite; } </style> </head> <body> <div class="container"> <header> <div class="logo"> <span class="icon">⚕️</span> <h1>HealthConnect</h1> </div> <nav> <a href="#dashboard">Dashboard</a> <a href="#records">Medical Records</a> <a href="#medications">Medications</a> <a href="#appointments" class="notification">Appointments</a> <a href="#resources">Resources</a> </nav> </header> <div class="search-container"> <i class="search-icon">🔍</i> <input type="text" class="search-input" placeholder="Search medical terms, symptoms, or treatments..."> </div> <section class="section"> <div class="section-header"> <i>📊</i> <h2>My Health Summary</h2> </div> <div class="content-block"> <h3>Recent Vitals</h3> <div class="info-grid"> <div class="data-box"> <span class="title">Blood Pressure</span> <span class="value">118/76 mmHg <span class="highlight">(Normal)</span></span> </div> <div class="data-box"> <span class="title">Heart Rate</span> <span class="value">72 bpm <span class="highlight">(Rest)</span></span> </div> <div class="data-box"> <span class="title">Blood Glucose</span> <span class="value">92 mg/dL <span class="highlight">(Fasting)</span></span> </div> <div class="data-box"> <span class="title">Body Temperature</span> <span class="value">98.6°F / 37°C</span> </div> </div> </div> <div class="dotted-divider"></div> <div class="content-block"> <h3>Upcoming Appointments</h3> <div class="data-box"> <span class="title">Dr. Sarah Nguyen - Cardiology</span> <span class="value">October 15, 2023 • 10:30 AM</span> <div class="action-buttons"> <button class="btn btn-primary">Confirm</button> <button class="btn btn-secondary">Reschedule</button> </div> </div> <div class="data-box"> <span class="title">Lab Work - Annual Blood Panel</span> <span class="value">October 22, 2023 • 8:15 AM</span> <div class="action-buttons"> <button class="btn btn-primary">View Instructions</button> </div> </div> </div> </section> <section class="section"> <div class="section-header"> <i>💊</i> <h2>Medication Management</h2> </div> <div class="content-block"> <h3>Current Medications</h3> <div class="data-box"> <span class="title">Lisinopril 10mg</span> <span class="value">Take 1 tablet daily in the morning</span> <span class="tags"> <span class="tag tag-blue">Blood Pressure</span> <span class="tag tag-purple">Daily</span> </span> </div> <div class="data-box"> <span class="title">Metformin 500mg</span> <span class="value">Take 1 tablet twice daily with meals</span> <span class="tags"> <span class="tag tag-green">Diabetes</span> <span class="tag tag-purple">Twice Daily</span> </span> </div> </div> <div class="dotted-divider"></div> <div class="content-block"> <h3>Medication Reminders</h3> <div class="toggle-row"> <span class="label">Morning reminder (8:00 AM)</span> <label class="toggle-switch"> <input type="checkbox" checked> <span class="slider"></span> </label> </div> <div class="toggle-row"> <span class="label">Evening reminder (7:00 PM)</span> <label class="toggle-switch"> <input type="checkbox" checked> <span class="slider"></span> </label> </div> <div class="toggle-row"> <span class="label">Refill alerts when supply is low</span> <label class="toggle-switch"> <input type="checkbox" checked> <span class="slider"></span> </label> </div> </div> </section> <section class="section"> <div class="section-header"> <i>📋</i> <h2>Lab Results</h2> </div> <div class="content-block"> <h3>Recent Lab Work <span class="tooltip"><span class="tooltip-text">Results are reviewed by your healthcare provider. Always consult with them about any concerns.</span></span></h3> <div class="data-box"> <span class="title">Complete Blood Count (CBC)</span> <span class="value">Completed: September 25, 2023</span> <div class="action-buttons"> <button class="btn btn-primary">View Details</button> </div> </div> <div class="data-box"> <span class="title">Comprehensive Metabolic Panel</span> <span class="value">Completed: September 25, 2023</span> <div class="action-buttons"> <button class="btn btn-primary">View Details</button> </div> </div> </div> <div class="dotted-divider"></div> <div class="content-block"> <h3>Test Result Insights</h3> <p>Your recent cholesterol profile shows improvement with LDL levels decreasing from 145 to 128 mg/dL. Continue with your current treatment plan and consider scheduling a follow-up with your cardiologist to discuss further steps for optimal heart health.</p> <div class="action-buttons"> <button class="btn btn-secondary">Track Progress</button> </div> </div> </section> </div> <script> // Interactive elements document.addEventListener('DOMContentLoaded', function() { // Smooth scroll for nav links document.querySelectorAll('nav a').forEach(anchor => { anchor.addEventListener('click', function(e) { e.preventDefault(); // Add active class to clicked nav item document.querySelectorAll('nav a').forEach(a => a.classList.remove('active')); this.classList.add('active'); // Scroll animation could be added here in a real implementation }); }); // Toggle switches document.querySelectorAll('.toggle-switch input').forEach(toggle => { toggle.addEventListener('change', function() { // In a real app, this would save preferences const label = this.closest('.toggle-row').querySelector('.label').textContent; console.log(`${label} is now ${this.checked ? 'enabled' : 'disabled'}`); }); }); // Search functionality const searchInput = document.querySelector('.search-input'); searchInput.addEventListener('focus', function() { this.placeholder = ''; }); searchInput.addEventListener('blur', function() { this.placeholder = 'Search medical terms, symptoms, or treatments...'; }); searchInput.addEventListener('input', function() { // In a real app, this would trigger search results console.log(`Searching for: ${this.value}`); }); // Button interactions document.querySelectorAll('.btn').forEach(button => { button.addEventListener('click', function() { // Add a click effect this.style.transform = 'scale(0.95)'; setTimeout(() => { this.style.transform = ''; }, 100); // In a real app, this would trigger various actions console.log(`Button clicked: ${this.textContent}`); }); }); // Make data boxes interactive document.querySelectorAll('.data-box').forEach(box => { box.addEventListener('click', function(e) { // Don't trigger if clicking on a button inside the box if (e.target.closest('.btn')) return; // Add a subtle highlight effect this.style.backgroundColor = 'var(--primary-light)'; setTimeout(() => { this.style.backgroundColor = ''; }, 300); }); }); // Randomize the dotted divider animation document.querySelectorAll('.dotted-divider').forEach(divider => { const delay = Math.random() * 2; divider.style.animationDelay = `-${delay}s`; }); }); </script> </body> </html>