File size: 57,525 Bytes
bdd4f46 6cdba2d bdd4f46 f958323 bdd4f46 6cdba2d bdd4f46 6cdba2d bdd4f46 6cdba2d bdd4f46 6cdba2d bdd4f46 6cdba2d bdd4f46 6cdba2d bdd4f46 6cdba2d bdd4f46 6cdba2d bdd4f46 6cdba2d bdd4f46 6cdba2d bdd4f46 6cdba2d bdd4f46 | 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 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 |
// resources/lang/ar/validation.php
<?php
return [
'required' => 'حقل :attribute مطلوب.',
'email' => 'يجب أن يكون :attribute بريدًا إلكترونيًا صالحًا.',
// Add more Arabic translations
];
// resources/lang/ar/auth.php
<?php
return [
'failed' => 'بيانات الاعتماد هذه لا تتطابق مع سجلاتنا.',
'password' => 'كلمة المرور المقدمة غير صحيحة.',
'throttle' => 'عدد كبير جدًا من محاولات تسجيل الدخول. يرجى المحاولة مرة أخرى بعد :seconds ثانية.',
];
// resources/js/app.js
require('./bootstrap');
// Custom cursor effect
document.addEventListener('DOMContentLoaded', function() {
const cursorFollower = document.createElement('div');
cursorFollower.classList.add('cursor-follower');
document.body.appendChild(cursorFollower);
// Rest of your JavaScript code
});
// resources/sass/app.scss
@import '~tailwindcss/base';
@import '~tailwindcss/components';
@import '~tailwindcss/utilities';
// Custom styles
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700;900&display=swap');
body {
font-family: 'Tajawal', sans-serif;
}
/* Smooth transitions for language switching */
.lang-text, [data-ar][data-en] {
transition: opacity 0.3s ease;
}
/* Rest of your custom styles */
// database/migrations/2023_01_01_create_services_table.php
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateServicesTable extends Migration
{
public function up()
{
Schema::create('services', function (Blueprint $table) {
$table->id();
$table->string('title');
$table->text('description');
$table->string('icon');
$table->string('color');
$table->timestamps();
});
}
public function down()
{
Schema::dropIfExists('services');
}
}
// Similar migrations for gallery, videos, and admins tables
// config/auth.php
'guards' => [
'web' => [
'driver' => 'session',
'provider' => 'users',
],
'api' => [
'driver' => 'token',
'provider' => 'users',
'hash' => false,
],
'admin' => [
'driver' => 'session',
'provider' => 'admins',
],
],
'providers' => [
'users' => [
'driver' => 'eloquent',
'model' => App\Models\User::class,
],
'admins' => [
'driver' => 'eloquent',
'model' => App\Models\Admin::class,
],
],
// app/Models/Service.php
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Service extends Model
{
protected $fillable = [
'title',
'description',
'icon',
'color'
];
}
// app/Models/Gallery.php
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Gallery extends Model
{
protected $fillable = [
'title',
'image',
'category'
];
}
// app/Models/Video.php
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Video extends Model
{
protected $fillable = [
'title',
'description',
'thumbnail',
'url'
];
}
// app/Models/Admin.php
<?php
namespace App\Models;
use Illuminate\Foundation\Auth\User as Authenticatable;
class Admin extends Authenticatable
{
protected $guard = 'admin';
protected $fillable = [
'name',
'email',
'password'
];
protected $hidden = [
'password',
'remember_token'
];
}
// app/Http/Controllers/AdminController.php
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
class AdminController extends Controller
{
public function showLogin()
{
return view('admin.login');
}
public function login(Request $request)
{
$credentials = $request->only('email', 'password');
if (Auth::guard('admin')->attempt($credentials)) {
return redirect()->intended('/admin/dashboard');
}
return back()->withErrors([
'email' => 'بيانات الاعتماد غير صحيحة.',
]);
}
public function dashboard()
{
return view('admin.dashboard');
}
public function logout()
{
Auth::guard('admin')->logout();
return redirect('/admin/login');
}
}
// app/Http/Controllers/HomeController.php
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class HomeController extends Controller
{
public function index()
{
$stats = [
'clients' => 250,
'projects' => 120,
'awards' => 50,
'experience' => 15
];
$services = \App\Models\Service::all();
$gallery = \App\Models\Gallery::take(8)->get();
$videos = \App\Models\Video::take(3)->get();
return view('home', compact('stats', 'services', 'gallery', 'videos'));
}
}
// resources/views/layouts/app.blade.php
<!DOCTYPE html>
<html lang="ar" dir="rtl">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>@yield('title')</title>
@include('partials.head')
</head>
<body class="bg-gray-50">
@include('partials.header')
<main>
@yield('content')
</main>
@include('partials.footer')
@include('partials.admin-panel')
@include('partials.scripts')
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=f88fa/websit" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>
// resources/views/partials/head.blade.php
<link href="{{ asset('css/app.css') }}" rel="stylesheet">
<script src="https://cdn.tailwindcss.com"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<!-- Advanced Animation Libraries -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.12.2/gsap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.12.2/ScrollTrigger.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.12.2/ScrollToPlugin.min.js"></script>
<link href="https://unpkg.com/aos@2.3.4/dist/aos.css" rel="stylesheet">
<script src="https://unpkg.com/aos@2.3.4/dist/aos.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.css"/>
<script src="https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.js"></script>
<link rel="stylesheet" href="https://unpkg.com/tippy.js@6/dist/tippy.css"/>
<script src="https://unpkg.com/tippy.js@6/dist/tippy.min.js"></script>
<style>
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700;900&display=swap');
/* Your custom styles here */
</style>
// resources/views/home.blade.php
@extends('layouts.app')
@section('title', 'الرئيسية')
@section('content')
@include('sections.slider')
@include('sections.stats')
@include('sections.vision-mission')
@include('sections.services')
@include('sections.gallery')
@include('sections.videos')
@endsection
// routes/web.php
<?php
use Illuminate\Support\Facades\Route;
Route::get('/', function () {
return view('home');
});
Route::get('/about', function () {
return view('about');
});
Route::get('/services', function () {
return view('services');
});
Route::get('/gallery', function () {
return view('gallery');
});
Route::get('/videos', function () {
return view('videos');
});
Route::get('/contact', function () {
return view('contact');
});
// Admin routes
Route::prefix('admin')->group(function () {
Route::get('/login', 'AdminController@showLogin');
Route::post('/login', 'AdminController@login');
Route::get('/dashboard', 'AdminController@dashboard')->middleware('auth:admin');
});
<!DOCTYPE html>
<html lang="ar" dir="rtl">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>موقع الشركة</title>
<link rel="stylesheet" href="style.css">
<script src="https://cdn.tailwindcss.com"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<!-- Advanced Animation Libraries -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.12.2/gsap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.12.2/ScrollTrigger.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.12.2/ScrollToPlugin.min.js"></script>
<link href="https://unpkg.com/aos@2.3.4/dist/aos.css" rel="stylesheet">
<script src="https://unpkg.com/aos@2.3.4/dist/aos.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.css"/>
<script src="https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.js"></script>
<link rel="stylesheet" href="https://unpkg.com/tippy.js@6/dist/tippy.css"/>
<script src="https://unpkg.com/tippy.js@6/dist/tippy.min.js"></script>
<style>
/* Mouse Follower Effect */
.cursor-follower {
position: fixed;
width: 40px;
height: 40px;
background: rgba(59, 130, 246, 0.2);
border-radius: 50%;
pointer-events: none;
transform: translate(-50%, -50%);
z-index: 9999;
mix-blend-mode: multiply;
transition: transform 0.1s ease, width 0.3s ease, height 0.3s ease;
}
.cursor-follower.active {
width: 80px;
height: 80px;
background: rgba(59, 130, 246, 0.1);
}
#admin-dashboard {
direction: rtl;
overflow-y: auto;
}
body {
font-family: 'Tajawal', sans-serif;
}
.slider-item {
transition: all 0.5s ease;
}
.gallery-item {
transition: transform 0.3s ease;
}
.gallery-item:hover {
transform: scale(1.05);
}
.video-thumbnail {
position: relative;
overflow: hidden;
}
.video-thumbnail::after {
content: '\f04b';
font-family: 'Font Awesome 6 Free';
font-weight: 900;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
color: white;
font-size: 3rem;
opacity: 0.8;
transition: all 0.3s ease;
}
.video-thumbnail:hover::after {
opacity: 1;
transform: translate(-50%, -50%) scale(1.1);
}
</style>
</head>
<body class="bg-gray-50">
<!-- Header with Logo and Navigation -->
<header class="bg-white shadow-md sticky top-0 z-50 transition-all duration-300" id="main-header">
<div class="container mx-auto px-4 py-3 flex justify-between items-center">
<!-- Logo -->
<div class="flex items-center">
<div class="w-12 h-12 bg-blue-600 rounded-full flex items-center justify-center text-white font-bold text-xl mr-2">ش</div>
<h1 class="text-xl font-bold text-gray-800">شركتنا</h1>
</div>
<!-- Navigation -->
<nav class="hidden md:block">
<ul class="flex space-x-6 space-x-reverse">
<li><a href="#" class="text-blue-600 font-medium hover:text-blue-800" data-ar="الرئيسية" data-en="Home">الرئيسية</a></li>
<li><a href="#" class="text-gray-600 hover:text-blue-600" data-ar="من نحن" data-en="About">من نحن</a></li>
<li><a href="#" class="text-gray-600 hover:text-blue-600" data-ar="خدماتنا" data-en="Services">خدماتنا</a></li>
<li><a href="#" class="text-gray-600 hover:text-blue-600" data-ar="معرض الصور" data-en="Gallery">معرض الصور</a></li>
<li><a href="#" class="text-gray-600 hover:text-blue-600" data-ar="الفيديوهات" data-en="Videos">الفيديوهات</a></li>
<li><a href="#" class="text-gray-600 hover:text-blue-600" data-ar="اتصل بنا" data-en="Contact">اتصل بنا</a></li>
</ul>
</nav>
<!-- Language Switcher -->
<div class="flex items-center gap-4">
<div class="lang-switcher hidden md:flex">
<button class="lang-btn active" onclick="switchLanguage('ar')" id="btn-ar" aria-label="تغيير للعربية">العربية</button>
<button class="lang-btn" onclick="switchLanguage('en')" id="btn-en" aria-label="Switch to English">English</button>
</div>
<!-- Admin Login -->
<button id="admin-login-btn" class="hidden md:block bg-blue-600 text-white px-4 py-2 rounded-md hover:bg-blue-700 transition duration-300">
<i class="fas fa-lock mr-2"></i><span class="lang-text" data-ar="لوحة التحكم" data-en="Admin">لوحة التحكم</span>
</button>
</div>
<!-- Mobile Menu Button -->
<button id="mobile-menu-button" class="md:hidden text-gray-600">
<i class="fas fa-bars text-2xl"></i>
</button>
</div>
<!-- Mobile Menu -->
<div id="mobile-menu" class="hidden md:hidden bg-white py-2 px-4 shadow-lg">
<ul class="flex flex-col space-y-3">
<li><a href="#" class="block py-2 text-blue-600 font-medium lang-text" data-ar="الرئيسية" data-en="Home">الرئيسية</a></li>
<li><a href="#" class="block py-2 text-gray-600 hover:text-blue-600 lang-text" data-ar="من نحن" data-en="About">من نحن</a></li>
<li><a href="#" class="block py-2 text-gray-600 hover:text-blue-600 lang-text" data-ar="خدماتنا" data-en="Services">خدماتنا</a></li>
<li><a href="#" class="block py-2 text-gray-600 hover:text-blue-600 lang-text" data-ar="معرض الصور" data-en="Gallery">معرض الصور</a></li>
<li><a href="#" class="block py-2 text-gray-600 hover:text-blue-600 lang-text" data-ar="الفيديوهات" data-en="Videos">الفيديوهات</a></li>
<li><a href="#" class="block py-2 text-gray-600 hover:text-blue-600 lang-text" data-ar="اتصل بنا" data-en="Contact">اتصل بنا</a></li>
</ul>
<div class="mt-4 pt-4 border-t border-gray-200">
<div class="lang-switcher flex justify-center">
<button class="lang-btn active" onclick="switchLanguage('ar')" id="btn-ar-mobile">العربية</button>
<button class="lang-btn" onclick="switchLanguage('en')" id="btn-en-mobile">English</button>
</div>
</div>
</div>
</header>
<!-- Enhanced Slider Section with Swiper -->
<section class="relative overflow-hidden">
<div class="swiper main-slider">
<div class="swiper-wrapper">
<!-- Slide 1 -->
<div class="swiper-slide">
<div class="bg-gradient-to-r from-blue-800 to-blue-600 text-white py-20 px-4">
<div class="container mx-auto flex flex-col md:flex-row items-center">
<div class="md:w-1/2 mb-8 md:mb-0">
<h2 class="text-3xl md:text-4xl font-bold mb-4">حلول تقنية مبتكرة</h2>
<p class="text-lg mb-6">نقدم أحدث الحلول التقنية التي تساعد عملك على النمو والازدهار في السوق التنافسي.</p>
<a href="#" class="bg-white text-blue-600 px-6 py-2 rounded-full font-medium hover:bg-gray-100 transition duration-300 inline-block">تعرف أكثر</a>
</div>
<div class="md:w-1/2 flex justify-center">
<img src="https://via.placeholder.com/500x300" alt="التقنية" class="rounded-lg shadow-xl">
</div>
</div>
</div>
</div>
<!-- Slide 2 -->
<div class="slider-item min-w-full">
<div class="bg-gradient-to-r from-purple-800 to-purple-600 text-white py-20 px-4">
<div class="container mx-auto flex flex-col md:flex-row items-center">
<div class="md:w-1/2 mb-8 md:mb-0">
<h2 class="text-3xl md:text-4xl font-bold mb-4">فريق من الخبراء</h2>
<p class="text-lg mb-6">فريقنا من المحترفين جاهز لمساعدتك في تحقيق أهدافك وبناء مستقبل ناجح لعملك.</p>
<a href="#" class="bg-white text-purple-600 px-6 py-2 rounded-full font-medium hover:bg-gray-100 transition duration-300 inline-block">تعرف أكثر</a>
</div>
<div class="md:w-1/2 flex justify-center">
<img src="https://via.placeholder.com/500x300" alt="الفريق" class="rounded-lg shadow-xl">
</div>
</div>
</div>
</div>
<!-- Slide 3 -->
<div class="slider-item min-w-full">
<div class="bg-gradient-to-r from-green-800 to-green-600 text-white py-20 px-4">
<div class="container mx-auto flex flex-col md:flex-row items-center">
<div class="md:w-1/2 mb-8 md:mb-0">
<h2 class="text-3xl md:text-4xl font-bold mb-4">خدمة عملاء مميزة</h2>
<p class="text-lg mb-6">نحن نقدم خدمة عملاء على مدار الساعة لضمان رضاك التام عن خدماتنا.</p>
<a href="#" class="bg-white text-green-600 px-6 py-2 rounded-full font-medium hover:bg-gray-100 transition duration-300 inline-block">تعرف أكثر</a>
</div>
<div class="md:w-1/2 flex justify-center">
<img src="https://via.placeholder.com/500x300" alt="خدمة العملاء" class="rounded-lg shadow-xl">
</div>
</div>
</div>
</div>
</div>
<!-- Slider Controls -->
<button id="prev-slide" class="absolute left-4 top-1/2 transform -translate-y-1/2 bg-white bg-opacity-30 text-white p-2 rounded-full hover:bg-opacity-50 transition duration-300">
<i class="fas fa-chevron-right"></i>
</button>
<button id="next-slide" class="absolute right-4 top-1/2 transform -translate-y-1/2 bg-white bg-opacity-30 text-white p-2 rounded-full hover:bg-opacity-50 transition duration-300">
<i class="fas fa-chevron-left"></i>
</button>
<!-- Slider Indicators -->
<div class="absolute bottom-4 left-1/2 transform -translate-x-1/2 flex space-x-2 space-x-reverse">
<button class="slider-indicator w-3 h-3 rounded-full bg-white bg-opacity-50 hover:bg-opacity-100 transition duration-300" data-index="0"></button>
<button class="slider-indicator w-3 h-3 rounded-full bg-white bg-opacity-50 hover:bg-opacity-100 transition duration-300" data-index="1"></button>
<button class="slider-indicator w-3 h-3 rounded-full bg-white bg-opacity-50 hover:bg-opacity-100 transition duration-300" data-index="2"></button>
</div>
</section>
<!-- Statistics Section -->
<section class="py-16 bg-gray-100" data-aos="fade-up" data-aos-duration="800">
<div class="container mx-auto px-4">
<h2 class="text-3xl font-bold text-center mb-12 text-gray-800">إحصائيات وأرقام</h2>
<div class="grid grid-cols-2 md:grid-cols-4 gap-6">
<!-- Stat 1 -->
<div class="bg-white p-6 rounded-lg shadow-md text-center">
<div class="text-4xl font-bold text-blue-600 mb-2 counter" data-target="250">0</div>
<div class="text-gray-600">عميل راضٍ</div>
</div>
<!-- Stat 2 -->
<div class="bg-white p-6 rounded-lg shadow-md text-center">
<div class="text-4xl font-bold text-green-600 mb-2 counter" data-target="120">0</div>
<div class="text-gray-600">مشروع ناجح</div>
</div>
<!-- Stat 3 -->
<div class="bg-white p-6 rounded-lg shadow-md text-center">
<div class="text-4xl font-bold text-purple-600 mb-2 counter" data-target="50">0</div>
<div class="text-gray-600">جائزة وتكريم</div>
</div>
<!-- Stat 4 -->
<div class="bg-white p-6 rounded-lg shadow-md text-center">
<div class="text-4xl font-bold text-orange-600 mb-2 counter" data-target="15">0</div>
<div class="text-gray-600">سنة خبرة</div>
</div>
</div>
</div>
</section>
<!-- Vision & Mission Section -->
<section class="py-16">
<div class="container mx-auto px-4">
<div class="grid md:grid-cols-2 gap-8">
<!-- Vision -->
<div class="bg-blue-50 p-8 rounded-lg shadow-md border-l-4 border-blue-600">
<div class="flex items-center mb-4">
<div class="bg-blue-600 text-white p-3 rounded-full mr-4">
<i class="fas fa-eye text-xl"></i>
</div>
<h3 class="text-2xl font-bold text-gray-800">رؤيتنا</h3>
</div>
<p class="text-gray-700 leading-relaxed">
نطمح إلى أن نكون الشركة الرائدة في تقديم الحلول التقنية المبتكرة في المنطقة، وأن نكون الشريك المفضل للعملاء الذين يسعون إلى التميز والابتكار في أعمالهم. نسعى جاهدين لتحقيق التميز التقني ورفع مستوى الخدمات المقدمة في السوق.
</p>
</div>
<!-- Mission -->
<div class="bg-green-50 p-8 rounded-lg shadow-md border-l-4 border-green-600">
<div class="flex items-center mb-4">
<div class="bg-green-600 text-white p-3 rounded-full mr-4">
<i class="fas fa-bullseye text-xl"></i>
</div>
<h3 class="text-2xl font-bold text-gray-800">رسالتنا</h3>
</div>
<p class="text-gray-700 leading-relaxed">
نلتزم بتقديم حلول تقنية عالية الجودة تلبي احتياجات عملائنا وتساعدهم على تحقيق أهدافهم. نعمل على تطوير منتجات وخدمات مبتكرة تعزز كفاءة الأعمال وتوفر الوقت والجهد. نؤمن بالعمل الجماعي والشفافية والابتكار كركائز أساسية لنجاحنا ونجاح عملائنا.
</p>
</div>
</div>
</div>
</section>
<!-- Our Services Section -->
<section class="py-16 bg-gray-100">
<div class="container mx-auto px-4">
<h2 class="text-3xl font-bold text-center mb-4 text-gray-800">خدماتنا</h2>
<p class="text-center text-gray-600 max-w-2xl mx-auto mb-12">نقدم مجموعة واسعة من الخدمات التقنية التي تساعد عملك على النمو والازدهار</p>
<div class="grid md:grid-cols-2 lg:grid-cols-3 gap-8">
<!-- Service 1 with Enhanced Animation -->
<div class="bg-white rounded-lg shadow-md overflow-hidden group relative"
data-aos="fade-up"
data-aos-delay="100"
data-tippy-content="اضغط لمعرفة المزيد">
<div class="absolute inset-0 bg-gradient-to-br from-blue-600 to-purple-600 opacity-0 group-hover:opacity-90 transition-opacity duration-500 flex items-center justify-center">
<span class="text-white font-bold text-lg">عرض التفاصيل</span>
</div>
<div class="h-48 bg-blue-600 flex items-center justify-center text-white">
<i class="fas fa-laptop-code text-6xl"></i>
</div>
<div class="p-6">
<h3 class="text-xl font-bold mb-3 text-gray-800">تطوير المواقع</h3>
<p class="text-gray-600">نقوم بتصميم وتطوير مواقع الويب الاحترافية التي تلبي احتياجات عملك وتعزز وجودك الرقمي.</p>
</div>
</div>
<!-- Service 2 -->
<div class="bg-white rounded-lg shadow-md overflow-hidden hover:shadow-lg transition duration-300">
<div class="h-48 bg-purple-600 flex items-center justify-center text-white">
<i class="fas fa-mobile-alt text-6xl"></i>
</div>
<div class="p-6">
<h3 class="text-xl font-bold mb-3 text-gray-800">تطبيقات الجوال</h3>
<p class="text-gray-600">نطور تطبيقات جوال متميزة لأنظمة iOS وAndroid تساعدك في الوصول إلى عملائك أينما كانوا.</p>
</div>
</div>
<!-- Service 3 -->
<div class="bg-white rounded-lg shadow-md overflow-hidden hover:shadow-lg transition duration-300">
<div class="h-48 bg-green-600 flex items-center justify-center text-white">
<i class="fas fa-chart-line text-6xl"></i>
</div>
<div class="p-6">
<h3 class="text-xl font-bold mb-3 text-gray-800">التسويق الرقمي</h3>
<p class="text-gray-600">نقدم استراتيجيات تسويق رقمي فعالة لزيادة ظهور علامتك التجارية وجذب المزيد من العملاء.</p>
</div>
</div>
<!-- Service 4 -->
<div class="bg-white rounded-lg shadow-md overflow-hidden hover:shadow-lg transition duration-300">
<div class="h-48 bg-red-600 flex items-center justify-center text-white">
<i class="fas fa-paint-brush text-6xl"></i>
</div>
<div class="p-6">
<h3 class="text-xl font-bold mb-3 text-gray-800">تصميم الجرافيك</h3>
<p class="text-gray-600">نصمم هوية بصرية مميزة لعلامتك التجارية تشمل الشعارات والمواد التسويقية والعلامات التجارية.</p>
</div>
</div>
<!-- Service 5 -->
<div class="bg-white rounded-lg shadow-md overflow-hidden hover:shadow-lg transition duration-300">
<div class="h-48 bg-yellow-600 flex items-center justify-center text-white">
<i class="fas fa-cloud text-6xl"></i>
</div>
<div class="p-6">
<h3 class="text-xl font-bold mb-3 text-gray-800">الحلول السحابية</h3>
<p class="text-gray-600">نقدم حلول سحابية متكاملة تساعدك في إدارة عملك بكفاءة وأمان عالي مع تقليل التكاليف.</p>
</div>
</div>
<!-- Service 6 -->
<div class="bg-white rounded-lg shadow-md overflow-hidden hover:shadow-lg transition duration-300">
<div class="h-48 bg-indigo-600 flex items-center justify-center text-white">
<i class="fas fa-headset text-6xl"></i>
</div>
<div class="p-6">
<h3 class="text-xl font-bold mb-3 text-gray-800">الدعم الفني</h3>
<p class="text-gray-600">نوفر خدمة دعم فني على مدار الساعة لضمان استمرارية عمل أنظمتك وحل أي مشكلات فنية تواجهك.</p>
</div>
</div>
</div>
</div>
</section>
<!-- Photo Gallery Section -->
<section class="py-16">
<div class="container mx-auto px-4">
<h2 class="text-3xl font-bold text-center mb-4 text-gray-800">البوم الصور</h2>
<p class="text-center text-gray-600 max-w-2xl mx-auto mb-12">استكشف بعضًا من أعمالنا ومشاريعنا الناجحة من خلال معرض الصور الخاص بنا</p>
<div class="relative overflow-hidden">
<div class="photo-slider-container flex transition-transform duration-500 ease-in-out">
<!-- Photo 1 -->
<div class="photo-slider-item min-w-full md:min-w-1/2 lg:min-w-1/3 xl:min-w-1/4 px-2">
<div class="gallery-item overflow-hidden rounded-lg shadow-md">
<img src="https://via.placeholder.com/500x300" alt="مشروع 1" class="w-full h-64 object-cover hover:scale-110 transition duration-500">
</div>
</div>
<!-- Photo 2 -->
<div class="photo-slider-item min-w-full md:min-w-1/2 lg:min-w-1/3 xl:min-w-1/4 px-2">
<div class="gallery-item overflow-hidden rounded-lg shadow-md">
<img src="https://via.placeholder.com/500x300" alt="مشروع 2" class="w-full h-64 object-cover hover:scale-110 transition duration-500">
</div>
</div>
<!-- Photo 3 -->
<div class="photo-slider-item min-w-full md:min-w-1/2 lg:min-w-1/3 xl:min-w-1/4 px-2">
<div class="gallery-item overflow-hidden rounded-lg shadow-md">
<img src="https://via.placeholder.com/500x300" alt="مشروع 3" class="w-full h-64 object-cover hover:scale-110 transition duration-500">
</div>
</div>
<!-- Photo 4 -->
<div class="photo-slider-item min-w-full md:min-w-1/2 lg:min-w-1/3 xl:min-w-1/4 px-2">
<div class="gallery-item overflow-hidden rounded-lg shadow-md">
<img src="https://via.placeholder.com/500x300" alt="مشروع 4" class="w-full h-64 object-cover hover:scale-110 transition duration-500">
</div>
</div>
<!-- Photo 5 -->
<div class="photo-slider-item min-w-full md:min-w-1/2 lg:min-w-1/3 xl:min-w-1/4 px-2">
<div class="gallery-item overflow-hidden rounded-lg shadow-md">
<img src="https://via.placeholder.com/500x300" alt="مشروع 5" class="w-full h-64 object-cover hover:scale-110 transition duration-500">
</div>
</div>
</div>
<!-- Slider Controls -->
<button id="prev-photo" class="absolute left-4 top-1/2 transform -translate-y-1/2 bg-white bg-opacity-80 text-gray-800 p-2 rounded-full hover:bg-opacity-100 transition duration-300 shadow-md">
<i class="fas fa-chevron-right"></i>
</button>
<button id="next-photo" class="absolute right-4 top-1/2 transform -translate-y-1/2 bg-white bg-opacity-80 text-gray-800 p-2 rounded-full hover:bg-opacity-100 transition duration-300 shadow-md">
<i class="fas fa-chevron-left"></i>
</button>
</div>
<div class="text-center mt-8">
<a href="#" class="inline-block bg-blue-600 text-white px-6 py-2 rounded-full font-medium hover:bg-blue-700 transition duration-300 transform hover:scale-105 shadow-lg hover:shadow-xl">عرض الكل</a>
</div>
</div>
</section>
<!-- Video Gallery Section -->
<section class="py-16 bg-gray-100">
<div class="container mx-auto px-4">
<h2 class="text-3xl font-bold text-center mb-4 text-gray-800">البوم الفيديوهات</h2>
<p class="text-center text-gray-600 max-w-2xl mx-auto mb-12">استكشف فيديوهات تعرض أعمالنا وخدماتنا ومشاريعنا الناجحة</p>
<div class="grid md:grid-cols-2 lg:grid-cols-3 gap-6">
<!-- Video 1 -->
<div class="video-thumbnail bg-white rounded-lg shadow-md overflow-hidden">
<img src="https://via.placeholder.com/400x225" alt="فيديو 1" class="w-full h-48 object-cover">
<div class="p-4">
<h3 class="font-bold text-lg mb-2 text-gray-800">مقدمة عن الشركة</h3>
<p class="text-gray-600">تعرف على شركتنا ورؤيتنا ورسالتنا</p>
</div>
</div>
<!-- Video 2 -->
<div class="video-thumbnail bg-white rounded-lg shadow-md overflow-hidden">
<img src="https://via.placeholder.com/400x225" alt="فيديو 2" class="w-full h-48 object-cover">
<div class="p-4">
<h3 class="font-bold text-lg mb-2 text-gray-800">أحدث مشاريعنا</h3>
<p class="text-gray-600">جولة في أحدث المشاريع التي أنجزناها</p>
</div>
</div>
<!-- Video 3 -->
<div class="video-thumbnail bg-white rounded-lg shadow-md overflow-hidden">
<img src="https://via.placeholder.com/400x225" alt="فيديو 3" class="w-full h-48 object-cover">
<div class="p-4">
<h3 class="font-bold text-lg mb-2 text-gray-800">شهادات العملاء</h3>
<p class="text-gray-600">ماذا يقول عملاؤنا عن خدماتنا</p>
</div>
</div>
</div>
<div class="text-center mt-8">
<a href="#" class="inline-block bg-blue-600 text-white px-6 py-2 rounded-full font-medium hover:bg-blue-700 transition duration-300">عرض المزيد</a>
</div>
</div>
</section>
<!-- Footer -->
<footer class="bg-gray-800 text-white py-12">
<div class="container mx-auto px-4">
<div class="grid md:grid-cols-4 gap-8">
<!-- About -->
<div>
<h3 class="text-xl font-bold mb-4">عن الشركة</h3>
<p class="text-gray-400 mb-4">نحن شركة رائدة في مجال الحلول التقنية، نقدم خدمات عالية الجودة لعملائنا منذ أكثر من 15 عامًا.</p>
<div class="flex space-x-4 space-x-reverse">
<a href="#" class="text-gray-400 hover:text-white transition duration-300"><i class="fab fa-facebook-f"></i></a>
<a href="#" class="text-gray-400 hover:text-white transition duration-300"><i class="fab fa-twitter"></i></a>
<a href="#" class="text-gray-400 hover:text-white transition duration-300"><i class="fab fa-instagram"></i></a>
<a href="#" class="text-gray-400 hover:text-white transition duration-300"><i class="fab fa-linkedin-in"></i></a>
</div>
</div>
<!-- Quick Links -->
<div>
<h3 class="text-xl font-bold mb-4">روابط سريعة</h3>
<ul class="space-y-2">
<li><a href="#" class="text-gray-400 hover:text-white transition duration-300">الرئيسية</a></li>
<li><a href="#" class="text-gray-400 hover:text-white transition duration-300">من نحن</a></li>
<li><a href="#" class="text-gray-400 hover:text-white transition duration-300">خدماتنا</a></li>
<li><a href="#" class="text-gray-400 hover:text-white transition duration-300">المشاريع</a></li>
<li><a href="#" class="text-gray-400 hover:text-white transition duration-300">اتصل بنا</a></li>
</ul>
</div>
<!-- Services -->
<div>
<h3 class="text-xl font-bold mb-4">خدماتنا</h3>
<ul class="space-y-2">
<li><a href="#" class="text-gray-400 hover:text-white transition duration-300">تطوير المواقع</a></li>
<li><a href="#" class="text-gray-400 hover:text-white transition duration-300">تطبيقات الجوال</a></li>
<li><a href="#" class="text-gray-400 hover:text-white transition duration-300">التسويق الرقمي</a></li>
<li><a href="#" class="text-gray-400 hover:text-white transition duration-300">تصميم الجرافيك</a></li>
<li><a href="#" class="text-gray-400 hover:text-white transition duration-300">الحلول السحابية</a></li>
</ul>
</div>
<!-- Contact -->
<div>
<h3 class="text-xl font-bold mb-4">اتصل بنا</h3>
<ul class="space-y-3">
<li class="flex items-start">
<i class="fas fa-map-marker-alt mt-1 mr-2 text-gray-400"></i>
<span class="text-gray-400">شارع الملك فهد، الرياض، المملكة العربية السعودية</span>
</li>
<li class="flex items-center">
<i class="fas fa-phone-alt mr-2 text-gray-400"></i>
<span class="text-gray-400">+966 12 345 6789</span>
</li>
<li class="flex items-center">
<i class="fas fa-envelope mr-2 text-gray-400"></i>
<span class="text-gray-400">info@company.com</span>
</li>
</ul>
</div>
</div>
<div class="border-t border-gray-700 mt-8 pt-8 text-center text-gray-400">
<p>© 2023 شركة الشركة. جميع الحقوق محفوظة.</p>
</div>
</div>
</footer>
<!-- Admin Dashboard (hidden by default) -->
<div id="admin-dashboard" class="fixed inset-y-0 right-0 w-96 bg-white shadow-xl transform translate-x-full transition-transform duration-300 z-50 flex flex-col">
<div class="p-4 border-b border-gray-200 flex justify-between items-center bg-gray-800 text-white">
<h3 class="text-lg font-bold flex items-center">
<i class="fas fa-cogs mr-2"></i> لوحة التحكم
</h3>
<button id="close-admin" class="text-white hover:text-gray-300">
<i class="fas fa-times"></i>
</button>
</div>
<div class="flex-1 overflow-y-auto">
<div class="p-4">
<div class="mb-8">
<h4 class="font-bold text-lg mb-4 text-gray-700 border-b pb-2">
<i class="fas fa-tachometer-alt mr-2"></i>لوحة التحكم الرئيسية
</h4>
<div class="grid grid-cols-2 gap-4">
<div class="bg-blue-50 p-4 rounded-lg border border-blue-100">
<h5 class="font-medium text-blue-800 mb-2">المقالات</h5>
<p class="text-sm text-gray-600">إدارة محتوى الموقع والمقالات</p>
</div>
<div class="bg-green-50 p-4 rounded-lg border border-green-100">
<h5 class="font-medium text-green-800 mb-2">الصفحات</h5>
<p class="text-sm text-gray-600">تحرير صفحات الموقع الثابتة</p>
</div>
<div class="bg-purple-50 p-4 rounded-lg border border-purple-100">
<h5 class="font-medium text-purple-800 mb-2">المستخدمون</h5>
<p class="text-sm text-gray-600">إدارة مستخدمي لوحة التحكم</p>
</div>
<div class="bg-yellow-50 p-4 rounded-lg border border-yellow-100">
<h5 class="font-medium text-yellow-800 mb-2">الإعدادات</h5>
<p class="text-sm text-gray-600">تعديل إعدادات الموقع العامة</p>
</div>
</div>
</div>
<div class="mb-8">
<h4 class="font-bold text-lg mb-4 text-gray-700 border-b pb-2">
<i class="fas fa-cog mr-2"></i>الإعدادات السريعة
</h4>
<div class="space-y-4">
<div class="flex items-center justify-between p-3 bg-gray-50 rounded-lg">
<div>
<h5 class="font-medium">وضع الصيانة</h5>
<p class="text-sm text-gray-500">إغلاق الموقع للزوار</p>
</div>
<label class="relative inline-flex items-center cursor-pointer">
<input type="checkbox" class="sr-only peer">
<div class="w-11 h-6 bg-gray-200 peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-blue-600"></div>
</label>
</div>
<div class="flex items-center justify-between p-3 bg-gray-50 rounded-lg">
<div>
<h5 class="font-medium">التعليقات</h5>
<p class="text-sm text-gray-500">تفعيل/تعطيل نظام التعليقات</p>
</div>
<label class="relative inline-flex items-center cursor-pointer">
<input type="checkbox" class="sr-only peer" checked>
<div class="w-11 h-6 bg-gray-200 peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-blue-600"></div>
</label>
</div>
</div>
</div>
<div class="mb-8">
<h4 class="font-bold text-lg mb-4 text-gray-700 border-b pb-2">
<i class="fas fa-chart-line mr-2"></i>إحصائيات سريعة
</h4>
<div class="grid grid-cols-3 gap-4 text-center">
<div class="bg-white p-3 rounded-lg shadow border">
<div class="text-blue-600 font-bold text-xl">152</div>
<div class="text-sm text-gray-500">مقال</div>
</div>
<div class="bg-white p-3 rounded-lg shadow border">
<div class="text-green-600 font-bold text-xl">1.2K</div>
<div class="text-sm text-gray-500">زائر</div>
</div>
<div class="bg-white p-3 rounded-lg shadow border">
<div class="text-purple-600 font-bold text-xl">24</div>
<div class="text-sm text-gray-500">تعليق</div>
</div>
</div>
</div>
</div>
</div>
<div class="p-4 border-t border-gray-200 bg-gray-50">
<button class="w-full bg-red-500 text-white py-2 rounded-md hover:bg-red-600 transition duration-300 flex items-center justify-center">
<i class="fas fa-sign-out-alt mr-2"></i>تسجيل الخروج
</button>
</div>
</div>
<script>
// Language Switcher Functionality
let currentLang = localStorage.getItem('website-lang') || 'ar';
function switchLanguage(lang) {
if (lang === currentLang) return;
currentLang = lang;
localStorage.setItem('website-lang', lang);
// Update direction
document.documentElement.setAttribute('dir', lang === 'ar' ? 'rtl' : 'ltr');
document.documentElement.setAttribute('lang', lang);
// Update text content for all elements with data attributes
document.querySelectorAll('[data-ar][data-en]').forEach(element => {
element.textContent = element.getAttribute(`data-${lang}`);
});
// Update buttons state
document.querySelectorAll('.lang-btn').forEach(btn => {
btn.classList.remove('active');
});
document.querySelectorAll(`[id^="btn-${lang}"]`).forEach(btn => {
btn.classList.add('active');
});
// Update page title
document.title = lang === 'ar' ? 'موقع الشركة' : 'Company Website';
// Trigger text animations
document.body.classList.add('lang-loading');
setTimeout(() => {
document.body.classList.remove('lang-loading');
}, 300);
}
// Initialize language on load
document.addEventListener('DOMContentLoaded', function() {
if (currentLang === 'en') {
switchLanguage('en');
}
});
// Custom Cursor Effect
const cursorFollower = document.createElement('div');
cursorFollower.classList.add('cursor-follower');
document.body.appendChild(cursorFollower);
document.addEventListener('mousemove', (e) => {
gsap.to(cursorFollower, {
x: e.clientX,
y: e.clientY,
duration: 0.5,
ease: "power2.out"
});
});
document.querySelectorAll('a, button, .video-thumbnail, .gallery-item').forEach(el => {
el.addEventListener('mouseenter', () => {
cursorFollower.classList.add('active');
});
el.addEventListener('mouseleave', () => {
cursorFollower.classList.remove('active');
});
});
// Initialize AOS with more options
AOS.init({
once: true,
easing: 'ease-out-back',
duration: 800
});
// Enhanced Header Scroll Animation
gsap.to("#main-header", {
scrollTrigger: {
trigger: "body",
start: "top top",
end: "+=100",
scrub: 0.8,
markers: false
},
backdropFilter: "blur(10px)",
backgroundColor: "rgba(255, 255, 255, 0.9)",
boxShadow: "0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",
paddingTop: "0.5rem",
paddingBottom: "0.5rem",
ease: "power2.out"
});
// Floating logo animation
gsap.to(".logo-circle", {
y: -5,
duration: 2,
repeat: -1,
yoyo: true,
ease: "sine.inOut"
});
// Admin Dashboard Toggle
const adminDashboard = document.getElementById('admin-dashboard');
const closeAdminBtn = document.getElementById('close-admin');
const adminLoginBtn = document.getElementById('admin-login-btn');
// Toggle admin panel
adminLoginBtn.addEventListener('click', () => {
adminDashboard.classList.toggle('translate-x-full');
// Disable scrolling when admin panel is open
if (!adminDashboard.classList.contains('translate-x-full')) {
document.body.style.overflow = 'hidden';
} else {
document.body.style.overflow = 'auto';
}
});
closeAdminBtn.addEventListener('click', () => {
adminDashboard.classList.add('translate-x-full');
document.body.style.overflow = 'auto';
});
// Close admin panel when clicking outside
document.addEventListener('click', (e) => {
if (!adminDashboard.contains(e.target) && e.target !== adminLoginBtn) {
adminDashboard.classList.add('translate-x-full');
document.body.style.overflow = 'auto';
}
});
// Mobile Menu Toggle
const mobileMenuButton = document.getElementById('mobile-menu-button');
const mobileMenu = document.getElementById('mobile-menu');
mobileMenuButton.addEventListener('click', () => {
mobileMenu.classList.toggle('hidden');
});
// Enhanced Slider Functionality with GSAP
const sliderContainer = document.querySelector('.slider-container');
const sliderItems = document.querySelectorAll('.slider-item');
const prevButton = document.getElementById('prev-slide');
const nextButton = document.getElementById('next-slide');
const indicators = document.querySelectorAll('.slider-indicator');
let currentIndex = 0;
const totalSlides = sliderItems.length;
function updateSlider() {
sliderContainer.style.transform = `translateX(-${currentIndex * 100}%)`;
// Update indicators
indicators.forEach((indicator, index) => {
if (index === currentIndex) {
indicator.classList.add('bg-opacity-100');
} else {
indicator.classList.remove('bg-opacity-100');
}
});
}
function nextSlide() {
currentIndex = (currentIndex + 1) % totalSlides;
updateSlider();
}
function prevSlide() {
currentIndex = (currentIndex - 1 + totalSlides) % totalSlides;
updateSlider();
}
nextButton.addEventListener('click', nextSlide);
prevButton.addEventListener('click', prevSlide);
// Auto slide
let slideInterval = setInterval(nextSlide, 5000);
// Pause on hover
sliderContainer.addEventListener('mouseenter', () => {
clearInterval(slideInterval);
});
sliderContainer.addEventListener('mouseleave', () => {
slideInterval = setInterval(nextSlide, 5000);
});
// Indicator clicks
indicators.forEach(indicator => {
indicator.addEventListener('click', () => {
currentIndex = parseInt(indicator.getAttribute('data-index'));
updateSlider();
});
});
// Photo Slider Functionality
const photoSliderContainer = document.querySelector('.photo-slider-container');
const photoSliderItems = document.querySelectorAll('.photo-slider-item');
const prevPhotoButton = document.getElementById('prev-photo');
const nextPhotoButton = document.getElementById('next-photo');
let photoCurrentIndex = 0;
const totalPhotoSlides = photoSliderItems.length;
const slidesToShow = 4; // Number of slides to show at once
function updatePhotoSlider() {
const itemWidth = 100 / slidesToShow;
const translateValue = -photoCurrentIndex * itemWidth;
photoSliderContainer.style.transform = `translateX(${translateValue}%)`;
}
function nextPhotoSlide() {
if (photoCurrentIndex < totalPhotoSlides - slidesToShow) {
photoCurrentIndex++;
updatePhotoSlider();
}
}
function prevPhotoSlide() {
if (photoCurrentIndex > 0) {
photoCurrentIndex--;
updatePhotoSlider();
}
}
nextPhotoButton.addEventListener('click', nextPhotoSlide);
prevPhotoButton.addEventListener('click', prevPhotoSlide);
// Advanced Counter Animation with GSAP
const counters = document.querySelectorAll('.counter');
function animateCounters() {
counters.forEach((counter, index) => {
const target = +counter.getAttribute('data-target');
const duration = 2 + (index * 0.2);
gsap.fromTo(counter,
{ innerText: 0 },
{
innerText: target,
duration: duration,
ease: "elastic.out(1, 0.5)",
snap: { innerText: 1 },
onUpdate: function() {
counter.innerHTML = Math.floor(counter.innerText).toLocaleString();
}
}
);
// Add pulse effect when counting completes
gsap.to(counter, {
scale: 1.1,
duration: 0.3,
repeat: 1,
yoyo: true,
delay: duration,
ease: "power2.inOut"
});
});
}
// Start counter animation when statistics section is in view
const statisticsSection = document.querySelector('.bg-gray-100');
const observer = new IntersectionObserver((entries) => {
if (entries[0].isIntersecting) {
animateCounters();
observer.unobserve(statisticsSection);
}
}, { threshold: 0.5 });
observer.observe(statisticsSection);
</script>
</body>
</html> |