Spaces:
Running
Running
File size: 4,268 Bytes
8b885e3 |
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 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 |
class CustomHeader extends HTMLElement {
connectedCallback() {
this.attachShadow({ mode: 'open' });
this.shadowRoot.innerHTML = `
<style>
header {
background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
backdrop-filter: blur(10px);
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.nav-container {
max-width: 1200px;
margin: 0 auto;
padding: 1rem 2rem;
display: flex;
justify-content: space-between;
align-items: center;
}
.logo {
font-size: 1.5rem;
font-weight: bold;
background: linear-gradient(135deg, #667eea, #764ba2);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
text-decoration: none;
display: flex;
align-items: center;
gap: 0.5rem;
}
nav {
display: flex;
gap: 2rem;
align-items: center;
}
nav a {
color: #4a5568;
text-decoration: none;
font-weight: 500;
transition: color 0.3s;
}
nav a:hover {
color: #667eea;
}
.nav-actions {
display: flex;
gap: 1rem;
align-items: center;
}
.btn {
padding: 0.5rem 1rem;
border-radius: 0.5rem;
font-weight: 500;
transition: all 0.3s;
cursor: pointer;
border: none;
text-decoration: none;
display: inline-flex;
align-items: center;
gap: 0.5rem;
}
.btn-outline {
background: transparent;
color: #667eea;
border: 2px solid #667eea;
}
.btn-outline:hover {
background: #667eea;
color: white;
}
.btn-primary {
background: linear-gradient(135deg, #667eea, #764ba2);
color: white;
}
.btn-primary:hover {
transform: translateY(-2px);
box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}
@media (max-width: 768px) {
nav {
display: none;
}
.nav-container {
padding: 1rem;
}
}
</style>
<header>
<div class="nav-container">
<a href="/" class="logo">
<span>🎨</span>
<span>3D Magic Studio</span>
</a>
<nav>
<a href="#features">Features</a>
<a href="#gallery">Gallery</a>
<a href="#pricing">Pricing</a>
<a href="#docs">Docs</a>
</nav>
<div class="nav-actions">
<button class="btn btn-outline">
<i data-feather="log-in" class="w-4 h-4"></i>
Sign In
</button>
<button class="btn btn-primary">
<i data-feather="plus-circle" class="w-4 h-4"></i>
Get Started
</button>
</div>
</div>
</header>
`;
}
}
customElements.define('custom-header', CustomHeader); |