mansib12 commited on
Commit
51d9920
·
verified ·
1 Parent(s): 7c84992

create a navbar for every page

Browse files
Files changed (4) hide show
  1. components/navbar.js +16 -30
  2. index.html +9 -72
  3. projects.html +2 -2
  4. style.css +17 -27
components/navbar.js CHANGED
@@ -4,7 +4,7 @@ class CustomNavbar extends HTMLElement {
4
  this.shadowRoot.innerHTML = `
5
  <style>
6
  nav {
7
- background-color: rgba(17, 24, 39, 0.9);
8
  backdrop-filter: blur(8px);
9
  padding: 1rem 2rem;
10
  position: sticky;
@@ -19,10 +19,10 @@ class CustomNavbar extends HTMLElement {
19
  justify-content: space-between;
20
  align-items: center;
21
  }
22
- .nav-logo {
23
- font-weight: 700;
24
  font-size: 1.5rem;
25
- color: #f43f5e;
 
26
  text-decoration: none;
27
  }
28
  .nav-links {
@@ -33,46 +33,32 @@ class CustomNavbar extends HTMLElement {
33
  color: rgba(255, 255, 255, 0.8);
34
  text-decoration: none;
35
  font-weight: 500;
36
- transition: all 0.2s ease;
37
- padding: 0.5rem 0;
38
- position: relative;
39
  }
40
  .nav-link:hover {
41
  color: white;
42
  }
43
- .nav-link::after {
44
- content: '';
45
- position: absolute;
46
- bottom: 0;
47
- left: 0;
48
- width: 0;
49
- height: 2px;
50
- background-color: #f43f5e;
51
- transition: width 0.3s ease;
52
- }
53
- .nav-link:hover::after {
54
- width: 100%;
55
- }
56
- .active {
57
  color: white;
58
- }
59
- .active::after {
60
- width: 100%;
61
  }
62
  @media (max-width: 768px) {
 
 
 
63
  .nav-links {
64
- display: none;
65
  }
66
  }
67
  </style>
68
  <nav>
69
  <div class="nav-container">
70
- <a href="/" class="nav-logo">SecureAPI Ninja</a>
71
  <div class="nav-links">
72
- <a href="/" class="nav-link active">Home</a>
73
- <a href="/projects.html" class="nav-link">Projects</a>
74
- <a href="/services.html" class="nav-link">Services</a>
75
- <a href="/contact.html" class="nav-link">Contact</a>
76
  </div>
77
  </div>
78
  </nav>
 
4
  this.shadowRoot.innerHTML = `
5
  <style>
6
  nav {
7
+ background: rgba(17, 24, 39, 0.9);
8
  backdrop-filter: blur(8px);
9
  padding: 1rem 2rem;
10
  position: sticky;
 
19
  justify-content: space-between;
20
  align-items: center;
21
  }
22
+ .logo {
 
23
  font-size: 1.5rem;
24
+ font-weight: 700;
25
+ color: white;
26
  text-decoration: none;
27
  }
28
  .nav-links {
 
33
  color: rgba(255, 255, 255, 0.8);
34
  text-decoration: none;
35
  font-weight: 500;
36
+ transition: color 0.2s;
 
 
37
  }
38
  .nav-link:hover {
39
  color: white;
40
  }
41
+ .nav-link.active {
 
 
 
 
 
 
 
 
 
 
 
 
 
42
  color: white;
43
+ border-bottom: 2px solid white;
 
 
44
  }
45
  @media (max-width: 768px) {
46
+ nav {
47
+ padding: 1rem;
48
+ }
49
  .nav-links {
50
+ gap: 1rem;
51
  }
52
  }
53
  </style>
54
  <nav>
55
  <div class="nav-container">
56
+ <a href="/" class="logo">Mohammad Mansib Nawaz</a>
57
  <div class="nav-links">
58
+ <a href="/" class="nav-link">Home</a>
59
+ <a href="/projects.html" class="nav-link active">Projects</a>
60
+ <a href="#" class="nav-link">Blog</a>
61
+ <a href="#" class="nav-link">Contact</a>
62
  </div>
63
  </div>
64
  </nav>
index.html CHANGED
@@ -3,97 +3,34 @@
3
  <head>
4
  <meta charset="UTF-8">
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <title>Mohammad Mansib Nawaz - Secure API Developer</title>
7
  <link rel="stylesheet" href="style.css">
8
  <script src="https://cdn.tailwindcss.com"></script>
9
  <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
10
- <script src="https://unpkg.com/feather-icons"></script>
11
- <script>
12
- tailwind.config = {
13
- darkMode: 'class',
14
- theme: {
15
- extend: {
16
- colors: {
17
- primary: {
18
- 500: '#f43f5e',
19
- },
20
- secondary: {
21
- 500: '#f97316',
22
- }
23
- }
24
- }
25
- }
26
- }
27
- </script>
28
  </head>
29
  <body class="bg-gray-900 text-gray-100 min-h-screen flex flex-col">
30
  <custom-navbar></custom-navbar>
31
- <main class="flex-grow container mx-auto px-4 py-12 md:py-24">
 
32
  <div class="max-w-4xl mx-auto">
33
- <div class="flex flex-col md:flex-row gap-12 items-center">
34
- <div class="w-full md:w-1/3 flex justify-center">
35
- <div class="relative group">
36
- <img src="https://mnxtr.github.io/img/avatar.jpg" alt="Mohammad Mansib Nawaz"
37
- class="rounded-full w-64 h-64 object-cover border-4 border-primary-500 group-hover:border-secondary-500 transition-all duration-300">
38
- <div class="absolute inset-0 rounded-full border-4 border-transparent group-hover:border-secondary-500 opacity-0 group-hover:opacity-100 transition-all duration-300"></div>
39
- </div>
40
- </div>
41
-
42
- <div class="w-full md:w-2/3">
43
- <h1 class="text-4xl md:text-5xl font-bold mb-6">
44
- Hello, I'm <span class="text-primary-500">Mohammad Mansib Nawaz</span>
45
- </h1>
46
-
47
- <div class="prose prose-invert max-w-none mb-8">
48
- <p class="text-xl leading-relaxed">
49
- With <span class="text-secondary-500 font-bold">4 years of experience</span> in backend engineering and network security and analysis, I provide services related to <span class="text-primary-500 font-bold">FastAPI</span> and secure API development.
50
- </p>
51
- </div>
52
-
53
- <div class="flex flex-wrap gap-4 mb-12">
54
- <div class="px-4 py-2 bg-gray-800 rounded-full flex items-center gap-2">
55
- <i data-feather="shield" class="text-primary-500 w-5 h-5"></i>
56
- <span>Network Security</span>
57
- </div>
58
- <div class="px-4 py-2 bg-gray-800 rounded-full flex items-center gap-2">
59
- <i data-feather="code" class="text-secondary-500 w-5 h-5"></i>
60
- <span>Backend Engineering</span>
61
- </div>
62
- <div class="px-4 py-2 bg-gray-800 rounded-full flex items-center gap-2">
63
- <i data-feather="lock" class="text-primary-500 w-5 h-5"></i>
64
- <span>Secure API Development</span>
65
- </div>
66
- </div>
67
-
68
- <div class="flex gap-4">
69
- <a href="#" class="px-6 py-3 bg-primary-500 hover:bg-primary-600 rounded-lg font-medium transition-colors flex items-center gap-2">
70
- <i data-feather="mail"></i>
71
- Contact Me
72
- </a>
73
- <a href="#" class="px-6 py-3 border border-gray-700 hover:border-secondary-500 rounded-lg font-medium transition-colors flex items-center gap-2">
74
- <i data-feather="github"></i>
75
- View Projects
76
- </a>
77
- </div>
78
- </div>
79
- </div>
80
  </div>
81
  </main>
82
-
83
  <footer class="bg-gray-800 py-8">
84
  <div class="container mx-auto px-4 text-center">
85
  <p class="text-gray-400 mb-2">
86
  © 2025 Mohammad Mansib Nawaz. All rights reserved.
87
  </p>
88
- <p class="text-gray-500 italic">
89
- Enhancing secure API development and backend solutions.
90
- </p>
91
  </div>
92
  </footer>
 
93
  <script src="components/navbar.js"></script>
94
  <script>
95
  feather.replace();
96
  </script>
97
- <script src="https://huggingface.co/deepsite/deepsite-badge.js"></script>
98
  </body>
99
  </html>
 
3
  <head>
4
  <meta charset="UTF-8">
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Mohammad Mansib Nawaz</title>
7
  <link rel="stylesheet" href="style.css">
8
  <script src="https://cdn.tailwindcss.com"></script>
9
  <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
  </head>
11
  <body class="bg-gray-900 text-gray-100 min-h-screen flex flex-col">
12
  <custom-navbar></custom-navbar>
13
+
14
+ <main class="flex-grow container mx-auto px-4 py-12">
15
  <div class="max-w-4xl mx-auto">
16
+ <h1 class="text-4xl font-bold mb-8 text-center">Welcome</h1>
17
+ <p class="text-xl text-center text-gray-300 mb-12">
18
+ Hi, I'm Mohammad Mansib Nawaz. I build things for the web.
19
+ </p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
20
  </div>
21
  </main>
22
+
23
  <footer class="bg-gray-800 py-8">
24
  <div class="container mx-auto px-4 text-center">
25
  <p class="text-gray-400 mb-2">
26
  © 2025 Mohammad Mansib Nawaz. All rights reserved.
27
  </p>
 
 
 
28
  </div>
29
  </footer>
30
+
31
  <script src="components/navbar.js"></script>
32
  <script>
33
  feather.replace();
34
  </script>
 
35
  </body>
36
  </html>
projects.html CHANGED
@@ -10,8 +10,8 @@
10
  </head>
11
  <body class="bg-gray-900 text-gray-100 min-h-screen flex flex-col">
12
  <custom-navbar></custom-navbar>
13
-
14
- <main class="flex-grow container mx-auto px-4 py-12">
15
  <div class="max-w-4xl mx-auto">
16
  <h1 class="text-4xl font-bold mb-12 text-center">My Projects</h1>
17
  <!-- Projects will be added here -->
 
10
  </head>
11
  <body class="bg-gray-900 text-gray-100 min-h-screen flex flex-col">
12
  <custom-navbar></custom-navbar>
13
+ <script src="components/navbar.js"></script>
14
+ <main class="flex-grow container mx-auto px-4 py-12">
15
  <div class="max-w-4xl mx-auto">
16
  <h1 class="text-4xl font-bold mb-12 text-center">My Projects</h1>
17
  <!-- Projects will be added here -->
style.css CHANGED
@@ -1,36 +1,26 @@
1
- @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
2
-
3
  body {
4
- font-family: 'Inter', sans-serif;
5
- }
6
-
7
- .prose {
8
- line-height: 1.75;
9
- }
10
-
11
- .prose p {
12
- margin-bottom: 1.25em;
13
  }
14
 
15
- /* Smooth transitions for dark mode */
16
  html {
17
  transition: background-color 0.3s ease;
18
  }
19
 
20
- /* Animation for the profile picture */
21
- @keyframes pulse-glow {
22
- 0% {
23
- box-shadow: 0 0 0 0 rgba(244, 63, 94, 0.7);
24
- }
25
- 70% {
26
- box-shadow: 0 0 0 10px rgba(244, 63, 94, 0);
27
- }
28
- 100% {
29
- box-shadow: 0 0 0 0 rgba(244, 63, 94, 0);
30
- }
31
  }
32
-
33
- /* Apply the animation to profile picture on hover */
34
- .group:hover img {
35
- animation: pulse-glow 1.5s infinite;
 
 
 
 
 
36
  }
 
1
+ /* Base styles */
 
2
  body {
3
+ font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
4
+ line-height: 1.5;
 
 
 
 
 
 
 
5
  }
6
 
7
+ /* Dark mode transition */
8
  html {
9
  transition: background-color 0.3s ease;
10
  }
11
 
12
+ /* Custom scrollbar */
13
+ ::-webkit-scrollbar {
14
+ width: 8px;
15
+ height: 8px;
 
 
 
 
 
 
 
16
  }
17
+ ::-webkit-scrollbar-track {
18
+ background: #1a202c;
19
+ }
20
+ ::-webkit-scrollbar-thumb {
21
+ background: #4a5568;
22
+ border-radius: 4px;
23
+ }
24
+ ::-webkit-scrollbar-thumb:hover {
25
+ background: #718096;
26
  }