Spaces:
Running
Running
File size: 60,662 Bytes
1ac282b |
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 |
<!DOCTYPE html>
<html lang="fr" class="scroll-smooth">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Agriconect - Plateforme Agricole Connectée</title>
<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">
<style>
.gradient-bg {
background: linear-gradient(135deg, #3b82f6 0%, #10b981 50%, #f59e0b 100%);
}
.dashboard-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
gap: 1.5rem;
}
.sidebar {
transition: all 0.3s ease;
}
@media (max-width: 768px) {
.sidebar {
transform: translateX(-100%);
position: absolute;
z-index: 50;
height: 100vh;
}
.sidebar.open {
transform: translateX(0);
}
}
.form-input:focus {
box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}
</style>
</head>
<body class="bg-gray-50 font-sans">
<!-- Navigation -->
<nav class="bg-white shadow-md">
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div class="flex justify-between h-16">
<div class="flex">
<div class="flex-shrink-0 flex items-center">
<i class="fas fa-leaf text-green-500 text-2xl mr-2"></i>
<span class="text-xl font-bold text-gray-800">Agriconect</span>
</div>
<div class="hidden sm:ml-6 sm:flex sm:space-x-8">
<a href="#" class="border-blue-500 text-gray-900 inline-flex items-center px-1 pt-1 border-b-2 text-sm font-medium" id="home-link">
Accueil
</a>
<a href="#" class="border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700 inline-flex items-center px-1 pt-1 border-b-2 text-sm font-medium" id="about-link">
À propos
</a>
<a href="#" class="border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700 inline-flex items-center px-1 pt-1 border-b-2 text-sm font-medium" id="services-link">
Services
</a>
</div>
</div>
<div class="hidden sm:ml-6 sm:flex sm:items-center">
<button class="bg-blue-500 hover:bg-blue-600 text-white px-4 py-2 rounded-md text-sm font-medium transition duration-150 ease-in-out" id="login-btn">
Connexion
</button>
<button class="ml-4 bg-green-500 hover:bg-green-600 text-white px-4 py-2 rounded-md text-sm font-medium transition duration-150 ease-in-out" id="register-btn">
Inscription
</button>
</div>
<div class="-mr-2 flex items-center sm:hidden">
<button type="button" class="inline-flex items-center justify-center p-2 rounded-md text-gray-400 hover:text-gray-500 hover:bg-gray-100 focus:outline-none focus:ring-2 focus:ring-inset focus:ring-blue-500" id="mobile-menu-btn">
<span class="sr-only">Ouvrir le menu</span>
<i class="fas fa-bars text-xl"></i>
</button>
</div>
</div>
</div>
<!-- Mobile menu -->
<div class="hidden sm:hidden bg-white shadow-lg rounded-b-lg" id="mobile-menu">
<div class="pt-2 pb-3 space-y-1">
<a href="#" class="bg-blue-50 border-blue-500 text-blue-700 block pl-3 pr-4 py-2 border-l-4 text-base font-medium">Accueil</a>
<a href="#" class="border-transparent text-gray-500 hover:bg-gray-50 hover:border-gray-300 hover:text-gray-700 block pl-3 pr-4 py-2 border-l-4 text-base font-medium">À propos</a>
<a href="#" class="border-transparent text-gray-500 hover:bg-gray-50 hover:border-gray-300 hover:text-gray-700 block pl-3 pr-4 py-2 border-l-4 text-base font-medium">Services</a>
<div class="mt-4 pt-4 border-t border-gray-200">
<button class="w-full bg-blue-500 hover:bg-blue-600 text-white px-4 py-2 rounded-md text-base font-medium transition duration-150 ease-in-out">Connexion</button>
<button class="w-full mt-2 bg-green-500 hover:bg-green-600 text-white px-4 py-2 rounded-md text-base font-medium transition duration-150 ease-in-out">Inscription</button>
</div>
</div>
</div>
</nav>
<!-- Hero Section -->
<div class="gradient-bg">
<div class="max-w-7xl mx-auto py-12 px-4 sm:px-6 lg:px-8 lg:py-24">
<div class="lg:grid lg:grid-cols-2 lg:gap-8 items-center">
<div class="mb-8 lg:mb-0">
<h1 class="text-4xl font-extrabold tracking-tight text-white sm:text-5xl lg:text-6xl">
Connectez votre exploitation agricole
</h1>
<p class="mt-3 max-w-md mx-auto text-lg text-blue-100 sm:text-xl md:mt-5 md:max-w-3xl">
Agriconect simplifie la gestion de votre activité agricole, connecte les acteurs du secteur et optimise vos processus.
</p>
<div class="mt-8 sm:flex sm:justify-center lg:justify-start">
<div class="rounded-md shadow">
<button class="w-full flex items-center justify-center px-8 py-3 border border-transparent text-base font-medium rounded-md text-blue-700 bg-white hover:bg-gray-50 md:py-4 md:text-lg md:px-10" id="hero-register-btn">
Commencez maintenant
</button>
</div>
<div class="mt-3 rounded-md shadow sm:mt-0 sm:ml-3">
<button class="w-full flex items-center justify-center px-8 py-3 border border-transparent text-base font-medium rounded-md text-white bg-blue-600 bg-opacity-60 hover:bg-opacity-70 md:py-4 md:text-lg md:px-10" id="hero-learn-btn">
En savoir plus
</button>
</div>
</div>
</div>
<div class="relative">
<div class="relative rounded-lg shadow-xl overflow-hidden bg-white bg-opacity-10 backdrop-filter backdrop-blur-sm p-6">
<h3 class="text-lg font-medium text-white mb-4">Accédez à votre compte</h3>
<form class="space-y-4">
<div>
<label for="email" class="sr-only">Email</label>
<input id="email" name="email" type="email" autocomplete="email" required class="w-full px-4 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500" placeholder="Adresse email">
</div>
<div>
<label for="password" class="sr-only">Mot de passe</label>
<input id="password" name="password" type="password" autocomplete="current-password" required class="w-full px-4 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500" placeholder="Mot de passe">
</div>
<div class="flex items-center justify-between">
<div class="flex items-center">
<input id="remember-me" name="remember-me" type="checkbox" class="h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded">
<label for="remember-me" class="ml-2 block text-sm text-white">
Se souvenir de moi
</label>
</div>
<div class="text-sm">
<a href="#" class="font-medium text-white hover:text-blue-200">
Mot de passe oublié?
</a>
</div>
</div>
<div>
<button type="submit" class="w-full flex justify-center py-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-blue-600 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500">
Se connecter
</button>
</div>
</form>
<p class="mt-4 text-center text-sm text-white">
Nouveau sur Agriconect?{' '}
<a href="#" class="font-medium text-white hover:text-blue-200" id="hero-register-link">
Créez un compte
</a>
</p>
</div>
</div>
</div>
</div>
</div>
<!-- Features Section -->
<div class="py-12 bg-white">
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div class="lg:text-center">
<h2 class="text-base text-blue-600 font-semibold tracking-wide uppercase">Fonctionnalités</h2>
<p class="mt-2 text-3xl leading-8 font-extrabold tracking-tight text-gray-900 sm:text-4xl">
Une meilleure façon de gérer votre exploitation
</p>
<p class="mt-4 max-w-2xl text-xl text-gray-500 lg:mx-auto">
Agriconect offre des outils puissants pour optimiser votre activité agricole.
</p>
</div>
<div class="mt-10">
<div class="dashboard-grid">
<div class="bg-white p-6 rounded-lg shadow-md hover:shadow-lg transition duration-300">
<div class="flex items-center justify-center h-12 w-12 rounded-md bg-blue-500 text-white mb-4">
<i class="fas fa-users text-xl"></i>
</div>
<h3 class="text-lg font-medium text-gray-900 mb-2">Gestion des membres</h3>
<p class="text-gray-500">
Gérez facilement les membres de votre coopérative ou exploitation avec des outils dédiés.
</p>
</div>
<div class="bg-white p-6 rounded-lg shadow-md hover:shadow-lg transition duration-300">
<div class="flex items-center justify-center h-12 w-12 rounded-md bg-green-500 text-white mb-4">
<i class="fas fa-chart-line text-xl"></i>
</div>
<h3 class="text-lg font-medium text-gray-900 mb-2">Analytique</h3>
<p class="text-gray-500">
Suivez vos performances avec des tableaux de bord et des rapports personnalisés.
</p>
</div>
<div class="bg-white p-6 rounded-lg shadow-md hover:shadow-lg transition duration-300">
<div class="flex items-center justify-center h-12 w-12 rounded-md bg-yellow-500 text-white mb-4">
<i class="fas fa-calendar-alt text-xl"></i>
</div>
<h3 class="text-lg font-medium text-gray-900 mb-2">Planification</h3>
<p class="text-gray-500">
Planifiez vos activités agricoles et synchronisez-les avec votre équipe.
</p>
</div>
<div class="bg-white p-6 rounded-lg shadow-md hover:shadow-lg transition duration-300">
<div class="flex items-center justify-center h-12 w-12 rounded-md bg-purple-500 text-white mb-4">
<i class="fas fa-exchange-alt text-xl"></i>
</div>
<h3 class="text-lg font-medium text-gray-900 mb-2">Synchronisation</h3>
<p class="text-gray-500">
Accédez à vos données depuis n'importe où avec notre application mobile synchronisée.
</p>
</div>
</div>
</div>
</div>
</div>
<!-- Registration Modal -->
<div class="fixed z-50 inset-0 overflow-y-auto hidden" id="registration-modal">
<div class="flex items-center justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0">
<div class="fixed inset-0 transition-opacity" aria-hidden="true">
<div class="absolute inset-0 bg-gray-500 opacity-75"></div>
</div>
<span class="hidden sm:inline-block sm:align-middle sm:h-screen" aria-hidden="true">​</span>
<div class="inline-block align-bottom bg-white rounded-lg text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:align-middle sm:max-w-lg sm:w-full">
<div class="bg-white px-4 pt-5 pb-4 sm:p-6 sm:pb-4">
<div class="sm:flex sm:items-start">
<div class="mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full">
<div class="flex justify-between items-center mb-4">
<h3 class="text-lg leading-6 font-medium text-gray-900" id="modal-title">
Créer un compte Agriconect
</h3>
<button type="button" class="text-gray-400 hover:text-gray-500 focus:outline-none" id="close-registration-modal">
<i class="fas fa-times"></i>
</button>
</div>
<div class="mt-2">
<form class="space-y-4" id="registration-form">
<div>
<label for="user-type" class="block text-sm font-medium text-gray-700">Type de compte</label>
<select id="user-type" name="user-type" class="mt-1 block w-full pl-3 pr-10 py-2 text-base border-gray-300 focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm rounded-md">
<option value="farmer">Agriculteur</option>
<option value="cooperative">Coopérative</option>
<option value="supplier">Fournisseur</option>
<option value="advisor">Conseiller agricole</option>
</select>
</div>
<div class="grid grid-cols-2 gap-4">
<div>
<label for="first-name" class="block text-sm font-medium text-gray-700">Prénom</label>
<input type="text" name="first-name" id="first-name" autocomplete="given-name" class="mt-1 focus:ring-blue-500 focus:border-blue-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md form-input">
</div>
<div>
<label for="last-name" class="block text-sm font-medium text-gray-700">Nom</label>
<input type="text" name="last-name" id="last-name" autocomplete="family-name" class="mt-1 focus:ring-blue-500 focus:border-blue-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md form-input">
</div>
</div>
<div>
<label for="email" class="block text-sm font-medium text-gray-700">Email</label>
<input type="email" name="email" id="reg-email" autocomplete="email" class="mt-1 focus:ring-blue-500 focus:border-blue-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md form-input">
</div>
<div>
<label for="phone" class="block text-sm font-medium text-gray-700">Téléphone</label>
<input type="tel" name="phone" id="phone" autocomplete="tel" class="mt-1 focus:ring-blue-500 focus:border-blue-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md form-input">
</div>
<div>
<label for="password" class="block text-sm font-medium text-gray-700">Mot de passe</label>
<input type="password" name="password" id="reg-password" autocomplete="new-password" class="mt-1 focus:ring-blue-500 focus:border-blue-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md form-input">
<p class="mt-1 text-xs text-gray-500">8 caractères minimum avec au moins un chiffre et une majuscule</p>
</div>
<div>
<label for="confirm-password" class="block text-sm font-medium text-gray-700">Confirmer le mot de passe</label>
<input type="password" name="confirm-password" id="confirm-password" autocomplete="new-password" class="mt-1 focus:ring-blue-500 focus:border-blue-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md form-input">
</div>
<div class="flex items-start">
<div class="flex items-center h-5">
<input id="terms" name="terms" type="checkbox" class="focus:ring-blue-500 h-4 w-4 text-blue-600 border-gray-300 rounded">
</div>
<div class="ml-3 text-sm">
<label for="terms" class="font-medium text-gray-700">J'accepte les <a href="#" class="text-blue-600 hover:text-blue-500">conditions d'utilisation</a> et la <a href="#" class="text-blue-600 hover:text-blue-500">politique de confidentialité</a></label>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
<div class="bg-gray-50 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse">
<button type="button" class="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-green-600 text-base font-medium text-white hover:bg-green-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-green-500 sm:ml-3 sm:w-auto sm:text-sm" id="submit-registration">
S'inscrire
</button>
<button type="button" class="mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm" id="cancel-registration">
Annuler
</button>
</div>
</div>
</div>
</div>
<!-- Login Modal -->
<div class="fixed z-50 inset-0 overflow-y-auto hidden" id="login-modal">
<div class="flex items-center justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0">
<div class="fixed inset-0 transition-opacity" aria-hidden="true">
<div class="absolute inset-0 bg-gray-500 opacity-75"></div>
</div>
<span class="hidden sm:inline-block sm:align-middle sm:h-screen" aria-hidden="true">​</span>
<div class="inline-block align-bottom bg-white rounded-lg text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:align-middle sm:max-w-md sm:w-full">
<div class="bg-white px-4 pt-5 pb-4 sm:p-6 sm:pb-4">
<div class="sm:flex sm:items-start">
<div class="mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full">
<div class="flex justify-between items-center mb-4">
<h3 class="text-lg leading-6 font-medium text-gray-900">
Connexion à Agriconect
</h3>
<button type="button" class="text-gray-400 hover:text-gray-500 focus:outline-none" id="close-login-modal">
<i class="fas fa-times"></i>
</button>
</div>
<div class="mt-2">
<form class="space-y-4" id="login-form">
<div>
<label for="login-email" class="block text-sm font-medium text-gray-700">Email</label>
<input type="email" name="email" id="login-email" autocomplete="email" required class="mt-1 focus:ring-blue-500 focus:border-blue-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md form-input">
</div>
<div>
<label for="login-password" class="block text-sm font-medium text-gray-700">Mot de passe</label>
<input type="password" name="password" id="login-password" autocomplete="current-password" required class="mt-1 focus:ring-blue-500 focus:border-blue-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md form-input">
</div>
<div class="flex items-center justify-between">
<div class="flex items-center">
<input id="remember-me" name="remember-me" type="checkbox" class="h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded">
<label for="remember-me" class="ml-2 block text-sm text-gray-700">
Se souvenir de moi
</label>
</div>
<div class="text-sm">
<a href="#" class="font-medium text-blue-600 hover:text-blue-500">
Mot de passe oublié?
</a>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
<div class="bg-gray-50 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse">
<button type="button" class="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-blue-600 text-base font-medium text-white hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 sm:ml-3 sm:w-auto sm:text-sm" id="submit-login">
Se connecter
</button>
<button type="button" class="mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm" id="cancel-login">
Annuler
</button>
</div>
</div>
</div>
</div>
<!-- Dashboard (Hidden by default) -->
<div class="hidden" id="dashboard">
<div class="flex h-screen bg-gray-100">
<!-- Sidebar -->
<div class="sidebar bg-white w-64 shadow-md">
<div class="flex items-center justify-center h-16 bg-blue-600">
<span class="text-white font-bold">Agriconect Dashboard</span>
<button class="sm:hidden ml-auto mr-4 text-white" id="close-sidebar">
<i class="fas fa-times"></i>
</button>
</div>
<div class="px-4 py-6">
<div class="flex items-center space-x-4 p-2 rounded-lg bg-blue-50">
<div class="h-10 w-10 rounded-full bg-blue-100 flex items-center justify-center text-blue-600">
<i class="fas fa-user"></i>
</div>
<div>
<p class="font-medium" id="user-name">Jean Dupont</p>
<p class="text-sm text-gray-500" id="user-role">Agriculteur</p>
</div>
</div>
<nav class="mt-8">
<div>
<h3 class="px-3 text-xs font-semibold text-gray-500 uppercase tracking-wider">Général</h3>
<div class="mt-2 space-y-1">
<a href="#" class="group flex items-center px-3 py-2 text-sm font-medium rounded-md text-blue-700 bg-blue-50" id="dashboard-link">
<i class="fas fa-tachometer-alt mr-3 text-blue-500"></i>
Tableau de bord
</a>
<a href="#" class="group flex items-center px-3 py-2 text-sm font-medium rounded-md text-gray-600 hover:text-gray-900 hover:bg-gray-50" id="profile-link">
<i class="fas fa-user mr-3 text-gray-400 group-hover:text-gray-500"></i>
Profil
</a>
<a href="#" class="group flex items-center px-3 py-2 text-sm font-medium rounded-md text-gray-600 hover:text-gray-900 hover:bg-gray-50" id="members-link">
<i class="fas fa-users mr-3 text-gray-400 group-hover:text-gray-500"></i>
Membres
</a>
</div>
</div>
<div class="mt-8">
<h3 class="px-3 text-xs font-semibold text-gray-500 uppercase tracking-wider">Activités</h3>
<div class="mt-2 space-y-1">
<a href="#" class="group flex items-center px-3 py-2 text-sm font-medium rounded-md text-gray-600 hover:text-gray-900 hover:bg-gray-50" id="calendar-link">
<i class="fas fa-calendar mr-3 text-gray-400 group-hover:text-gray-500"></i>
Calendrier
</a>
<a href="#" class="group flex items-center px-3 py-2 text-sm font-medium rounded-md text-gray-600 hover:text-gray-900 hover:bg-gray-50" id="tasks-link">
<i class="fas fa-tasks mr-3 text-gray-400 group-hover:text-gray-500"></i>
Tâches
</a>
<a href="#" class="group flex items-center px-3 py-2 text-sm font-medium rounded-md text-gray-600 hover:text-gray-900 hover:bg-gray-50" id="reports-link">
<i class="fas fa-chart-pie mr-3 text-gray-400 group-hover:text-gray-500"></i>
Rapports
</a>
</div>
</div>
<div class="mt-8">
<h3 class="px-3 text-xs font-semibold text-gray-500 uppercase tracking-wider">Paramètres</h3>
<div class="mt-2 space-y-1">
<a href="#" class="group flex items-center px-3 py-2 text-sm font-medium rounded-md text-gray-600 hover:text-gray-900 hover:bg-gray-50" id="settings-link">
<i class="fas fa-cog mr-3 text-gray-400 group-hover:text-gray-500"></i>
Paramètres
</a>
<a href="#" class="group flex items-center px-3 py-2 text-sm font-medium rounded-md text-gray-600 hover:text-gray-900 hover:bg-gray-50" id="help-link">
<i class="fas fa-question-circle mr-3 text-gray-400 group-hover:text-gray-500"></i>
Aide
</a>
<a href="#" class="group flex items-center px-3 py-2 text-sm font-medium rounded-md text-gray-600 hover:text-gray-900 hover:bg-gray-50" id="logout-link">
<i class="fas fa-sign-out-alt mr-3 text-gray-400 group-hover:text-gray-500"></i>
Déconnexion
</a>
</div>
</div>
</nav>
</div>
</div>
<!-- Main content -->
<div class="flex-1 flex flex-col overflow-hidden">
<!-- Top bar -->
<header class="bg-white shadow-sm">
<div class="flex items-center justify-between px-6 py-3">
<div class="flex items-center">
<button class="sm:hidden text-gray-500 focus:outline-none" id="open-sidebar">
<i class="fas fa-bars"></i>
</button>
<h1 class="ml-4 text-xl font-semibold text-gray-900" id="dashboard-title">Tableau de bord</h1>
</div>
<div class="flex items-center space-x-4">
<button class="p-1 rounded-full text-gray-400 hover:text-gray-500 focus:outline-none">
<span class="sr-only">Notifications</span>
<i class="fas fa-bell"></i>
</button>
<div class="relative">
<button class="flex items-center space-x-2 focus:outline-none" id="user-menu-button">
<span class="sr-only">Ouvrir le menu utilisateur</span>
<div class="h-8 w-8 rounded-full bg-blue-100 flex items-center justify-center text-blue-600">
<i class="fas fa-user"></i>
</div>
<span class="hidden md:block" id="user-short-name">Jean D.</span>
</button>
<div class="hidden origin-top-right absolute right-0 mt-2 w-48 rounded-md shadow-lg py-1 bg-white ring-1 ring-black ring-opacity-5 focus:outline-none" id="user-menu">
<a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100">Votre profil</a>
<a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100">Paramètres</a>
<a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100">Déconnexion</a>
</div>
</div>
</div>
</div>
</header>
<!-- Dashboard content -->
<main class="flex-1 overflow-y-auto p-6 bg-gray-50">
<div class="mb-6">
<h2 class="text-2xl font-semibold text-gray-800">Bienvenue, <span id="welcome-name">Jean</span>!</h2>
<p class="text-gray-600">Voici un aperçu de votre activité.</p>
</div>
<!-- Stats -->
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-6">
<div class="bg-white rounded-lg shadow p-6">
<div class="flex items-center">
<div class="p-3 rounded-full bg-blue-100 text-blue-600 mr-4">
<i class="fas fa-users"></i>
</div>
<div>
<p class="text-sm font-medium text-gray-500">Membres</p>
<p class="text-2xl font-semibold text-gray-800">24</p>
</div>
</div>
</div>
<div class="bg-white rounded-lg shadow p-6">
<div class="flex items-center">
<div class="p-3 rounded-full bg-green-100 text-green-600 mr-4">
<i class="fas fa-calendar-check"></i>
</div>
<div>
<p class="text-sm font-medium text-gray-500">Activités ce mois</p>
<p class="text-2xl font-semibold text-gray-800">12</p>
</div>
</div>
</div>
<div class="bg-white rounded-lg shadow p-6">
<div class="flex items-center">
<div class="p-3 rounded-full bg-yellow-100 text-yellow-600 mr-4">
<i class="fas fa-tasks"></i>
</div>
<div>
<p class="text-sm font-medium text-gray-500">Tâches en cours</p>
<p class="text-2xl font-semibold text-gray-800">5</p>
</div>
</div>
</div>
<div class="bg-white rounded-lg shadow p-6">
<div class="flex items-center">
<div class="p-3 rounded-full bg-purple-100 text-purple-600 mr-4">
<i class="fas fa-chart-line"></i>
</div>
<div>
<p class="text-sm font-medium text-gray-500">Performance</p>
<p class="text-2xl font-semibold text-gray-800">78%</p>
</div>
</div>
</div>
</div>
<!-- Recent activities and members -->
<div class="grid grid-cols-1 lg:grid-cols-2 gap-6">
<div class="bg-white rounded-lg shadow overflow-hidden">
<div class="px-6 py-4 border-b border-gray-200">
<h3 class="text-lg font-medium text-gray-900">Activités récentes</h3>
</div>
<div class="divide-y divide-gray-200">
<div class="px-6 py-4">
<div class="flex items-center">
<div class="flex-shrink-0 h-10 w-10 rounded-full bg-blue-100 flex items-center justify-center text-blue-600">
<i class="fas fa-seedling"></i>
</div>
<div class="ml-4">
<p class="text-sm font-medium text-gray-900">Semis de blé</p>
<p class="text-sm text-gray-500">Complété aujourd'hui</p>
</div>
</div>
</div>
<div class="px-6 py-4">
<div class="flex items-center">
<div class="flex-shrink-0 h-10 w-10 rounded-full bg-green-100 flex items-center justify-center text-green-600">
<i class="fas fa-tractor"></i>
</div>
<div class="ml-4">
<p class="text-sm font-medium text-gray-900">Labour du champ B</p>
<p class="text-sm text-gray-500">Planifié pour demain</p>
</div>
</div>
</div>
<div class="px-6 py-4">
<div class="flex items-center">
<div class="flex-shrink-0 h-10 w-10 rounded-full bg-yellow-100 flex items-center justify-center text-yellow-600">
<i class="fas fa-shipping-fast"></i>
</div>
<div class="ml-4">
<p class="text-sm font-medium text-gray-900">Livraison d'engrais</p>
<p class="text-sm text-gray-500">En attente de confirmation</p>
</div>
</div>
</div>
</div>
<div class="px-6 py-4 bg-gray-50 text-right">
<a href="#" class="text-sm font-medium text-blue-600 hover:text-blue-500">Voir toutes les activités</a>
</div>
</div>
<div class="bg-white rounded-lg shadow overflow-hidden">
<div class="px-6 py-4 border-b border-gray-200">
<h3 class="text-lg font-medium text-gray-900">Membres récents</h3>
</div>
<div class="divide-y divide-gray-200">
<div class="px-6 py-4">
<div class="flex items-center">
<div class="flex-shrink-0">
<img class="h-10 w-10 rounded-full" src="https://images.unsplash.com/photo-1494790108377-be9c29b29330?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=4&w=256&h=256&q=60" alt="">
</div>
<div class="ml-4">
<p class="text-sm font-medium text-gray-900">Marie Lambert</p>
<p class="text-sm text-gray-500">Agricultrice</p>
</div>
</div>
</div>
<div class="px-6 py-4">
<div class="flex items-center">
<div class="flex-shrink-0">
<img class="h-10 w-10 rounded-full" src="https://images.unsplash.com/photo-1519244703995-f4e0f30006d5?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=4&w=256&h=256&q=60" alt="">
</div>
<div class="ml-4">
<p class="text-sm font-medium text-gray-900">Pierre Dubois</p>
<p class="text-sm text-gray-500">Fournisseur</p>
</div>
</div>
</div>
<div class="px-6 py-4">
<div class="flex items-center">
<div class="flex-shrink-0">
<img class="h-10 w-10 rounded-full" src="https://images.unsplash.com/photo-1506794778202-cad84cf45f1d?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=4&w=256&h=256&q=60" alt="">
</div>
<div class="ml-4">
<p class="text-sm font-medium text-gray-900">Thomas Martin</p>
<p class="text-sm text-gray-500">Conseiller agricole</p>
</div>
</div>
</div>
</div>
<div class="px-6 py-4 bg-gray-50 text-right">
<a href="#" class="text-sm font-medium text-blue-600 hover:text-blue-500">Voir tous les membres</a>
</div>
</div>
</div>
</main>
</div>
</div>
</div>
<!-- Footer -->
<footer class="bg-gray-800">
<div class="max-w-7xl mx-auto py-12 px-4 sm:px-6 lg:px-8">
<div class="grid grid-cols-2 md:grid-cols-4 gap-8">
<div>
<h3 class="text-sm font-semibold text-gray-300 tracking-wider uppercase">Agriconect</h3>
<ul class="mt-4 space-y-4">
<li><a href="#" class="text-base text-gray-400 hover:text-white">À propos</a></li>
<li><a href="#" class="text-base text-gray-400 hover:text-white">Carrières</a></li>
<li><a href="#" class="text-base text-gray-400 hover:text-white">Blog</a></li>
</ul>
</div>
<div>
<h3 class="text-sm font-semibold text-gray-300 tracking-wider uppercase">Support</h3>
<ul class="mt-4 space-y-4">
<li><a href="#" class="text-base text-gray-400 hover:text-white">Centre d'aide</a></li>
<li><a href="#" class="text-base text-gray-400 hover:text-white">Sécurité</a></li>
<li><a href="#" class="text-base text-gray-400 hover:text-white">API</a></li>
</ul>
</div>
<div>
<h3 class="text-sm font-semibold text-gray-300 tracking-wider uppercase">Légal</h3>
<ul class="mt-4 space-y-4">
<li><a href="#" class="text-base text-gray-400 hover:text-white">Confidentialité</a></li>
<li><a href="#" class="text-base text-gray-400 hover:text-white">Conditions</a></li>
<li><a href="#" class="text-base text-gray-400 hover:text-white">Politique cookies</a></li>
</ul>
</div>
<div>
<h3 class="text-sm font-semibold text-gray-300 tracking-wider uppercase">Contact</h3>
<ul class="mt-4 space-y-4">
<li><a href="#" class="text-base text-gray-400 hover:text-white">contact@agriconect.fr</a></li>
<li><a href="#" class="text-base text-gray-400 hover:text-white">+33 1 23 45 67 89</a></li>
<li class="flex space-x-4">
<a href="#" class="text-gray-400 hover:text-white">
<i class="fab fa-facebook-f"></i>
</a>
<a href="#" class="text-gray-400 hover:text-white">
<i class="fab fa-twitter"></i>
</a>
<a href="#" class="text-gray-400 hover:text-white">
<i class="fab fa-instagram"></i>
</a>
<a href="#" class="text-gray-400 hover:text-white">
<i class="fab fa-linkedin-in"></i>
</a>
</li>
</ul>
</div>
</div>
<div class="mt-8 border-t border-gray-700 pt-8 md:flex md:items-center md:justify-between">
<div class="flex space-x-6 md:order-2">
<a href="#" class="text-gray-400 hover:text-white">
<i class="fab fa-apple text-xl"></i>
</a>
<a href="#" class="text-gray-400 hover:text-white">
<i class="fab fa-google-play text-xl"></i>
</a>
</div>
<p class="mt-8 text-base text-gray-400 md:mt-0 md:order-1">
© 2023 Agriconect. Tous droits réservés.
</p>
</div>
</div>
</footer>
<!-- Success Notification -->
<div class="fixed bottom-4 right-4 hidden" id="success-notification">
<div class="bg-green-500 text-white px-4 py-3 rounded-lg shadow-lg flex items-center">
<i class="fas fa-check-circle mr-2"></i>
<span id="success-message">Opération réussie!</span>
<button class="ml-4 focus:outline-none" id="close-success-notification">
<i class="fas fa-times"></i>
</button>
</div>
</div>
<!-- Error Notification -->
<div class="fixed bottom-4 right-4 hidden" id="error-notification">
<div class="bg-red-500 text-white px-4 py-3 rounded-lg shadow-lg flex items-center">
<i class="fas fa-exclamation-circle mr-2"></i>
<span id="error-message">Une erreur est survenue!</span>
<button class="ml-4 focus:outline-none" id="close-error-notification">
<i class="fas fa-times"></i>
</button>
</div>
</div>
<script>
// DOM Elements
const mobileMenuBtn = document.getElementById('mobile-menu-btn');
const mobileMenu = document.getElementById('mobile-menu');
const loginBtn = document.getElementById('login-btn');
const registerBtn = document.getElementById('register-btn');
const heroRegisterBtn = document.getElementById('hero-register-btn');
const heroRegisterLink = document.getElementById('hero-register-link');
const heroLearnBtn = document.getElementById('hero-learn-btn');
const registrationModal = document.getElementById('registration-modal');
const loginModal = document.getElementById('login-modal');
const closeRegistrationModal = document.getElementById('close-registration-modal');
const closeLoginModal = document.getElementById('close-login-modal');
const cancelRegistration = document.getElementById('cancel-registration');
const cancelLogin = document.getElementById('cancel-login');
const submitRegistration = document.getElementById('submit-registration');
const submitLogin = document.getElementById('submit-login');
const registrationForm = document.getElementById('registration-form');
const loginForm = document.getElementById('login-form');
const dashboard = document.getElementById('dashboard');
const openSidebar = document.getElementById('open-sidebar');
const closeSidebar = document.getElementById('close-sidebar');
const sidebar = document.querySelector('.sidebar');
const userMenuButton = document.getElementById('user-menu-button');
const userMenu = document.getElementById('user-menu');
const successNotification = document.getElementById('success-notification');
const errorNotification = document.getElementById('error-notification');
const closeSuccessNotification = document.getElementById('close-success-notification');
const closeErrorNotification = document.getElementById('close-error-notification');
// Event Listeners
mobileMenuBtn.addEventListener('click', toggleMobileMenu);
loginBtn.addEventListener('click', () => showModal(loginModal));
registerBtn.addEventListener('click', () => showModal(registrationModal));
heroRegisterBtn.addEventListener('click', () => showModal(registrationModal));
heroRegisterLink.addEventListener('click', () => showModal(registrationModal));
heroLearnBtn.addEventListener('click', scrollToFeatures);
closeRegistrationModal.addEventListener('click', () => hideModal(registrationModal));
closeLoginModal.addEventListener('click', () => hideModal(loginModal));
cancelRegistration.addEventListener('click', () => hideModal(registrationModal));
cancelLogin.addEventListener('click', () => hideModal(loginModal));
submitRegistration.addEventListener('click', handleRegistration);
submitLogin.addEventListener('click', handleLogin);
openSidebar.addEventListener('click', () => sidebar.classList.add('open'));
closeSidebar.addEventListener('click', () => sidebar.classList.remove('open'));
userMenuButton.addEventListener('click', toggleUserMenu);
closeSuccessNotification.addEventListener('click', () => successNotification.classList.add('hidden'));
closeErrorNotification.addEventListener('click', () => errorNotification.classList.add('hidden'));
// Functions
function toggleMobileMenu() {
mobileMenu.classList.toggle('hidden');
}
function showModal(modal) {
modal.classList.remove('hidden');
document.body.style.overflow = 'hidden';
}
function hideModal(modal) {
modal.classList.add('hidden');
document.body.style.overflow = 'auto';
}
function scrollToFeatures() {
const featuresSection = document.querySelector('.lg:text-center');
featuresSection.scrollIntoView({ behavior: 'smooth' });
}
function toggleUserMenu() {
userMenu.classList.toggle('hidden');
}
function showSuccessNotification(message) {
document.getElementById('success-message').textContent = message;
successNotification.classList.remove('hidden');
setTimeout(() => successNotification.classList.add('hidden'), 5000);
}
function showErrorNotification(message) {
document.getElementById('error-message').textContent = message;
errorNotification.classList.remove('hidden');
setTimeout(() => errorNotification.classList.add('hidden'), 5000);
}
function handleRegistration() {
// Validate form
const userType = document.getElementById('user-type').value;
const firstName = document.getElementById('first-name').value;
const lastName = document.getElementById('last-name').value;
const email = document.getElementById('reg-email').value;
const phone = document.getElementById('phone').value;
const password = document.getElementById('reg-password').value;
const confirmPassword = document.getElementById('confirm-password').value;
const terms = document.getElementById('terms').checked;
if (!firstName || !lastName || !email || !phone || !password || !confirmPassword) {
showErrorNotification('Veuillez remplir tous les champs obligatoires.');
return;
}
if (password !== confirmPassword) {
showErrorNotification('Les mots de passe ne correspondent pas.');
return;
}
if (password.length < 8 || !/\d/.test(password) || !/[A-Z]/.test(password)) {
showErrorNotification('Le mot de passe doit contenir au moins 8 caractères, un chiffre et une majuscule.');
return;
}
if (!terms) {
showErrorNotification('Veuillez accepter les conditions d\'utilisation.');
return;
}
// In a real app, you would send this data to your backend
// For this demo, we'll simulate a successful registration
setTimeout(() => {
hideModal(registrationModal);
showSuccessNotification('Inscription réussie! Bienvenue sur Agriconect.');
// Simulate user data
document.getElementById('user-name').textContent = `${firstName} ${lastName}`;
document.getElementById('user-short-name').textContent = `${firstName} ${lastName.charAt(0)}.`;
document.getElementById('welcome-name').textContent = firstName;
document.getElementById('user-role').textContent =
userType === 'farmer' ? 'Agriculteur' :
userType === 'cooperative' ? 'Coopérative' :
userType === 'supplier' ? 'Fournisseur' : 'Conseiller agricole';
// Show dashboard
dashboard.classList.remove('hidden');
}, 1000);
}
function handleLogin() {
const email = document.getElementById('login-email').value;
const password = document.getElementById('login-password').value;
if (!email || !password) {
showErrorNotification('Veuillez entrer votre email et mot de passe.');
return;
}
// In a real app, you would validate credentials with your backend
// For this demo, we'll simulate a successful login
setTimeout(() => {
hideModal(loginModal);
showSuccessNotification('Connexion réussie! Bienvenue de retour.');
// Show dashboard with demo data
dashboard.classList.remove('hidden');
}, 1000);
}
// Close modals when clicking outside
window.addEventListener('click', (e) => {
if (e.target === registrationModal) {
hideModal(registrationModal);
}
if (e.target === loginModal) {
hideModal(loginModal);
}
if (!userMenu.contains(e.target) && e.target !== userMenuButton) {
userMenu.classList.add('hidden');
}
});
// Close mobile menu when clicking a link
document.querySelectorAll('#mobile-menu a').forEach(link => {
link.addEventListener('click', () => {
mobileMenu.classList.add('hidden');
});
});
// Dashboard navigation
document.querySelectorAll('#dashboard a').forEach(link => {
link.addEventListener('click', (e) => {
e.preventDefault();
const id = e.currentTarget.id;
// Update active state
document.querySelectorAll('#dashboard a').forEach(navLink => {
navLink.classList.remove('text-blue-700', 'bg-blue-50');
navLink.classList.add('text-gray-600', 'hover:text-gray-900', 'hover:bg-gray-50');
const icon = navLink.querySelector('i');
if (icon) {
icon.classList.remove('text-blue-500');
icon.classList.add('text-gray-400', 'group-hover:text-gray-500');
}
});
e.currentTarget.classList.add('text-blue-700', 'bg-blue-50');
e.currentTarget.classList.remove('text-gray-600', 'hover:text-gray-900', 'hover:bg-gray-50');
const icon = e.currentTarget.querySelector('i');
if (icon) {
icon.classList.add('text-blue-500');
icon.classList.remove('text-gray-400', 'group-hover:text-gray-500');
}
// Update dashboard title
if (id === 'dashboard-link') {
document.getElementById('dashboard-title').textContent = 'Tableau de bord';
} else if (id === 'profile-link') {
document.getElementById('dashboard-title').textContent = 'Profil';
} else if (id === 'members-link') {
document.getElementById('dashboard-title').textContent = 'Membres';
} else if (id === 'calendar-link') {
document.getElementById('dashboard-title').textContent = 'Calendrier';
} else if (id === 'tasks-link') {
document.getElementById('dashboard-title').textContent = 'Tâches';
} else if (id === 'reports-link') {
document.getElementById('dashboard-title').textContent = 'Rapports';
} else if (id === 'settings-link') {
document.getElementById('dashboard-title').textContent = 'Paramètres';
} else if (id === 'help-link') {
document.getElementById('dashboard-title').textContent = 'Aide';
} else if (id === 'logout-link') {
dashboard.classList.add('hidden');
showSuccessNotification('Déconnexion réussie. À bientôt!');
}
// On mobile, close sidebar after navigation
if (window.innerWidth <= 768) {
sidebar.classList.remove('open');
}
});
});
// Form validation
registrationForm.addEventListener('submit', (e) => {
e.preventDefault();
handleRegistration();
});
loginForm.addEventListener('submit', (e) => {
e.preventDefault();
handleLogin();
});
// Demo data for dashboard
if (dashboard.classList.contains('hidden')) {
// If not logged in, hide dashboard
dashboard.classList.add('hidden');
}
</script>
<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=SDenzel/agriconect" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html> |