Brandyjoy commited on
Commit
e71074e
·
verified ·
1 Parent(s): af0d952
Files changed (3) hide show
  1. components/navbar.js +146 -0
  2. features.html +74 -0
  3. index.html +2 -30
components/navbar.js ADDED
@@ -0,0 +1,146 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ class CustomNavbar extends HTMLElement {
2
+ connectedCallback() {
3
+ this.attachShadow({ mode: 'open' });
4
+ this.shadowRoot.innerHTML = `
5
+ <style>
6
+ nav {
7
+ background: white;
8
+ box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
9
+ position: fixed;
10
+ width: 100%;
11
+ z-index: 10;
12
+ }
13
+ .container {
14
+ max-width: 1200px;
15
+ margin: 0 auto;
16
+ padding: 0 1rem;
17
+ }
18
+ .flex {
19
+ display: flex;
20
+ justify-content: space-between;
21
+ align-items: center;
22
+ height: 4rem;
23
+ }
24
+ .logo {
25
+ display: flex;
26
+ align-items: center;
27
+ gap: 0.5rem;
28
+ font-weight: 700;
29
+ font-size: 1.25rem;
30
+ color: #1a1a1a;
31
+ text-decoration: none;
32
+ }
33
+ .logo-icon {
34
+ color: #6366f1;
35
+ font-size: 1.5rem;
36
+ }
37
+ .nav-links {
38
+ display: none;
39
+ gap: 1.5rem;
40
+ }
41
+ .nav-link {
42
+ color: #4b5563;
43
+ font-weight: 500;
44
+ text-decoration: none;
45
+ transition: color 0.2s;
46
+ }
47
+ .nav-link:hover {
48
+ color: #6366f1;
49
+ }
50
+ .active {
51
+ color: #1a1a1a;
52
+ }
53
+ .cta-button {
54
+ background: #6366f1;
55
+ color: white;
56
+ padding: 0.5rem 1rem;
57
+ border-radius: 0.375rem;
58
+ font-weight: 500;
59
+ transition: background 0.2s;
60
+ }
61
+ .cta-button:hover {
62
+ background: #4f46e5;
63
+ }
64
+ .mobile-menu-button {
65
+ display: flex;
66
+ align-items: center;
67
+ justify-content: center;
68
+ padding: 0.5rem;
69
+ border-radius: 0.375rem;
70
+ color: #6b7280;
71
+ }
72
+ .mobile-menu-button:hover {
73
+ background: #f3f4f6;
74
+ color: #4b5563;
75
+ }
76
+ .mobile-menu {
77
+ display: none;
78
+ padding: 1rem;
79
+ background: white;
80
+ box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
81
+ }
82
+ .mobile-menu.active {
83
+ display: block;
84
+ }
85
+ .mobile-nav-link {
86
+ display: block;
87
+ padding: 0.75rem 0;
88
+ color: #4b5563;
89
+ text-decoration: none;
90
+ }
91
+ .mobile-nav-link:hover {
92
+ color: #6366f1;
93
+ }
94
+ @media (min-width: 768px) {
95
+ .nav-links {
96
+ display: flex;
97
+ align-items: center;
98
+ }
99
+ .mobile-menu-button {
100
+ display: none;
101
+ }
102
+ }
103
+ </style>
104
+ <nav>
105
+ <div class="container">
106
+ <div class="flex">
107
+ <a href="/" class="logo">
108
+ <i class="fas fa-cube logo-icon"></i>
109
+ <span>ModernUI</span>
110
+ </a>
111
+
112
+ <div class="nav-links">
113
+ <a href="/" class="nav-link active">Home</a>
114
+ <a href="/features.html" class="nav-link">Features</a>
115
+ <a href="/pricing.html" class="nav-link">Pricing</a>
116
+ <a href="/about.html" class="nav-link">About</a>
117
+ <a href="/get-started.html" class="cta-button">Get Started</a>
118
+ </div>
119
+
120
+ <button class="mobile-menu-button">
121
+ <i class="fas fa-bars"></i>
122
+ </button>
123
+ </div>
124
+
125
+ <div class="mobile-menu">
126
+ <a href="/" class="mobile-nav-link active">Home</a>
127
+ <a href="/features.html" class="mobile-nav-link">Features</a>
128
+ <a href="/pricing.html" class="mobile-nav-link">Pricing</a>
129
+ <a href="/about.html" class="mobile-nav-link">About</a>
130
+ <a href="/get-started.html" class="mobile-nav-link">Get Started</a>
131
+ </div>
132
+ </div>
133
+ </nav>
134
+ `;
135
+
136
+ // Mobile menu toggle functionality
137
+ const menuButton = this.shadowRoot.querySelector('.mobile-menu-button');
138
+ const mobileMenu = this.shadowRoot.querySelector('.mobile-menu');
139
+
140
+ menuButton.addEventListener('click', () => {
141
+ mobileMenu.classList.toggle('active');
142
+ });
143
+ }
144
+ }
145
+
146
+ customElements.define('custom-navbar', CustomNavbar);
features.html ADDED
@@ -0,0 +1,74 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Features - Modern UI Showcase</title>
7
+ <script src="https://cdn.tailwindcss.com"></script>
8
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
9
+ <link rel="stylesheet" href="style.css">
10
+ </head>
11
+ <body>
12
+ <custom-navbar></custom-navbar>
13
+
14
+ <main class="pt-20 pb-16 px-4 max-w-6xl mx-auto">
15
+ <section class="text-center mb-16">
16
+ <h1 class="text-4xl font-bold text-gray-900 mb-4">Our Powerful Features</h1>
17
+ <p class="text-xl text-gray-600 max-w-2xl mx-auto">Discover what makes our product stand out from the competition</p>
18
+ </section>
19
+
20
+ <div class="grid md:grid-cols-2 lg:grid-cols-3 gap-8">
21
+ <div class="bg-white rounded-xl shadow-md overflow-hidden p-6 hover:shadow-lg transition-shadow">
22
+ <div class="text-indigo-500 text-3xl mb-4">
23
+ <i class="fas fa-bolt"></i>
24
+ </div>
25
+ <h3 class="text-xl font-semibold mb-2">Lightning Fast</h3>
26
+ <p class="text-gray-600">Optimized for speed with our cutting-edge technology stack.</p>
27
+ </div>
28
+
29
+ <div class="bg-white rounded-xl shadow-md overflow-hidden p-6 hover:shadow-lg transition-shadow">
30
+ <div class="text-indigo-500 text-3xl mb-4">
31
+ <i class="fas fa-shield-alt"></i>
32
+ </div>
33
+ <h3 class="text-xl font-semibold mb-2">Enterprise Security</h3>
34
+ <p class="text-gray-600">Military-grade encryption to keep your data safe and secure.</p>
35
+ </div>
36
+
37
+ <div class="bg-white rounded-xl shadow-md overflow-hidden p-6 hover:shadow-lg transition-shadow">
38
+ <div class="text-indigo-500 text-3xl mb-4">
39
+ <i class="fas fa-sync-alt"></i>
40
+ </div>
41
+ <h3 class="text-xl font-semibold mb-2">Real-time Sync</h3>
42
+ <p class="text-gray-600">Changes update instantly across all your devices.</p>
43
+ </div>
44
+
45
+ <div class="bg-white rounded-xl shadow-md overflow-hidden p-6 hover:shadow-lg transition-shadow">
46
+ <div class="text-indigo-500 text-3xl mb-4">
47
+ <i class="fas fa-chart-line"></i>
48
+ </div>
49
+ <h3 class="text-xl font-semibold mb-2">Advanced Analytics</h3>
50
+ <p class="text-gray-600">Get actionable insights with our powerful reporting tools.</p>
51
+ </div>
52
+
53
+ <div class="bg-white rounded-xl shadow-md overflow-hidden p-6 hover:shadow-lg transition-shadow">
54
+ <div class="text-indigo-500 text-3xl mb-4">
55
+ <i class="fas fa-cogs"></i>
56
+ </div>
57
+ <h3 class="text-xl font-semibold mb-2">Customizable</h3>
58
+ <p class="text-gray-600">Tailor the platform to your exact business needs.</p>
59
+ </div>
60
+
61
+ <div class="bg-white rounded-xl shadow-md overflow-hidden p-6 hover:shadow-lg transition-shadow">
62
+ <div class="text-indigo-500 text-3xl mb-4">
63
+ <i class="fas fa-headset"></i>
64
+ </div>
65
+ <h3 class="text-xl font-semibold mb-2">24/7 Support</h3>
66
+ <p class="text-gray-600">Our expert team is always ready to help you succeed.</p>
67
+ </div>
68
+ </div>
69
+ </main>
70
+
71
+ <script src="components/navbar.js"></script>
72
+ <script src="script.js"></script>
73
+ </body>
74
+ </html>
index.html CHANGED
@@ -63,34 +63,6 @@
63
  </style>
