itamarlifshitz's picture
ืฉื™ืฉ ืื•ืคืฆื™ื” ืฉืœ ืžื‘ื—ืŸ / ืขื‘ื•ื“ื” ื—ื“ืฉื” ื•ืื– ืจืง ืืคืฉืจ ืœื”ืขืœื•ืช ืงื‘ืฆื™ื ื•ื–ื” ืžืกื“ืจ ืœืš ืืช ื–ื” ืœืคื™ ืื™ืš ืฉืงืจืืช ืœืขื‘ื•ื“ื” ืื—ืจื™ ืฉื”ืขืœืช ืืช ื”ืงื‘ืฆื™ื ืืชื” ื‘ื•ื—ืจ ืžื” ื‘ื ืœืš ืฉื”ื•ื ื™ืขืฉื” (ื›ืจื˜ื™ืกื™ื•ืช ืขื ืฉืืœื•ืช/ืžื‘ื—ื ื™ื/ืกื™ื›ื•ืžื™ื ื•ืขื•ื“) ื ื•ืกืฃ ืขืœ ื›ืš ืชืขืฉื” ืฉืœืื ื™ ืฉืืคืฉืจ ืœืขืฉื•ืช ืžืฉื”ื• ืฆืจื™ืš ืœื”ื™ืจืฉื ื•ืœืจืฉื•ื ืืช ื”ืžื™ื™ืœ ื•ื›ืœ ืคืขื ืฉืžื™ืฉื”ื• ื ืจืฉื ื”ื•ื ืžืงื‘ืœ ืœืžื™ื™ืœ ื”ื•ื“ืขื” ( ื‘ืจื•ืš ื”ื‘ื ืœstudy mate ื‘ื ื•ืกืฃ ืชื•ืจื™ื“ ืืช ื”ืชืžื•ื ื” ืฉืฉืžืช ื•ืชืขืฆื‘ ืืช ื”ืืชืจ ืฉื™ื”ื™ื” ืžืžืฉ ืžื•ืฉืงืข ืื‘ืœ ืฆื‘ืขื™ื ืจื’ื•ืขื™ื
6110ac3 verified
raw
history blame
2 kB
class CustomNavbar extends HTMLElement {
connectedCallback() {
this.attachShadow({ mode: 'open' });
this.shadowRoot.innerHTML = `
<style>
nav {
background: linear-gradient(90deg, #4f46e5, #7c3aed);
color: white;
padding: 1rem 2rem;
display: flex;
justify-content: space-between;
align-items: center;
box-shadow: 0 4px 6px rgba(0,0,0,0.1);
position: sticky;
top: 0;
z-index: 1000;
}
.logo {
display: flex;
align-items: center;
font-weight: bold;
font-size: 1.5rem;
gap: 10px;
}
.logo img {
height: 40px;
}
.nav-links {
display: flex;
gap: 20px;
}
.nav-links a {
color: white;
text-decoration: none;
padding: 0.5rem 1rem;
border-radius: 8px;
transition: background 0.3s;
}
.nav-links a:hover {
background: rgba(255,255,255,0.2);
}
.nav-links a.active {
background: rgba(255,255,255,0.3);
}
@media (max-width: 768px) {
nav {
flex-direction: column;
padding: 1rem;
}
.nav-links {
margin-top: 1rem;
width: 100%;
justify-content: space-around;
}
}
</style>
<nav>
<div class="logo">
<i class="fas fa-graduation-cap" style="font-size: 2rem;"></i>
<span>StudyMate</span>
</div>
<div class="nav-links">
<a href="/" class="active">ื‘ื™ืช</a>
<a href="/materials.html">ื—ื•ืžืจื™ื</a>
<a href="/grades.html">ืฆื™ื•ื ื™ื</a>
<a href="/profile.html">ืคืจื•ืคื™ืœ</a>
</div>
</nav>
`;
}
}
customElements.define('custom-navbar', CustomNavbar);