File size: 3,062 Bytes
ac2ecb5
 
 
 
 
 
 
 
 
 
 
 
 
 
833b632
 
 
 
 
ac2ecb5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
833b632
 
ac2ecb5
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Diagonal Scroll</title>
    <link rel="stylesheet" href="style.css">
    <script src="https://cdn.tailwindcss.com"></script>
    <script src="https://unpkg.com/feather-icons"></script>
    <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.12.2/gsap.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.12.2/ScrollTrigger.min.js"></script>
</head>
<body class="overflow-hidden">
    <diagonal-navbar></diagonal-navbar>
    <diagonal-footer></diagonal-footer>
    <div id="diagonal-scroll-container">
        <div id="content-wrapper">
<section class="panel bg-gradient-to-br from-indigo-500 to-purple-600 w-screen h-screen flex items-center justify-center">
                <div class="text-center max-w-2xl px-4">
                    <h1 class="text-5xl md:text-7xl font-bold text-white mb-6">Scroll Diagonally</h1>
                    <p class="text-xl text-white opacity-90 mb-8">A unique scrolling experience that breaks the vertical convention</p>
                    <div class="animate-bounce">
                        <i data-feather="arrow-down-right" class="text-white w-12 h-12"></i>
                    </div>
                </div>
            </section>
            <section class="panel bg-gradient-to-br from-amber-500 to-pink-500 w-screen h-screen flex items-center justify-center">
                <div class="text-center max-w-2xl px-4">
                    <h2 class="text-4xl md:text-6xl font-bold text-white mb-6">How Does It Work?</h2>
                    <p class="text-xl text-white opacity-90 mb-8">We're using GSAP's ScrollTrigger to transform the viewport on scroll</p>
                </div>
            </section>
            <section class="panel bg-gradient-to-br from-emerald-500 to-teal-600 w-screen h-screen flex items-center justify-center">
                <div class="text-center max-w-2xl px-4">
                    <h2 class="text-4xl md:text-6xl font-bold text-white mb-6">Try Scrolling</h2>
                    <p class="text-xl text-white opacity-90 mb-8">Notice how the content moves diagonally instead of vertically</p>
                </div>
            </section>
            <section class="panel bg-gradient-to-br from-rose-500 to-fuchsia-600 w-screen h-screen flex items-center justify-center">
                <div class="text-center max-w-2xl px-4">
                    <h2 class="text-4xl md:text-6xl font-bold text-white mb-6">Mobile Friendly</h2>
                    <p class="text-xl text-white opacity-90">This effect works on all device sizes</p>
                </div>
            </section>
        </div>
    </div>
    <script src="components/navbar.js"></script>
    <script src="components/footer.js"></script>
    <script src="script.js"></script>
    <script>
        feather.replace();
    </script>
</body>
</html>