64
  </head>
65
  <body>
66
- <!-- Navigation -->
67
- <nav class="bg-white shadow-sm fixed w-full z-10">
68
- <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
69
- <div class="flex justify-between h-16">
70
- <div class="flex items-center">
71
- <div class="flex-shrink-0 flex items-center">
72
- <i class="fas fa-cube text-indigo-500 text-2xl mr-2"></i>
73
- <span class="text-xl font-bold text-gray-900">ModernUI</span>
74
- </div>
75
- </div>
76
- <div class="hidden md:ml-6 md:flex md:items-center md:space-x-8">
77
- <a href="#" class="text-gray-900 hover:text-indigo-500 px-3 py-2 text-sm font-medium">Home</a>
78
- <a href="#" class="text-gray-500 hover:text-indigo-500 px-3 py-2 text-sm font-medium">Features</a>
79
- <a href="#" class="text-gray-500 hover:text-indigo-500 px-3 py-2 text-sm font-medium">Pricing</a>
80
- <a href="#" class="text-gray-500 hover:text-indigo-500 px-3 py-2 text-sm font-medium">About</a>
81
- <button class="bg-indigo-500 hover:bg-indigo-600 text-white px-4 py-2 rounded-md text-sm font-medium transition duration-300">
82
- Get Started
83
- </button>
84
- </div>
85
- <div class="-mr-2 flex items-center md:hidden">
86
- <button id="mobile-menu-button" class="inline-flex items-center justify-center p-2 rounded-md text-gray-400 hover:text-gray-500 hover:bg-gray-100 focus:outline-none">
87
- <i class="fas fa-bars"></i>
88
- </button>
89
- </div>
90
- </div>
91
- </div>
92
-
93
- <!-- Mobile menu -->
94
- <div id="mobile-menu" class="hidden md:hidden bg-white shadow-lg">
95
- <div class="px-2
96
  </html>
 
63
  </style>
64
  </head>
65
  <body>
66
+ <script src="components/navbar.js"></script>
67
+ <custom-navbar></custom-navbar>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
68
  </html>