-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcopy.html
More file actions
748 lines (680 loc) · 32.2 KB
/
copy.html
File metadata and controls
748 lines (680 loc) · 32.2 KB
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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Дияр - Python Developer</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/18.2.0/umd/react.production.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react-dom/18.2.0/umd/react-dom.production.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/babel-standalone/7.23.5/babel.min.js"></script>
<script src="https://cdn.tailwindcss.com"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
<!-- Базовые анимации -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/aos/2.3.4/aos.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/aos/2.3.4/aos.css" />
<style>
/* Базовые анимации */
.fade-in {
animation: fadeIn 0.5s ease-in;
}
@keyframes fadeIn {
from { opacity: 0; transform: translateY(20px); }
to { opacity: 1; transform: translateY(0); }
}
/* Стили для загрузки изображений */
.blur-load {
background-size: cover;
background-position: center;
}
.blur-load.loaded > img {
opacity: 1;
}
.blur-load > img {
opacity: 0;
transition: opacity 200ms ease-in-out;
}
/* Улучшенные стили для карточек */
.project-card:hover {
transform: translateY(-5px);
}
/* Стилизация скроллбара */
::-webkit-scrollbar {
width: 8px;
height: 8px;
}
::-webkit-scrollbar-track {
background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
background: #888;
border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
background: #666;
}
</style>
<style>
/* Базовые анимации */
.fade-in {
animation: fadeIn 0.5s ease-in;
}
@keyframes fadeIn {
from { opacity: 0; transform: translateY(20px); }
to { opacity: 1; transform: translateY(0); }
}
/* Стили для загрузки изображений */
.blur-load {
background-size: cover;
background-position: center;
}
.blur-load.loaded > img {
opacity: 1;
}
.blur-load > img {
opacity: 0;
transition: opacity 200ms ease-in-out;
}
/* Темная тема */
.dark body {
background-color: #0f172a;
color: #f8fafc;
}
.dark .bg-white {
background-color: #1e293b;
}
.dark .text-gray-600 {
color: #cbd5e1;
}
.dark .bg-gray-50 {
background-color: #1e293b;
}
.dark .bg-blue-50 {
background-color: rgba(59, 130, 246, 0.1);
}
.dark .border-gray-200 {
border-color: #334155;
}
.dark .shadow-lg {
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
}
.dark .from-blue-50 {
--tw-gradient-from: #1e293b;
}
.dark .to-indigo-50 {
--tw-gradient-to: #1e293b;
}
.dark .bg-gradient-to-br {
background-image: linear-gradient(to bottom right, var(--tw-gradient-from), #2d3748);
}
/* Красивые эффекты для темной темы */
.dark .project-card::before {
content: '';
position: absolute;
inset: -1px;
background: linear-gradient(to right, #3b82f6, #8b5cf6);
border-radius: 0.75rem;
z-index: -1;
opacity: 0;
transition: opacity 0.3s ease;
}
.dark .project-card:hover::before {
opacity: 1;
}
/* Улучшенные стили для карточек в темной теме */
.dark .bg-gray-50 {
background-color: rgba(30, 41, 59, 0.8);
backdrop-filter: blur(8px);
}
/* Стили для переключателя темы */
.theme-switch {
position: fixed;
bottom: 20px;
right: 20px;
z-index: 100;
background: rgba(79, 70, 229, 0.9);
backdrop-filter: blur(4px);
color: white;
border: none;
width: 48px;
height: 48px;
border-radius: 50%;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0 4px 12px rgba(0,0,0,0.3);
transition: all 0.3s ease;
}
.theme-switch:hover {
transform: scale(1.1);
background: rgba(79, 70, 229, 1);
}
.theme-switch .icon {
transition: transform 0.5s ease;
}
.theme-switch:hover .icon {
transform: rotate(360deg);
}
/* Улучшенные эффекты hover для кнопок в темной теме */
.dark .hover\:bg-blue-700:hover {
background-color: #1d4ed8;
transform: translateY(-1px);
}
.dark .hover\:bg-gray-900:hover {
background-color: #111827;
transform: translateY(-1px);
}
/* Улучшенные стили для модальных окон в темной теме */
.dark .bg-white.rounded-xl {
background-color: #1e293b;
border: 1px solid #334155;
}
.dark .modal-header {
border-bottom-color: #334155;
}
/* Неоновые акценты для темной темы */
.dark .text-blue-600 {
color: #60a5fa;
text-shadow: 0 0 8px rgba(96, 165, 250, 0.3);
}
/* Стилизация скроллбара для темной темы */
.dark ::-webkit-scrollbar {
width: 8px;
height: 8px;
}
.dark ::-webkit-scrollbar-track {
background: #1e293b;
}
.dark ::-webkit-scrollbar-thumb {
background: #4b5563;
border-radius: 4px;
}
.dark ::-webkit-scrollbar-thumb:hover {
background: #6b7280;
}
</style>
</head>
<body>
<div id="root"></div>
<script type="text/babel">
const { useState, useEffect } = React;
// ============= КОНФИГУРАЦИЯ ПРОЕКТОВ =============
// Просто добавляйте или изменяйте проекты здесь:
const projectsData = [
{
id: 1, // Увеличивайте для каждого нового проекта
title: "Telegram-бот с интеграцией Stable Diffusion(inpaint, локальная)",
shortDescription: "Telegram бот с локальной моделью Stable Diffusion",
fullDescription: `
Полнофункциональный Telegram бот для генерации и редактирования изображений
с использованием локально развернутой модели Stable Diffusion.
Включает систему подписок, панель администрирования и продвинутые функции редактирования.
`,
tech: ["Python", "Aiogram 3.x", "PyTorch", "Docker"],
features: [
"Inpainting для редактирования частей изображения",
"Система подписок и оплаты",
"Панель управления на Django",
"Очереди задач через Redis",
"Оптимизация производительности GPU"
],
// Добавьте links.telegram и/или links.github если они есть
links: {
},
images: {
// Основное изображение для карточки
preview: "screenshots/sd.jpg",
// Галерея скриншотов (добавьте столько, сколько нужно)
gallery: [
{
path: "screenshots/telegram_bot_stablediffusion_language.png",
caption: "Интерфейс бота"
},
{
path: "screenshots/telegram_bot_stablediffusion_menu.png",
caption: "Интерфейс бота"
},
{
path: "screenshots/telegram_bot_stablediffusion_payments.png",
caption: "Интерфейс бота"
},
{
path: "screenshots/telegram_bot_stablediffusion_mainpanel.png",
caption: "Панель администратора"
},
{
path: "screenshots/telegram_bot_stablediffusion_languagepanel.png",
caption: "Панель администратора"
},
{
path: "screenshots/telegram_bot_stablediffusion_editlangpanel.png",
caption: "Панель администратора"
},
{
path: "screenshots/telegram_bot_stablediffusion_linkpanel.png",
caption: "Панель администратора"
},
{
path: "screenshots/telegram_bot_stablediffusion_botpanel.png",
caption: "Панель администратора"
},
]
},
// Статистика опциональна - добавляйте если есть что показать
stats: [
]
},
{
id: 2,
title: "AutoService Bot",
shortDescription: "Умный бот для записи в автосервис",
fullDescription: `
Автоматизированная система записи клиентов автосервиса с интеграцией
Google Sheets и системой уведомлений. Включает управление расписанием,
историю обслуживания и аналитику.
`,
tech: ["Python", "Aiogram 3.x", "Google Sheets API", "SQLite"],
features: [
"Онлайн запись на сервис",
"Интеграция с Google Sheets",
"Система напоминаний",
"История обслуживания",
"Оценка качества услуг",
"Статистика загруженности"
],
// У этого проекта только Telegram Demo, без GitHub
links: {
telegram: "https://t.me/another_bot"
},
images: {
preview: "images/autoservice/preview.jpg",
gallery: [
{
path: "images/autoservice/booking.jpg",
caption: "Система записи"
},
{
path: "images/autoservice/schedule.jpg",
caption: "Управление расписанием"
}
]
},
stats: [
{ label: "Записей в месяц", value: "300+" },
{ label: "Экономия времени", value: "70%" },
{ label: "Довольных клиентов", value: "98%" }
]
}
];
// Преобразование проектов в рабочий формат
const projects = projectsData.map(project => ({
...project,
previewImage: project.images.preview,
gallery: project.images.gallery.map(item => ({
image: item.path,
caption: item.caption
}))
}));
function Navbar() {
const [isScrolled, setIsScrolled] = useState(false);
useEffect(() => {
const handleScroll = () => {
setIsScrolled(window.scrollY > 0);
};
window.addEventListener('scroll', handleScroll);
return () => window.removeEventListener('scroll', handleScroll);
}, []);
return (
<nav className={`fixed top-0 w-full z-50 transition-all duration-300 ${
isScrolled ? 'bg-white shadow-md' : 'bg-transparent'
}`}>
<div className="container mx-auto px-4 py-4">
<div className="flex justify-between items-center">
<h1 className="text-2xl font-bold">Дияр</h1>
<div className="space-x-6">
<a href="#projects" className="hover:text-blue-600 transition-colors">Проекты</a>
<a href="#skills" className="hover:text-blue-600 transition-colors">Навыки</a>
<a href="#contact" className="hover:text-blue-600 transition-colors">Контакты</a>
</div>
</div>
</div>
</nav>
);
}
function Hero() {
return (
<section className="min-h-screen flex items-center pt-16 bg-gradient-to-br from-blue-50 to-indigo-50">
<div className="container mx-auto px-4">
<div className="max-w-3xl fade-in">
<h1 className="text-5xl font-bold mb-6">
Python Developer
</h1>
<p className="text-xl text-gray-600 mb-8">
Занимаюсь разработкой более двух лет.
Специализируюсь на создании Telegram ботов и веб-приложений
с использованием современных технологий.
</p>
<div className="flex gap-4">
<a href="#contact"
className="bg-blue-600 text-white px-6 py-3 rounded-lg hover:bg-blue-700 transition-colors">
Связаться
</a>
<a href="#projects"
className="border border-blue-600 text-blue-600 px-6 py-3 rounded-lg hover:bg-blue-50 transition-colors">
Смотреть проекты
</a>
</div>
</div>
</div>
</section>
);
}
function ImageGallery({ images }) {
const [currentIndex, setCurrentIndex] = useState(0);
const nextImage = () => {
setCurrentIndex((prevIndex) =>
prevIndex + 1 >= images.length ? 0 : prevIndex + 1
);
};
const prevImage = () => {
setCurrentIndex((prevIndex) =>
prevIndex - 1 < 0 ? images.length - 1 : prevIndex - 1
);
};
return (
<div className="relative">
<div className="relative h-96 overflow-hidden rounded-xl">
<img
src={images[currentIndex].image}
alt={images[currentIndex].caption}
className="w-full h-full object-cover"
/>
<div className="absolute bottom-0 left-0 right-0 bg-black bg-opacity-50 text-white p-4">
{images[currentIndex].caption}
</div>
</div>
<button
onClick={prevImage}
className="absolute left-4 top-1/2 -translate-y-1/2 bg-black bg-opacity-50 text-white w-10 h-10 rounded-full flex items-center justify-center hover:bg-opacity-75"
>
<i className="fas fa-chevron-left"></i>
</button>
<button
onClick={nextImage}
className="absolute right-4 top-1/2 -translate-y-1/2 bg-black bg-opacity-50 text-white w-10 h-10 rounded-full flex items-center justify-center hover:bg-opacity-75"
>
<i className="fas fa-chevron-right"></i>
</button>
<div className="absolute bottom-4 left-0 right-0 flex justify-center gap-2">
{images.map((_, index) => (
<button
key={index}
onClick={() => setCurrentIndex(index)}
className={`w-2 h-2 rounded-full ${
index === currentIndex ? 'bg-white' : 'bg-white/50'
}`}
/>
))}
</div>
</div>
);
}
function ProjectModal({ project, onClose }) {
const [activeTab, setActiveTab] = useState('overview');
if (!project) return null;
return (
<div className="fixed inset-0 bg-black bg-opacity-50 z-50 flex items-center justify-center p-4">
<div className="bg-white rounded-xl max-w-4xl w-full max-h-[90vh] overflow-y-auto">
<div className="sticky top-0 bg-white p-4 border-b flex justify-between items-center">
<h2 className="text-2xl font-bold">{project.title}</h2>
<button onClick={onClose} className="text-gray-500 hover:text-gray-700">
<i className="fas fa-times text-xl"></i>
</button>
</div>
<div className="p-6">
<div className="flex gap-4 mb-6 border-b">
<button
className={`pb-2 px-4 ${activeTab === 'overview' ? 'border-b-2 border-blue-600 text-blue-600' : ''}`}
onClick={() => setActiveTab('overview')}
>
Обзор
</button>
<button
className={`pb-2 px-4 ${activeTab === 'gallery' ? 'border-b-2 border-blue-600 text-blue-600' : ''}`}
onClick={() => setActiveTab('gallery')}
>
Галерея
</button>
</div>
{activeTab === 'overview' ? (
<>
<div className="prose max-w-none mb-8">
<p className="text-gray-600">{project.fullDescription}</p>
</div>
<div className="grid grid-cols-2 md:grid-cols-3 gap-4 mb-8">
{project.stats.map((stat, index) => (
<div key={index} className="text-center p-4 bg-blue-50 rounded-lg">
<div className="text-2xl font-bold text-blue-600">{stat.value}</div>
<div className="text-sm text-gray-600">{stat.label}</div>
</div>
))}
</div>
<div className="mb-8">
<h3 className="text-xl font-semibold mb-4">Возможности</h3>
<ul className="grid grid-cols-1 md:grid-cols-2 gap-3">
{project.features.map((feature, index) => (
<li key={index} className="flex items-start">
<i className="fas fa-check-circle text-green-500 mt-1 mr-2"></i>
<span>{feature}</span>
</li>
))}
</ul>
</div>
<div className="mb-8">
<h3 className="text-xl font-semibold mb-4">Технологии</h3>
<div className="flex flex-wrap gap-2">
{project.tech.map((tech, index) => (
<span key={index} className="bg-blue-100 text-blue-800 px-3 py-1 rounded-full">
{tech}
</span>
))}
</div>
</div>
<div className="flex justify-center gap-4">
{project.links?.telegram && (
<a
href={project.links.telegram}
target="_blank"
className="bg-blue-600 text-white px-8 py-3 rounded-lg hover:bg-blue-700 transition-colors"
>
<i className="fab fa-telegram mr-2"></i>
Демо в Telegram
</a>
)}
{project.links?.github && (
<a
href={project.links.github}
target="_blank"
className="bg-gray-800 text-white px-8 py-3 rounded-lg hover:bg-gray-900 transition-colors">
<i className="fab fa-github mr-2"></i>
Исходный код
</a>
)}
</div>
</>
) : (
<ImageGallery images={project.gallery} />
)}
</div>
</div>
</div>
);
}
function ProjectPreview({ project, onClick }) {
return (
<div
className="relative group cursor-pointer overflow-hidden rounded-xl shadow-lg hover:shadow-xl transition-all"
onClick={() => onClick(project)}
>
<img
src={project.previewImage}
alt={project.title}
className="w-full h-64 object-cover group-hover:scale-105 transition-transform duration-300"
/>
<div className="absolute inset-0 bg-gradient-to-t from-black/70 to-transparent p-6 flex flex-col justify-end">
<h3 className="text-white text-xl font-bold mb-2">{project.title}</h3>
<p className="text-white/80 mb-4">{project.shortDescription}</p>
<div className="flex flex-wrap gap-2">
{project.tech.slice(0, 3).map((tech, index) => (
<span key={index} className="bg-white/20 text-white px-2 py-1 rounded-full text-sm">
{tech}
</span>
))}
{project.tech.length > 3 && (
<span className="bg-white/20 text-white px-2 py-1 rounded-full text-sm">
+{project.tech.length - 3}
</span>
)}
</div>
</div>
</div>
);
}
function Projects() {
const [selectedProject, setSelectedProject] = useState(null);
const [filter, setFilter] = useState('all');
// Собираем все уникальные технологии из проектов
const allTechnologies = [...new Set(projects.flatMap(project => project.tech))];
const filteredProjects = filter === 'all'
? projects
: projects.filter(project => project.tech.includes(filter));
return (
<section id="projects" className="py-20">
<div className="container mx-auto px-4">
<h2 className="text-4xl font-bold mb-8 text-center">Проекты</h2>
{/* Фильтры */}
<div className="flex flex-wrap justify-center gap-2 mb-12">
<button
onClick={() => setFilter('all')}
className={`px-4 py-2 rounded-full ${
filter === 'all'
? 'bg-blue-600 text-white'
: 'bg-gray-100 text-gray-600 hover:bg-gray-200'
} transition-colors`}
>
Все проекты
</button>
{allTechnologies.map(tech => (
<button
key={tech}
onClick={() => setFilter(tech)}
className={`px-4 py-2 rounded-full ${
filter === tech
? 'bg-blue-600 text-white'
: 'bg-gray-100 text-gray-600 hover:bg-gray-200'
} transition-colors`}
>
{tech}
</button>
))}
</div>
{/* Сетка проектов */}
<div className="grid md:grid-cols-2 gap-8">
{filteredProjects.map(project => (
<ProjectPreview
key={project.id}
project={project}
onClick={setSelectedProject}
/>
))}
</div>
{/* Модальное окно с деталями */}
{selectedProject && (
<ProjectModal
project={selectedProject}
onClose={() => setSelectedProject(null)}
/>
)}
</div>
</section>
);
}
function Skills() {
const skills = {
"Languages": ["Python", "JavaScript", "SQL"],
"Frameworks": ["Aiogram 3.x", "Django", "FastAPI", "Flask"],
"Databases": ["PostgreSQL", "MySQL", "SQLite", "Redis"],
"Tools": ["Docker", "Git", "Linux", "Nginx"]
};
return (
<section id="skills" className="py-20 bg-white">
<div className="container mx-auto px-4">
<h2 className="text-4xl font-bold mb-12 text-center">Навыки</h2>
<div className="grid md:grid-cols-2 lg:grid-cols-4 gap-8">
{Object.entries(skills).map(([category, items]) => (
<div key={category} className="bg-gray-50 p-6 rounded-xl shadow-sm hover:shadow-md transition-shadow">
<h3 className="text-xl font-bold mb-4">{category}</h3>
<div className="flex flex-wrap gap-2">
{items.map((item, index) => (
<span key={index}
className="bg-blue-100 text-blue-800 px-3 py-1 rounded-full text-sm">
{item}
</span>
))}
</div>
</div>
))}
</div>
</div>
</section>
);
}
function Contact() {
return (
<section id="contact" className="py-20 bg-gradient-to-br from-blue-50 to-indigo-50">
<div className="container mx-auto px-4 text-center">
<h2 className="text-4xl font-bold mb-8">Связаться со мной</h2>
<p className="text-xl text-gray-600 mb-8">
Готов обсудить ваш проект и предложить оптимальное решение
</p>
<div className="flex justify-center gap-6">
<a href="https://t.me/your_username"
target="_blank"
className="bg-blue-500 text-white px-6 py-3 rounded-lg hover:bg-blue-600 transition-colors">
<i className="fab fa-telegram mr-2"></i>
Telegram
</a>
<a href="mailto:your@email.com"
className="bg-gray-700 text-white px-6 py-3 rounded-lg hover:bg-gray-800 transition-colors">
<i className="fas fa-envelope mr-2"></i>
Email
</a>
</div>
</div>
</section>
);
}
function App() {
useEffect(() => {
// Инициализация анимаций
AOS.init({
duration: 1000,
once: true,
offset: 100
});
}, []);
return (
<div className="bg-gray-50 min-h-screen">
<Navbar />
<Hero />
<Projects />
<Skills />
<Contact />
</div>
);
}
const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(<App />);
</script>
</body>
</html>