i need a logo instead of a text in the header
Browse files- components/logo.js +41 -0
- components/navbar.js +1 -2
- index.html +2 -1
components/logo.js
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
class CustomLogo extends HTMLElement {
|
| 2 |
+
connectedCallback() {
|
| 3 |
+
this.attachShadow({ mode: 'open' });
|
| 4 |
+
this.shadowRoot.innerHTML = `
|
| 5 |
+
<style>
|
| 6 |
+
.logo-container {
|
| 7 |
+
display: flex;
|
| 8 |
+
align-items: center;
|
| 9 |
+
gap: 0.5rem;
|
| 10 |
+
}
|
| 11 |
+
.logo-icon {
|
| 12 |
+
width: 32px;
|
| 13 |
+
height: 32px;
|
| 14 |
+
background: linear-gradient(135deg, #f97316 0%, #fbbf24 100%);
|
| 15 |
+
border-radius: 50%;
|
| 16 |
+
display: flex;
|
| 17 |
+
align-items: center;
|
| 18 |
+
justify-content: center;
|
| 19 |
+
color: white;
|
| 20 |
+
font-weight: bold;
|
| 21 |
+
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
| 22 |
+
}
|
| 23 |
+
.logo-text {
|
| 24 |
+
font-size: 1.5rem;
|
| 25 |
+
font-weight: bold;
|
| 26 |
+
background: linear-gradient(to right, #f97316, #fbbf24);
|
| 27 |
+
-webkit-background-clip: text;
|
| 28 |
+
background-clip: text;
|
| 29 |
+
color: transparent;
|
| 30 |
+
transition: all 0.3s ease;
|
| 31 |
+
}
|
| 32 |
+
</style>
|
| 33 |
+
<div class="logo-container">
|
| 34 |
+
<div class="logo-icon">W&L</div>
|
| 35 |
+
<span class="logo-text">Wire&Light</span>
|
| 36 |
+
</div>
|
| 37 |
+
`;
|
| 38 |
+
}
|
| 39 |
+
}
|
| 40 |
+
|
| 41 |
+
customElements.define('custom-logo', CustomLogo);
|
components/navbar.js
CHANGED
|
@@ -76,8 +76,7 @@ class CustomNavbar extends HTMLElement {
|
|
| 76 |
<div class="container mx-auto px-6">
|
| 77 |
<div class="flex justify-between items-center py-4">
|
| 78 |
<a href="/" class="flex items-center">
|
| 79 |
-
<
|
| 80 |
-
<span class="text-2xl font-bold text-white">Wire<span class="text-orange-500">&</span>Light</span>
|
| 81 |
</a>
|
| 82 |
|
| 83 |
<div class="hidden md:flex items-center space-x-6">
|
|
|
|
| 76 |
<div class="container mx-auto px-6">
|
| 77 |
<div class="flex justify-between items-center py-4">
|
| 78 |
<a href="/" class="flex items-center">
|
| 79 |
+
<custom-logo></custom-logo>
|
|
|
|
| 80 |
</a>
|
| 81 |
|
| 82 |
<div class="hidden md:flex items-center space-x-6">
|
index.html
CHANGED
|
@@ -7,6 +7,7 @@
|
|
| 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="components/navbar.js"></script>
|
| 11 |
<script src="components/footer.js"></script>
|
| 12 |
<script src="components/service-card.js"></script>
|
|
@@ -87,7 +88,7 @@
|
|
| 87 |
<img src="https://static.photos/people/640x360/1" alt="Electrician at work" class="rounded-lg shadow-xl">
|
| 88 |
</div>
|
| 89 |
<div class="md:w-1/2">
|
| 90 |
-
<h2 class="text-4xl font-bold mb-6 text-orange-500">About
|
| 91 |
<p class="mb-4 text-gray-300">With over 15 years of experience serving Athens and surrounding areas, I provide reliable and professional electrical services.</p>
|
| 92 |
<p class="mb-4 text-gray-300">Fully licensed and insured, I take pride in delivering high-quality workmanship with attention to detail and safety.</p>
|
| 93 |
<div class="mt-8 grid grid-cols-2 gap-4">
|
|
|
|
| 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="components/logo.js"></script>
|
| 11 |
<script src="components/navbar.js"></script>
|
| 12 |
<script src="components/footer.js"></script>
|
| 13 |
<script src="components/service-card.js"></script>
|
|
|
|
| 88 |
<img src="https://static.photos/people/640x360/1" alt="Electrician at work" class="rounded-lg shadow-xl">
|
| 89 |
</div>
|
| 90 |
<div class="md:w-1/2">
|
| 91 |
+
<h2 class="text-4xl font-bold mb-6 text-orange-500">About Wire&Light</h2>
|
| 92 |
<p class="mb-4 text-gray-300">With over 15 years of experience serving Athens and surrounding areas, I provide reliable and professional electrical services.</p>
|
| 93 |
<p class="mb-4 text-gray-300">Fully licensed and insured, I take pride in delivering high-quality workmanship with attention to detail and safety.</p>
|
| 94 |
<div class="mt-8 grid grid-cols-2 gap-4">
|