Spaces:
Running
Running
Promote version dc460e3 to main
Browse filesPromoted commit dc460e3215bcaed51a5ed83247aa2b8e5ea4296b to main branch
- components/navbar.js +4 -86
- index.html +0 -5
- style.css +0 -7
components/navbar.js
CHANGED
|
@@ -1,10 +1,3 @@
|
|
| 1 |
-
|
| 2 |
-
}
|
| 3 |
-
}
|
| 4 |
-
|
| 5 |
-
customElements.define('custom-navbar', CustomNavbar);
|
| 6 |
-
|
| 7 |
-
|
| 8 |
class CustomNavbar extends HTMLElement {
|
| 9 |
connectedCallback() {
|
| 10 |
this.attachShadow({ mode: 'open' });
|
|
@@ -14,7 +7,7 @@ class CustomNavbar extends HTMLElement {
|
|
| 14 |
transition: all 0.3s ease;
|
| 15 |
}
|
| 16 |
.navbar.scrolled {
|
| 17 |
-
background-color: white
|
| 18 |
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
|
| 19 |
}
|
| 20 |
.mobile-menu {
|
|
@@ -25,90 +18,15 @@ class CustomNavbar extends HTMLElement {
|
|
| 25 |
.mobile-menu.open {
|
| 26 |
max-height: 500px;
|
| 27 |
}
|
| 28 |
-
.menu-button {
|
| 29 |
-
display: flex;
|
| 30 |
-
align-items: center;
|
| 31 |
-
justify-content: center;
|
| 32 |
-
width: 40px;
|
| 33 |
-
height: 40px;
|
| 34 |
-
background: transparent;
|
| 35 |
-
border: none;
|
| 36 |
-
cursor: pointer;
|
| 37 |
-
}
|
| 38 |
-
.menu-icon {
|
| 39 |
-
width: 24px;
|
| 40 |
-
height: 24px;
|
| 41 |
-
stroke: #ef4444;
|
| 42 |
-
}
|
| 43 |
-
.desktop-menu {
|
| 44 |
-
display: none;
|
| 45 |
-
}
|
| 46 |
@media (min-width: 768px) {
|
| 47 |
-
.menu-button {
|
| 48 |
-
display: none;
|
| 49 |
-
}
|
| 50 |
.mobile-menu {
|
| 51 |
max-height: none !important;
|
| 52 |
-
display: flex !important;
|
| 53 |
-
}
|
| 54 |
-
.desktop-menu {
|
| 55 |
-
display: flex;
|
| 56 |
-
gap: 1.5rem;
|
| 57 |
}
|
| 58 |
}
|
| 59 |
</style>
|
| 60 |
<nav class="navbar fixed w-full z-50 py-4 px-6 bg-white md:bg-transparent">
|
| 61 |
<div class="container mx-auto flex justify-between items-center">
|
| 62 |
-
<a href="/" class="
|
| 63 |
-
<img src="/static/logo.svg" alt="Toptera Logo" class="h-8 mr-2">
|
| 64 |
-
<span class="text-2xl font-bold text-primary">Toptera</span>
|
| 65 |
-
</a>
|
| 66 |
-
|
| 67 |
-
<div class="desktop-menu">
|
| 68 |
-
<a href="seo-spetsialist-seo-optimizator.html" class="text-zinc-700 hover:text-primary transition duration-300">
|
| 69 |
-
Вакансии
|
| 70 |
-
</a>
|
| 71 |
-
</div>
|
| 72 |
-
|
| 73 |
-
<button class="menu-button md:hidden" id="menu-toggle">
|
| 74 |
-
<i data-feather="menu" class="menu-icon"></i>
|
| 75 |
-
</button>
|
| 76 |
|
| 77 |
-
<div class="
|
| 78 |
-
<a href="
|
| 79 |
-
<a href="/#problem" class="text-zinc-700 hover:text-primary transition duration-300 py-2 md:py-0">Проблемы</a>
|
| 80 |
-
<a href="/#process" class="text-zinc-700 hover:text-primary transition duration-300 py-2 md:py-0">Процесс</a>
|
| 81 |
-
<a href="/#cases" class="text-zinc-700 hover:text-primary transition duration-300 py-2 md:py-0">Кейсы</a>
|
| 82 |
-
<a href="/#audit" class="text-zinc-700 hover:text-primary transition duration-300 py-2 md:py-0">Аудит</a>
|
| 83 |
-
<a href="seo-spetsialist-seo-optimizator.html" class="text-zinc-700 hover:text-primary transition duration-300 py-2 md:py-0">
|
| 84 |
-
Вакансии
|
| 85 |
-
</a>
|
| 86 |
-
</div>
|
| 87 |
-
</div>
|
| 88 |
-
</nav>
|
| 89 |
-
`;
|
| 90 |
-
|
| 91 |
-
// Menu toggle functionality
|
| 92 |
-
const menuToggle = this.shadowRoot.getElementById('menu-toggle');
|
| 93 |
-
const mobileMenu = this.shadowRoot.querySelector('.mobile-menu');
|
| 94 |
-
|
| 95 |
-
menuToggle.addEventListener('click', () => {
|
| 96 |
-
mobileMenu.classList.toggle('open');
|
| 97 |
-
const icon = menuToggle.querySelector('i');
|
| 98 |
-
if (mobileMenu.classList.contains('open')) {
|
| 99 |
-
icon.setAttribute('data-feather', 'x');
|
| 100 |
-
} else {
|
| 101 |
-
icon.setAttribute('data-feather', 'menu');
|
| 102 |
-
}
|
| 103 |
-
feather.replace();
|
| 104 |
-
});
|
| 105 |
-
|
| 106 |
-
// Scroll effect
|
| 107 |
-
window.addEventListener('scroll', () => {
|
| 108 |
-
const navbar = this.shadowRoot.querySelector('.navbar');
|
| 109 |
-
if (window.scrollY > 50) {
|
| 110 |
-
navbar.classList.add('scrolled');
|
| 111 |
-
} else {
|
| 112 |
-
navbar.classList.remove('scrolled');
|
| 113 |
-
}
|
| 114 |
-
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
class CustomNavbar extends HTMLElement {
|
| 2 |
connectedCallback() {
|
| 3 |
this.attachShadow({ mode: 'open' });
|
|
|
|
| 7 |
transition: all 0.3s ease;
|
| 8 |
}
|
| 9 |
.navbar.scrolled {
|
| 10 |
+
background-color: white;
|
| 11 |
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
|
| 12 |
}
|
| 13 |
.mobile-menu {
|
|
|
|
| 18 |
.mobile-menu.open {
|
| 19 |
max-height: 500px;
|
| 20 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
@media (min-width: 768px) {
|
|
|
|
|
|
|
|
|
|
| 22 |
.mobile-menu {
|
| 23 |
max-height: none !important;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 24 |
}
|
| 25 |
}
|
| 26 |
</style>
|
| 27 |
<nav class="navbar fixed w-full z-50 py-4 px-6 bg-white md:bg-transparent">
|
| 28 |
<div class="container mx-auto flex justify-between items-center">
|
| 29 |
+
<a href="/" class="text-2xl font-bold text-primary">Toptera</a>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
|
| 31 |
+
<div class="hidden md:flex space-x-8">
|
| 32 |
+
<a href="#problem" class="text-zinc-700 hover:text-primary transition duration-300">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
index.html
CHANGED
|
@@ -4,11 +4,6 @@
|
|
| 4 |
<meta charset="UTF-8">
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
<title>Toptera - Контент-машины для роста трафика</title>
|
| 7 |
-
<link rel="icon" type="image/png" href="/static/favicon-96x96.png" sizes="96x96" />
|
| 8 |
-
<link rel="icon" type="image/svg+xml" href="/static/favicon.svg" />
|
| 9 |
-
<link rel="shortcut icon" href="/static/favicon.ico" />
|
| 10 |
-
<link rel="apple-touch-icon" sizes="180x180" href="/static/apple-touch-icon.png" />
|
| 11 |
-
<link rel="manifest" href="/static/site.webmanifest" />
|
| 12 |
<link rel="stylesheet" href="style.css">
|
| 13 |
<script src="https://cdn.tailwindcss.com"></script>
|
| 14 |
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
|
|
|
|
| 4 |
<meta charset="UTF-8">
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
<title>Toptera - Контент-машины для роста трафика</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>
|
style.css
CHANGED
|
@@ -1,10 +1,3 @@
|
|
| 1 |
-
|
| 2 |
-
/* Navbar styles */
|
| 3 |
-
.navbar.scrolled {
|
| 4 |
-
background-color: white !important;
|
| 5 |
-
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
|
| 6 |
-
}
|
| 7 |
-
|
| 8 |
/* Custom animations */
|
| 9 |
@keyframes fadeIn {
|
| 10 |
from { opacity: 0; transform: translateY(20px); }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
/* Custom animations */
|
| 2 |
@keyframes fadeIn {
|
| 3 |
from { opacity: 0; transform: translateY(20px); }
|