Spaces:
Running
Running
il faut ajouter un navbar et un boton de shat de whatsap
Browse files- components/navbar.js +28 -2
- index.html +3 -0
- style.css +28 -0
components/navbar.js
CHANGED
|
@@ -80,8 +80,31 @@ class CustomNavbar extends HTMLElement {
|
|
| 80 |
.mobile-menu-btn {
|
| 81 |
display: block;
|
| 82 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 83 |
}
|
| 84 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 85 |
<nav>
|
| 86 |
<a href="/" class="logo">
|
| 87 |
<span>SEWODA KB</span>
|
|
@@ -96,8 +119,11 @@ class CustomNavbar extends HTMLElement {
|
|
| 96 |
<button class="mobile-menu-btn">
|
| 97 |
<i data-feather="menu"></i>
|
| 98 |
</button>
|
|
|
|
|
|
|
|
|
|
| 99 |
</nav>
|
| 100 |
-
|
| 101 |
|
| 102 |
// Mobile menu toggle
|
| 103 |
const mobileBtn = this.shadowRoot.querySelector('.mobile-menu-btn');
|
|
|
|
| 80 |
.mobile-menu-btn {
|
| 81 |
display: block;
|
| 82 |
}
|
| 83 |
+
.whatsapp-btn {
|
| 84 |
+
display: none;
|
| 85 |
+
}
|
| 86 |
+
}
|
| 87 |
+
.whatsapp-btn {
|
| 88 |
+
background: #25D366;
|
| 89 |
+
color: white;
|
| 90 |
+
width: 50px;
|
| 91 |
+
height: 50px;
|
| 92 |
+
border-radius: 50%;
|
| 93 |
+
display: flex;
|
| 94 |
+
align-items: center;
|
| 95 |
+
justify-content: center;
|
| 96 |
+
position: fixed;
|
| 97 |
+
bottom: 20px;
|
| 98 |
+
right: 20px;
|
| 99 |
+
box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
|
| 100 |
+
transition: all 0.3s ease;
|
| 101 |
+
z-index: 999;
|
| 102 |
}
|
| 103 |
+
.whatsapp-btn:hover {
|
| 104 |
+
transform: scale(1.1);
|
| 105 |
+
box-shadow: 0 6px 16px rgba(37, 211, 102, 0.4);
|
| 106 |
+
}
|
| 107 |
+
</style>
|
| 108 |
<nav>
|
| 109 |
<a href="/" class="logo">
|
| 110 |
<span>SEWODA KB</span>
|
|
|
|
| 119 |
<button class="mobile-menu-btn">
|
| 120 |
<i data-feather="menu"></i>
|
| 121 |
</button>
|
| 122 |
+
<a href="https://wa.me/228XXXXXXXXX" target="_blank" class="whatsapp-btn">
|
| 123 |
+
<i data-feather="message-circle"></i>
|
| 124 |
+
</a>
|
| 125 |
</nav>
|
| 126 |
+
`;
|
| 127 |
|
| 128 |
// Mobile menu toggle
|
| 129 |
const mobileBtn = this.shadowRoot.querySelector('.mobile-menu-btn');
|
index.html
CHANGED
|
@@ -41,6 +41,9 @@
|
|
| 41 |
<body class="bg-gradient-to-br from-[#0F0C29] via-[#302B63] to-[#24243E] min-h-screen font-poppins text-white">
|
| 42 |
<script src="components/navbar.js"></script>
|
| 43 |
<custom-navbar></custom-navbar>
|
|
|
|
|
|
|
|
|
|
| 44 |
<!-- Hero Section -->
|
| 45 |
<section class="container mx-auto px-6 py-20 md:py-32 text-center">
|
| 46 |
<div class="max-w-4xl mx-auto animate-fade-up">
|
|
|
|
| 41 |
<body class="bg-gradient-to-br from-[#0F0C29] via-[#302B63] to-[#24243E] min-h-screen font-poppins text-white">
|
| 42 |
<script src="components/navbar.js"></script>
|
| 43 |
<custom-navbar></custom-navbar>
|
| 44 |
+
<a href="https://wa.me/228XXXXXXXXX" target="_blank" class="whatsapp-btn-mobile md:hidden">
|
| 45 |
+
<i data-feather="message-circle"></i>
|
| 46 |
+
</a>
|
| 47 |
<!-- Hero Section -->
|
| 48 |
<section class="container mx-auto px-6 py-20 md:py-32 text-center">
|
| 49 |
<div class="max-w-4xl mx-auto animate-fade-up">
|
style.css
CHANGED
|
@@ -1,8 +1,36 @@
|
|
|
|
|
| 1 |
body {
|
| 2 |
padding: 2rem;
|
| 3 |
font-family: -apple-system, BlinkMacSystemFont, "Arial", sans-serif;
|
| 4 |
}
|
| 5 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
h1 {
|
| 7 |
font-size: 16px;
|
| 8 |
margin-top: 0;
|
|
|
|
| 1 |
+
|
| 2 |
body {
|
| 3 |
padding: 2rem;
|
| 4 |
font-family: -apple-system, BlinkMacSystemFont, "Arial", sans-serif;
|
| 5 |
}
|
| 6 |
|
| 7 |
+
.whatsapp-btn-mobile {
|
| 8 |
+
background: #25D366;
|
| 9 |
+
color: white;
|
| 10 |
+
width: 50px;
|
| 11 |
+
height: 50px;
|
| 12 |
+
border-radius: 50%;
|
| 13 |
+
display: flex;
|
| 14 |
+
align-items: center;
|
| 15 |
+
justify-content: center;
|
| 16 |
+
position: fixed;
|
| 17 |
+
bottom: 20px;
|
| 18 |
+
right: 20px;
|
| 19 |
+
box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
|
| 20 |
+
transition: all 0.3s ease;
|
| 21 |
+
z-index: 999;
|
| 22 |
+
}
|
| 23 |
+
|
| 24 |
+
.whatsapp-btn-mobile:hover {
|
| 25 |
+
transform: scale(1.1);
|
| 26 |
+
box-shadow: 0 6px 16px rgba(37, 211, 102, 0.4);
|
| 27 |
+
}
|
| 28 |
+
|
| 29 |
+
@media (min-width: 768px) {
|
| 30 |
+
.whatsapp-btn-mobile {
|
| 31 |
+
display: none;
|
| 32 |
+
}
|
| 33 |
+
}
|
| 34 |
h1 {
|
| 35 |
font-size: 16px;
|
| 36 |
margin-top: 0;
|