bitlo commited on
Commit
a52f258
·
verified ·
1 Parent(s): 8d54e17

некоторые элементы съезжают , + нужно улучшить дизайн , примерно до такого https://www.sortlist.com/agency/grey-alchemy

Browse files
Files changed (4) hide show
  1. components/navbar.js +54 -9
  2. index.html +79 -79
  3. script.js +58 -32
  4. style.css +78 -23
components/navbar.js CHANGED
@@ -1,34 +1,79 @@
 
1
  class CustomNavbar extends HTMLElement {
2
  connectedCallback() {
3
  this.attachShadow({ mode: 'open' });
4
  this.shadowRoot.innerHTML = `
5
  <style>
6
- .navbar {
 
 
 
 
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 {
14
  max-height: 0;
15
  overflow: hidden;
16
  transition: max-height 0.3s ease-out;
 
17
  }
 
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 flex items-center">
30
- <img src="/static/favicon.ico" alt="Logo" class="w-6 h-6 mr-2">
31
  Toptera
32
  </a>
33
- <div class="hidden md:flex space-x-8">
34
- <a href="#problem" class="text-zinc-700 hover:text-primary transition duration-300">
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
  class CustomNavbar extends HTMLElement {
3
  connectedCallback() {
4
  this.attachShadow({ mode: 'open' });
5
  this.shadowRoot.innerHTML = `
6
  <style>
7
+ :host {
8
+ display: block;
9
+ position: fixed;
10
+ width: 100%;
11
+ z-index: 50;
12
  transition: all 0.3s ease;
13
  }
14
+
15
+ .navbar {
16
+ @apply py-4 px-6;
17
+ background: rgba(255,255,255,0.95);
18
+ backdrop-filter: blur(8px);
19
+ box-shadow: 0 1px 3px rgba(0,0,0,0.05);
20
+ }
21
+
22
  .navbar.scrolled {
23
+ background: rgba(255,255,255,0.98);
24
+ box-shadow: 0 4px 12px rgba(0,0,0,0.08);
25
+ }
26
+
27
+ .nav-logo {
28
+ @apply text-2xl font-bold text-primary flex items-center;
29
  }
30
+
31
+ .nav-logo img {
32
+ @apply w-6 h-6 mr-2;
33
+ }
34
+
35
+ .nav-link {
36
+ @apply text-zinc-700 hover:text-primary transition-colors duration-300 font-medium;
37
+ }
38
+
39
  .mobile-menu {
40
  max-height: 0;
41
  overflow: hidden;
42
  transition: max-height 0.3s ease-out;
43
+ @apply bg-white w-full absolute left-0 mt-2 shadow-lg;
44
  }
45
+
46
  .mobile-menu.open {
47
  max-height: 500px;
48
  }
49
+
50
  @media (min-width: 768px) {
51
+ .navbar {
52
+ @apply py-5 px-6;
53
+ }
54
  .mobile-menu {
55
+ @apply static bg-transparent shadow-none max-h-full flex space-x-8;
56
  }
57
  }
58
  </style>
59
+
60
+ <nav class="navbar">
61
  <div class="container mx-auto flex justify-between items-center">
62
+ <a href="/" class="nav-logo">
63
+ <img src="/static/favicon.ico" alt="Logo">
64
  Toptera
65
  </a>
66
+ <div class="hidden md:flex space-x-8">
67
+ <a href="#problem" class="nav-link">
68
+ Проблемы
69
+ </a>
70
+ <a href="#process" class="nav-link">
71
+ Процесс
72
+ </a>
73
+ <a href="#cases" class="nav-link">
74
+ Кейсы
75
+ </a>
76
+ <a href="#audit" class="nav-link">
77
+ Аудит
78
+ </a>
79
+ </div>
index.html CHANGED
@@ -24,71 +24,71 @@
24
  </head>
25
  <body class="bg-white text-zinc-900 font-sans">
26
  <custom-navbar></custom-navbar>
27
-
28
  <!-- Hero Section -->
29
- <section class="relative py-20 md:py-32 bg-gradient-to-br from-zinc-50 to-zinc-100 overflow-hidden">
30
- <div class="container mx-auto px-6">
31
- <div class="flex flex-col md:flex-row items-center">
32
- <div class="md:w-1/2 mb-12 md:mb-0">
33
- <h1 class="text-4xl md:text-5xl lg:text-6xl font-bold leading-tight mb-6">
34
- <span class="text-primary">Контент-машины</span> для роста трафика
35
- </h1>
36
- <p class="text-xl md:text-2xl text-secondary mb-8">
37
- Растим сайты в нишах с потенциалом, продвигаем в Google, масштабируем результат
38
- </p>
39
- <div class="flex flex-col sm:flex-row gap-4">
40
- <a href="#audit" class="bg-primary hover:bg-red-600 text-white font-bold py-4 px-8 rounded-lg transition duration-300 text-center">
41
- Бесплатный аудит
42
- </a>
43
- <a href="#cases" class="border-2 border-primary text-primary hover:bg-red-50 font-bold py-4 px-8 rounded-lg transition duration-300 text-center">
44
- Наши кейсы
45
- </a>
46
- </div>
47
- </div>
48
- <div class="md:w-1/2">
49
- <img src="http://static.photos/technology/1200x630/42" alt="Content machine" class="rounded-xl shadow-2xl transform hover:scale-105 transition duration-500">
50
- </div>
51
  </div>
 
 
 
 
 
52
  </div>
 
53
  </section>
54
-
55
  <!-- Problem Section -->
56
- <section id="problem" class="py-20 bg-white">
57
- <div class="container mx-auto px-6">
58
- <div class="text-center mb-16">
59
- <h2 class="text-3xl md:text-4xl font-bold mb-4">Эти проблемы вам знакомы?</h2>
60
- <div class="w-24 h-1 bg-primary mx-auto"></div>
 
 
 
 
 
 
 
 
61
  </div>
62
-
63
- <div class="grid md:grid-cols-3 gap-8">
64
- <div class="bg-zinc-50 p-8 rounded-xl hover:shadow-lg transition duration-300">
65
- <div class="w-12 h-12 bg-red-100 rounded-full flex items-center justify-center mb-4">
66
- <i data-feather="trending-down" class="text-primary"></i>
67
- </div>
68
- <h3 class="text-xl font-bold mb-3">Трафик не растёт</h3>
69
- <p class="text-secondary">Несмотря на вложения в контент и SEO, посещаемость стоит на месте</p>
70
- </div>
71
-
72
- <div class="bg-zinc-50 p-8 rounded-xl hover:shadow-lg transition duration-300">
73
- <div class="w-12 h-12 bg-red-100 rounded-full flex items-center justify-center mb-4">
74
- <i data-feather="clock" class="text-primary"></i>
75
- </div>
76
- <h3 class="text-xl font-bold mb-3">Результаты долго ждать</h3>
77
- <p class="text-secondary">Месяцы ожидания первых результатов от SEO-специалистов</p>
78
- </div>
79
-
80
- <div class="bg-zinc-50 p-8 rounded-xl hover:shadow-lg transition duration-300">
81
- <div class="w-12 h-12 bg-red-100 rounded-full flex items-center justify-center mb-4">
82
- <i data-feather="dollar-sign" class="text-primary"></i>
83
- </div>
84
- <h3 class="text-xl font-bold mb-3">Неясная окупаемость</h3>
85
- <p class="text-secondary">Сложно предсказать, когда вложения начнут приносить прибыль</p>
86
- </div>
87
  </div>
 
 
 
88
  </div>
 
89
  </section>
90
-
91
- <!-- Process Section -->
92
  <section id="process" class="py-20 bg-zinc-50">
93
  <div class="container mx-auto px-6">
94
  <div class="text-center mb-16">
@@ -210,33 +210,33 @@
210
  </div>
211
  </div>
212
  </section>
213
-
214
  <!-- CTA Section -->
215
- <section id="audit" class="py-20 bg-gradient-to-br from-zinc-800 to-zinc-900 text-white">
216
- <div class="container mx-auto px-6">
217
- <div class="max-w-4xl mx-auto text-center">
218
- <h2 class="text-3xl md:text-4xl font-bold mb-6">Готовы превратить ваш сайт в контент-машину?</h2>
219
- <p class="text-xl text-zinc-300 mb-8">Получите бесплатный аудит вашего проекта с рекомендациями по росту трафика</p>
220
-
221
- <form class="max-w-md mx-auto">
222
- <div class="mb-4">
223
- <input type="text" placeholder="Ваше имя" class="w-full px-4 py-3 rounded-lg bg-zinc-700 border border-zinc-600 focus:outline-none focus:ring-2 focus:ring-primary">
224
- </div>
225
- <div class="mb-4">
226
- <input type="email" placeholder="Email" class="w-full px-4 py-3 rounded-lg bg-zinc-700 border border-zinc-600 focus:outline-none focus:ring-2 focus:ring-primary">
227
- </div>
228
- <div class="mb-4">
229
- <input type="url" placeholder="Ссылка на сайт" class="w-full px-4 py-3 rounded-lg bg-zinc-700 border border-zinc-600 focus:outline-none focus:ring-2 focus:ring-primary">
230
- </div>
231
- <button type="submit" class="w-full bg-primary hover:bg-red-600 text-white font-bold py-4 px-8 rounded-lg transition duration-300">
232
- Получить аудит
233
- </button>
234
- </form>
235
  </div>
 
 
 
 
 
 
 
 
 
 
236
  </div>
 
237
  </section>
238
-
239
- <custom-footer></custom-footer>
240
 
241
  <script src="components/navbar.js"></script>
242
  <script src="components/footer.js"></script>
 
24
  </head>
25
  <body class="bg-white text-zinc-900 font-sans">
26
  <custom-navbar></custom-navbar>
 
27
  <!-- Hero Section -->
28
+ <section class="hero relative overflow-hidden">
29
+ <div class="container">
30
+ <div class="flex flex-col md:flex-row items-center gap-12">
31
+ <div class="md:w-1/2">
32
+ <h1 class="mb-6">
33
+ <span class="text-primary">Контент-машины</span> для роста трафика
34
+ </h1>
35
+ <p class="text-xl text-secondary mb-8 max-w-lg">
36
+ Растим сайты в нишах с потенциалом, продвигаем в Google, масштабируем результат
37
+ </p>
38
+ <div class="flex flex-col sm:flex-row gap-4">
39
+ <a href="#audit" class="btn btn-primary">
40
+ Бесплатный аудит
41
+ </a>
42
+ <a href="#cases" class="btn btn-outline">
43
+ Наши кейсы
44
+ </a>
 
 
 
 
 
45
  </div>
46
+ </div>
47
+ <div class="md:w-1/2">
48
+ <img src="http://static.photos/technology/1200x630/42" alt="Content machine"
49
+ class="rounded-2xl shadow-xl hover:shadow-2xl transition-all duration-500">
50
+ </div>
51
  </div>
52
+ </div>
53
  </section>
 
54
  <!-- Problem Section -->
55
+ <section id="problem" class="bg-white">
56
+ <div class="container">
57
+ <div class="text-center mb-16">
58
+ <h2 class="mb-4">Эти проблемы вам знакомы?</h2>
59
+ <p class="text-xl text-secondary max-w-2xl mx-auto">
60
+ Мы помогаем бизнесам преодолеть типичные сложности в привлечении трафика
61
+ </p>
62
+ </div>
63
+
64
+ <div class="grid md:grid-cols-3 gap-6">
65
+ <div class="card animate-on-scroll">
66
+ <div class="w-14 h-14 bg-primary-light rounded-full flex items-center justify-center mb-4">
67
+ <i data-feather="trending-down" class="text-primary w-6 h-6"></i>
68
  </div>
69
+ <h3 class="mb-3">Трафик не растёт</h3>
70
+ <p class="text-secondary">Несмотря на вложения в контент и SEO, посещаемость стоит на месте</p>
71
+ </div>
72
+
73
+ <div class="card animate-on-scroll">
74
+ <div class="w-14 h-14 bg-primary-light rounded-full flex items-center justify-center mb-4">
75
+ <i data-feather="clock" class="text-primary w-6 h-6"></i>
76
+ </div>
77
+ <h3 class="mb-3">Результаты долго ждать</h3>
78
+ <p class="text-secondary">Месяцы ожидания первых результатов от SEO-специалистов</p>
79
+ </div>
80
+
81
+ <div class="card animate-on-scroll">
82
+ <div class="w-14 h-14 bg-primary-light rounded-full flex items-center justify-center mb-4">
83
+ <i data-feather="dollar-sign" class="text-primary w-6 h-6"></i>
 
 
 
 
 
 
 
 
 
 
84
  </div>
85
+ <h3 class="mb-3">Неясная окупаемость</h3>
86
+ <p class="text-secondary">Сложно предсказать, когда вложения начнут приносить прибыль</p>
87
+ </div>
88
  </div>
89
+ </div>
90
  </section>
91
+ <!-- Process Section -->
 
92
  <section id="process" class="py-20 bg-zinc-50">
93
  <div class="container mx-auto px-6">
94
  <div class="text-center mb-16">
 
210
  </div>
211
  </div>
212
  </section>
 
213
  <!-- CTA Section -->
214
+ <section id="audit" class="bg-gradient-to-r from-zinc-900 to-zinc-800 text-white">
215
+ <div class="container">
216
+ <div class="max-w-3xl mx-auto text-center">
217
+ <h2 class="mb-6">Готовы превратить ваш сайт в контент-машину?</h2>
218
+ <p class="text-xl text-zinc-300 mb-8">
219
+ Получите бесплатный аудит вашего проекта с рекомендациями по росту трафика
220
+ </p>
221
+
222
+ <form class="max-w-md mx-auto">
223
+ <div class="mb-4">
224
+ <input type="text" placeholder="Ваше имя" class="input bg-zinc-800 border-zinc-700">
 
 
 
 
 
 
 
 
 
225
  </div>
226
+ <div class="mb-4">
227
+ <input type="email" placeholder="Email" class="input bg-zinc-800 border-zinc-700">
228
+ </div>
229
+ <div class="mb-4">
230
+ <input type="url" placeholder="Ссылка на сайт" class="input bg-zinc-800 border-zinc-700">
231
+ </div>
232
+ <button type="submit" class="btn btn-primary w-full">
233
+ Получить аудит
234
+ </button>
235
+ </form>
236
  </div>
237
+ </div>
238
  </section>
239
+ <custom-footer></custom-footer>
 
240
 
241
  <script src="components/navbar.js"></script>
242
  <script src="components/footer.js"></script>
script.js CHANGED
@@ -1,34 +1,60 @@
 
1
  document.addEventListener('DOMContentLoaded', function() {
2
- // Animate elements on scroll
3
- const animateOnScroll = function() {
4
- const elements = document.querySelectorAll('.animate-on-scroll');
5
-
6
- elements.forEach(element => {
7
- const elementPosition = element.getBoundingClientRect().top;
8
- const screenPosition = window.innerHeight / 1.3;
9
-
10
- if (elementPosition < screenPosition) {
11
- element.classList.add('animate-fade-in');
12
- }
13
- });
14
- };
15
-
16
- // Run once on load
17
- animateOnScroll();
18
-
19
- // Run on scroll
20
- window.addEventListener('scroll', animateOnScroll);
21
-
22
- // Mobile menu toggle (handled in navbar component)
23
-
24
- // Form submission
25
- const form = document.querySelector('form');
26
- if (form) {
27
- form.addEventListener('submit', function(e) {
28
- e.preventDefault();
29
- // Here you would typically send the form data to your server
30
- alert('Спасибо! Мы свяжемся с вами в ближайшее время.');
31
- form.reset();
32
- });
33
  }
34
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
  document.addEventListener('DOMContentLoaded', function() {
3
+ // Navbar scroll effect
4
+ const navbar = document.querySelector('custom-navbar').shadowRoot.querySelector('.navbar');
5
+ window.addEventListener('scroll', () => {
6
+ if (window.scrollY > 50) {
7
+ navbar.classList.add('scrolled');
8
+ } else {
9
+ navbar.classList.remove('scrolled');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
  }
11
+ });
12
+
13
+ // Animate elements on scroll
14
+ const animateOnScroll = () => {
15
+ const elements = document.querySelectorAll('.animate-on-scroll');
16
+
17
+ elements.forEach(element => {
18
+ const elementPosition = element.getBoundingClientRect().top;
19
+ const screenPosition = window.innerHeight / 1.3;
20
+
21
+ if (elementPosition < screenPosition) {
22
+ element.classList.add('animate-fade-in');
23
+ }
24
+ });
25
+ };
26
+
27
+ // Initialize animations
28
+ animateOnScroll();
29
+ window.addEventListener('scroll', animateOnScroll);
30
+
31
+ // Mobile menu toggle
32
+ const menuToggle = document.querySelector('custom-navbar').shadowRoot.querySelector('.menu-toggle');
33
+ if (menuToggle) {
34
+ menuToggle.addEventListener('click', () => {
35
+ const mobileMenu = document.querySelector('custom-navbar').shadowRoot.querySelector('.mobile-menu');
36
+ mobileMenu.classList.toggle('open');
37
+ });
38
+ }
39
+
40
+ // Form handling
41
+ const forms = document.querySelectorAll('form');
42
+ forms.forEach(form => {
43
+ form.addEventListener('submit', function(e) {
44
+ e.preventDefault();
45
+ // Form submission logic
46
+ this.querySelector('button[type="submit"]').innerHTML = 'Отправка...';
47
+
48
+ setTimeout(() => {
49
+ alert('Спасибо! Мы свяжемся с вами в ближайшее время.');
50
+ form.reset();
51
+ this.querySelector('button[type="submit"]').innerHTML = 'Получить аудит';
52
+ }, 1000);
53
+ });
54
+ });
55
+
56
+ // Feather icons
57
+ if (window.feather) {
58
+ feather.replace();
59
+ }
60
+ });
style.css CHANGED
@@ -1,39 +1,94 @@
1
- /* Custom animations */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  @keyframes fadeIn {
3
- from { opacity: 0; transform: translateY(20px); }
4
- to { opacity: 1; transform: translateY(0); }
5
  }
6
 
7
  .animate-fade-in {
8
- animation: fadeIn 0.8s ease-out forwards;
9
  }
10
 
11
- /* Custom scroll behavior */
12
- html {
13
- scroll-behavior: smooth;
 
 
14
  }
15
 
16
- /* Custom hover effects */
17
- .hover-scale {
18
- transition: transform 0.3s ease;
19
  }
20
 
21
- .hover-scale:hover {
22
- transform: scale(1.03);
 
23
  }
24
 
25
- /* Section spacing */
26
- section {
27
- scroll-margin-top: 100px;
28
  }
29
 
30
- /* Form input styling */
31
- input::placeholder {
32
- color: #a1a1aa;
33
- opacity: 1;
34
  }
35
 
36
- /* Custom shadow for cards */
37
- .custom-shadow {
38
- box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
39
- }
 
 
 
 
 
 
 
 
 
 
1
+
2
+ :root {
3
+ --primary: #ef4444;
4
+ --primary-light: #fee2e2;
5
+ --primary-dark: #dc2626;
6
+ --secondary: #71717a;
7
+ --dark: #18181b;
8
+ --light: #fafafa;
9
+ --border: #e5e7eb;
10
+ --radius: 12px;
11
+ --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
12
+ --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
13
+ }
14
+
15
+ /* Base styles */
16
+ html {
17
+ scroll-behavior: smooth;
18
+ scroll-padding-top: 100px;
19
+ }
20
+
21
+ body {
22
+ @apply bg-light text-dark;
23
+ font-family: 'Inter', system-ui, -apple-system, sans-serif;
24
+ line-height: 1.6;
25
+ }
26
+
27
+ /* Typography */
28
+ h1, h2, h3, h4 {
29
+ @apply font-bold leading-tight;
30
+ letter-spacing: -0.025em;
31
+ }
32
+
33
+ h1 { @apply text-4xl md:text-5xl lg:text-6xl; }
34
+ h2 { @apply text-3xl md:text-4xl; }
35
+ h3 { @apply text-xl md:text-2xl; }
36
+
37
+ /* Layout */
38
+ .container {
39
+ @apply mx-auto px-6 max-w-7xl;
40
+ }
41
+
42
+ section {
43
+ @apply py-20 md:py-24;
44
+ scroll-margin-top: 100px;
45
+ }
46
+
47
+ /* Animations */
48
  @keyframes fadeIn {
49
+ from { opacity: 0; transform: translateY(20px); }
50
+ to { opacity: 1; transform: translateY(0); }
51
  }
52
 
53
  .animate-fade-in {
54
+ animation: fadeIn 0.8s ease-out forwards;
55
  }
56
 
57
+ /* Cards */
58
+ .card {
59
+ @apply bg-white rounded-xl p-8 transition-all duration-300;
60
+ border: 1px solid var(--border);
61
+ box-shadow: var(--shadow);
62
  }
63
 
64
+ .card:hover {
65
+ transform: translateY(-4px);
66
+ box-shadow: var(--shadow-lg);
67
  }
68
 
69
+ /* Buttons */
70
+ .btn {
71
+ @apply inline-flex items-center justify-center rounded-lg px-6 py-3 font-medium transition-all duration-300;
72
  }
73
 
74
+ .btn-primary {
75
+ @apply bg-primary text-white hover:bg-primary-dark;
 
76
  }
77
 
78
+ .btn-outline {
79
+ @apply border-2 border-primary text-primary hover:bg-primary-light;
 
 
80
  }
81
 
82
+ /* Form elements */
83
+ .input {
84
+ @apply w-full px-4 py-3 rounded-lg border border-gray-300 focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent;
85
+ }
86
+
87
+ .input::placeholder {
88
+ @apply text-gray-400;
89
+ }
90
+
91
+ /* Hero section */
92
+ .hero {
93
+ background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
94
+ }