File size: 60,069 Bytes
8628b2d |
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 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>CookMaster - Beginner Cooking App</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>
/* Custom animations */
@keyframes fadeIn {
from { opacity: 0; }
to { opacity: 1; }
}
.fade-in {
animation: fadeIn 0.5s ease-in-out;
}
/* Custom scrollbar */
::-webkit-scrollbar {
width: 8px;
}
::-webkit-scrollbar-track {
background: #f1f1f1;
border-radius: 10px;
}
::-webkit-scrollbar-thumb {
background: #888;
border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
background: #555;
}
/* Custom checkbox */
.custom-checkbox input:checked ~ .checkmark {
background-color: #10B981;
border-color: #10B981;
}
.custom-checkbox input:checked ~ .checkmark:after {
display: block;
}
.custom-checkbox .checkmark:after {
content: "";
position: absolute;
left: 6px;
top: 2px;
width: 5px;
height: 10px;
border: solid white;
border-width: 0 2px 2px 0;
transform: rotate(45deg);
}
/* Pulse animation for active buttons */
@keyframes pulse {
0% { transform: scale(1); }
50% { transform: scale(1.05); }
100% { transform: scale(1); }
}
.pulse {
animation: pulse 2s infinite;
}
</style>
</head>
<body class="bg-gray-50 font-sans">
<!-- App Container -->
<div id="app" class="max-w-md mx-auto bg-white shadow-lg rounded-lg overflow-hidden min-h-screen">
<!-- Header -->
<header class="bg-emerald-600 text-white p-4 flex justify-between items-center">
<button id="back-btn" class="text-white invisible">
<i class="fas fa-arrow-left text-xl"></i>
</button>
<h1 class="text-xl font-bold">CookMaster</h1>
<button id="profile-btn" class="text-white">
<i class="fas fa-user text-xl"></i>
</button>
</header>
<!-- Main Content Area - Screens will be loaded here -->
<main id="screen-container" class="p-4 pb-20 overflow-y-auto" style="height: calc(100vh - 128px);">
<!-- Onboarding Screen (Default) -->
<div id="onboarding-screen" class="fade-in">
<div class="text-center mb-8">
<img src="https://cdn-icons-png.flaticon.com/512/2933/2933245.png" alt="CookMaster Logo" class="w-32 h-32 mx-auto mb-4">
<h2 class="text-2xl font-bold text-gray-800 mb-2">Welcome to CookMaster</h2>
<p class="text-gray-600">Your personal cooking assistant to help you master the kitchen!</p>
</div>
<div class="bg-emerald-50 rounded-lg p-6 mb-6">
<h3 class="font-semibold text-emerald-800 mb-3">Let's get started</h3>
<p class="text-gray-700 mb-4">Tell us about your preferences so we can recommend the best recipes for you.</p>
<div class="space-y-4">
<div>
<label class="block text-gray-700 mb-1">Dietary Preferences</label>
<div class="flex flex-wrap gap-2">
<button class="preference-btn" data-pref="vegetarian">Vegetarian</button>
<button class="preference-btn" data-pref="vegan">Vegan</button>
<button class="preference-btn" data-pref="gluten-free">Gluten-Free</button>
<button class="preference-btn" data-pref="dairy-free">Dairy-Free</button>
</div>
</div>
<div>
<label class="block text-gray-700 mb-1">Allergies</label>
<div class="flex flex-wrap gap-2">
<button class="preference-btn" data-pref="nuts">Nuts</button>
<button class="preference-btn" data-pref="shellfish">Shellfish</button>
<button class="preference-btn" data-pref="eggs">Eggs</button>
<button class="preference-btn" data-pref="soy">Soy</button>
</div>
</div>
<div>
<label class="block text-gray-700 mb-1">Cooking Skill Level</label>
<div class="flex flex-wrap gap-2">
<button class="preference-btn active" data-pref="beginner">Beginner</button>
<button class="preference-btn" data-pref="intermediate">Intermediate</button>
<button class="preference-btn" data-pref="advanced">Advanced</button>
</div>
</div>
</div>
</div>
<button id="get-started-btn" class="w-full bg-emerald-600 hover:bg-emerald-700 text-white font-bold py-3 px-4 rounded-lg transition duration-200 pulse">
Get Started
</button>
</div>
<!-- Home Screen (Hidden by default) -->
<div id="home-screen" class="hidden fade-in">
<div class="mb-6">
<h2 class="text-xl font-bold text-gray-800 mb-2">Hello, Chef!</h2>
<p class="text-gray-600">What would you like to cook today?</p>
</div>
<!-- Daily Tip -->
<div class="bg-amber-50 border-l-4 border-amber-400 p-4 mb-6 rounded-r-lg">
<div class="flex items-start">
<div class="flex-shrink-0">
<i class="fas fa-lightbulb text-amber-500 text-xl"></i>
</div>
<div class="ml-3">
<h3 class="text-sm font-medium text-amber-800">Today's Tip</h3>
<p class="text-sm text-amber-700">Always sharpen your knives before cooking. A sharp knife is safer than a dull one!</p>
</div>
</div>
</div>
<!-- Quick Actions -->
<div class="grid grid-cols-2 gap-4 mb-6">
<button id="start-cooking-btn" class="bg-emerald-100 hover:bg-emerald-200 text-emerald-800 p-4 rounded-lg flex flex-col items-center transition duration-200">
<i class="fas fa-utensils text-3xl mb-2"></i>
<span>Start Cooking</span>
</button>
<button id="try-challenge-btn" class="bg-purple-100 hover:bg-purple-200 text-purple-800 p-4 rounded-lg flex flex-col items-center transition duration-200">
<i class="fas fa-trophy text-3xl mb-2"></i>
<span>Try a Challenge</span>
</button>
</div>
<!-- Featured Recipes -->
<div class="mb-4">
<div class="flex justify-between items-center mb-3">
<h3 class="font-bold text-gray-800">Featured Recipes</h3>
<button id="view-all-recipes-btn" class="text-emerald-600 text-sm">View All</button>
</div>
<div class="grid grid-cols-2 gap-3">
<div class="recipe-card" data-id="1">
<img src="https://images.unsplash.com/photo-1546069901-ba9590aed2c5?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxleHBsb3JlLWZlZWR8MXx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=500&q=60" alt="Avocado Toast" class="w-full h-32 object-cover rounded-lg">
<div class="p-2">
<h4 class="font-medium text-sm">Avocado Toast</h4>
<div class="flex justify-between text-xs text-gray-500 mt-1">
<span><i class="fas fa-clock"></i> 10 min</span>
<span><i class="fas fa-signal"></i> Easy</span>
</div>
</div>
</div>
<div class="recipe-card" data-id="2">
<img src="https://images.unsplash.com/photo-1512621776951-a57141f2eefd?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxleHBsb3JlLWZlZWR8Mnx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=500&q=60" alt="Vegetable Salad" class="w-full h-32 object-cover rounded-lg">
<div class="p-2">
<h4 class="font-medium text-sm">Vegetable Salad</h4>
<div class="flex justify-between text-xs text-gray-500 mt-1">
<span><i class="fas fa-clock"></i> 15 min</span>
<span><i class="fas fa-signal"></i> Easy</span>
</div>
</div>
</div>
</div>
</div>
<!-- Weekly Challenge -->
<div class="bg-gradient-to-r from-blue-50 to-indigo-50 p-4 rounded-lg">
<div class="flex items-center mb-2">
<i class="fas fa-trophy text-blue-500 mr-2"></i>
<h3 class="font-bold text-blue-800">Weekly Challenge</h3>
</div>
<p class="text-sm text-blue-700 mb-3">Master the perfect omelette this week!</p>
<button class="w-full bg-blue-500 hover:bg-blue-600 text-white text-sm font-medium py-2 px-4 rounded-lg transition duration-200">
Take the Challenge
</button>
</div>
</div>
<!-- Recipe List/Search Screen (Hidden by default) -->
<div id="recipe-list-screen" class="hidden fade-in">
<div class="mb-4">
<div class="relative">
<input type="text" placeholder="Search recipes..." class="w-full p-3 pl-10 bg-gray-100 rounded-lg focus:outline-none focus:ring-2 focus:ring-emerald-500">
<i class="fas fa-search absolute left-3 top-3.5 text-gray-400"></i>
</div>
</div>
<div class="mb-4">
<h3 class="font-bold text-gray-800 mb-2">Filter Recipes</h3>
<div class="flex overflow-x-auto pb-2">
<button class="filter-btn active" data-filter="all">All</button>
<button class="filter-btn" data-filter="breakfast">Breakfast</button>
<button class="filter-btn" data-filter="lunch">Lunch</button>
<button class="filter-btn" data-filter="dinner">Dinner</button>
<button class="filter-btn" data-filter="dessert">Dessert</button>
<button class="filter-btn" data-filter="snack">Snack</button>
</div>
</div>
<div class="space-y-4">
<div class="recipe-card" data-id="1">
<div class="flex">
<img src="https://images.unsplash.com/photo-1546069901-ba9590aed2c5?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxleHBsb3JlLWZlZWR8MXx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=500&q=60" alt="Avocado Toast" class="w-24 h-24 object-cover rounded-lg">
<div class="ml-3 flex-1">
<h4 class="font-medium">Avocado Toast</h4>
<p class="text-sm text-gray-500 mt-1">Simple, healthy and delicious breakfast</p>
<div class="flex justify-between text-xs text-gray-500 mt-2">
<span><i class="fas fa-clock"></i> 10 min</span>
<span><i class="fas fa-signal"></i> Easy</span>
<span><i class="fas fa-fire"></i> 320 cal</span>
</div>
</div>
</div>
</div>
<div class="recipe-card" data-id="2">
<div class="flex">
<img src="https://images.unsplash.com/photo-1512621776951-a57141f2eefd?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxleHBsb3JlLWZlZWR8Mnx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=500&q=60" alt="Vegetable Salad" class="w-24 h-24 object-cover rounded-lg">
<div class="ml-3 flex-1">
<h4 class="font-medium">Vegetable Salad</h4>
<p class="text-sm text-gray-500 mt-1">Fresh and crunchy summer salad</p>
<div class="flex justify-between text-xs text-gray-500 mt-2">
<span><i class="fas fa-clock"></i> 15 min</span>
<span><i class="fas fa-signal"></i> Easy</span>
<span><i class="fas fa-fire"></i> 250 cal</span>
</div>
</div>
</div>
</div>
<div class="recipe-card" data-id="3">
<div class="flex">
<img src="https://images.unsplash.com/photo-1559847844-5315695dadae?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxleHBsb3JlLWZlZWR8NHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=500&q=60" alt="Pasta" class="w-24 h-24 object-cover rounded-lg">
<div class="ml-3 flex-1">
<h4 class="font-medium">Creamy Pasta</h4>
<p class="text-sm text-gray-500 mt-1">Rich and creamy pasta dish</p>
<div class="flex justify-between text-xs text-gray-500 mt-2">
<span><i class="fas fa-clock"></i> 25 min</span>
<span><i class="fas fa-signal"></i> Medium</span>
<span><i class="fas fa-fire"></i> 450 cal</span>
</div>
</div>
</div>
</div>
<div class="recipe-card" data-id="4">
<div class="flex">
<img src="https://images.unsplash.com/photo-1565299624946-b28f40a0ae38?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxleHBsb3JlLWZlZWR8Nnx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=500&q=60" alt="Pizza" class="w-24 h-24 object-cover rounded-lg">
<div class="ml-3 flex-1">
<h4 class="font-medium">Homemade Pizza</h4>
<p class="text-sm text-gray-500 mt-1">Make your own pizza from scratch</p>
<div class="flex justify-between text-xs text-gray-500 mt-2">
<span><i class="fas fa-clock"></i> 1 hr</span>
<span><i class="fas fa-signal"></i> Hard</span>
<span><i class="fas fa-fire"></i> 600 cal</span>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Recipe Detail Screen (Hidden by default) -->
<div id="recipe-detail-screen" class="hidden fade-in">
<div class="mb-4">
<img id="recipe-detail-image" src="" alt="Recipe" class="w-full h-48 object-cover rounded-lg">
</div>
<div class="flex justify-between items-center mb-4">
<div>
<h2 id="recipe-detail-title" class="text-xl font-bold text-gray-800"></h2>
<div class="flex text-sm text-gray-500 mt-1">
<span id="recipe-detail-time" class="mr-3"><i class="fas fa-clock"></i> </span>
<span id="recipe-detail-difficulty" class="mr-3"><i class="fas fa-signal"></i> </span>
<span id="recipe-detail-calories"><i class="fas fa-fire"></i> </span>
</div>
</div>
<button id="start-cooking-detail-btn" class="bg-emerald-600 hover:bg-emerald-700 text-white font-bold py-2 px-4 rounded-lg transition duration-200">
Start
</button>
</div>
<div class="mb-6">
<p id="recipe-detail-description" class="text-gray-700"></p>
</div>
<div class="mb-6">
<h3 class="font-bold text-gray-800 mb-3 flex items-center">
<i class="fas fa-list-ul text-emerald-600 mr-2"></i> Ingredients
</h3>
<div id="ingredients-list" class="space-y-2">
<!-- Ingredients will be added here by JavaScript -->
</div>
</div>
<div>
<h3 class="font-bold text-gray-800 mb-3 flex items-center">
<i class="fas fa-list-ol text-emerald-600 mr-2"></i> Instructions
</h3>
<div id="instructions-list" class="space-y-4">
<!-- Instructions will be added here by JavaScript -->
</div>
</div>
<!-- Timer Modal (Hidden by default) -->
<div id="timer-modal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 hidden">
<div class="bg-white rounded-lg p-6 w-11/12 max-w-sm">
<div class="flex justify-between items-center mb-4">
<h3 class="font-bold text-lg">Cooking Timer</h3>
<button id="close-timer-btn" class="text-gray-500 hover:text-gray-700">
<i class="fas fa-times"></i>
</button>
</div>
<div class="text-center mb-6">
<div id="timer-display" class="text-4xl font-mono font-bold mb-2">00:00</div>
<div class="flex justify-center space-x-4">
<button id="start-timer-btn" class="bg-emerald-600 hover:bg-emerald-700 text-white font-bold py-2 px-4 rounded-lg transition duration-200">
Start
</button>
<button id="reset-timer-btn" class="bg-gray-200 hover:bg-gray-300 text-gray-800 font-bold py-2 px-4 rounded-lg transition duration-200">
Reset
</button>
</div>
</div>
<div class="flex items-center">
<input type="number" id="timer-minutes" min="1" max="120" value="5" class="w-16 p-2 border rounded-lg text-center">
<span class="mx-2">minutes</span>
<button id="set-timer-btn" class="bg-blue-500 hover:bg-blue-600 text-white font-bold py-2 px-4 rounded-lg transition duration-200 ml-auto">
Set
</button>
</div>
</div>
</div>
</div>
<!-- Tips & Tricks Screen (Hidden by default) -->
<div id="tips-screen" class="hidden fade-in">
<div class="mb-4">
<h2 class="text-xl font-bold text-gray-800 mb-2">Tips & Tricks</h2>
<p class="text-gray-600">Learn from the experts to improve your cooking skills</p>
</div>
<div class="mb-4">
<div class="flex overflow-x-auto pb-2">
<button class="filter-btn active" data-filter="all">All</button>
<button class="filter-btn" data-filter="knives">Knives</button>
<button class="filter-btn" data-filter="vegetables">Vegetables</button>
<button class="filter-btn" data-filter="meat">Meat</button>
<button class="filter-btn" data-filter="baking">Baking</button>
<button class="filter-btn" data-filter="storage">Storage</button>
</div>
</div>
<div class="space-y-4">
<div class="tip-card" data-id="1">
<div class="bg-white p-4 rounded-lg shadow-sm border border-gray-100">
<div class="flex justify-between items-start mb-2">
<h3 class="font-bold text-gray-800">Knife Skills 101</h3>
<button class="text-gray-400 hover:text-amber-500 save-tip-btn">
<i class="far fa-bookmark"></i>
</button>
</div>
<p class="text-gray-700 text-sm mb-3">Learn how to properly hold and use a chef's knife for efficient chopping.</p>
<div class="flex justify-between text-xs text-gray-500">
<span>Knives</span>
<span>2 min read</span>
</div>
</div>
</div>
<div class="tip-card" data-id="2">
<div class="bg-white p-4 rounded-lg shadow-sm border border-gray-100">
<div class="flex justify-between items-start mb-2">
<h3 class="font-bold text-gray-800">Perfect Vegetable Chopping</h3>
<button class="text-gray-400 hover:text-amber-500 save-tip-btn">
<i class="far fa-bookmark"></i>
</button>
</div>
<p class="text-gray-700 text-sm mb-3">Uniformly chopped vegetables cook more evenly. Here's how to achieve perfect cuts every time.</p>
<div class="flex justify-between text-xs text-gray-500">
<span>Vegetables</span>
<span>3 min read</span>
</div>
</div>
</div>
<div class="tip-card" data-id="3">
<div class="bg-white p-4 rounded-lg shadow-sm border border-gray-100">
<div class="flex justify-between items-start mb-2">
<h3 class="font-bold text-gray-800">Meat Temperature Guide</h3>
<button class="text-gray-400 hover:text-amber-500 save-tip-btn">
<i class="far fa-bookmark"></i>
</button>
</div>
<p class="text-gray-700 text-sm mb-3">Never overcook meat again with this simple temperature guide for perfect doneness.</p>
<div class="flex justify-between text-xs text-gray-500">
<span>Meat</span>
<span>4 min read</span>
</div>
</div>
</div>
<div class="tip-card" data-id="4">
<div class="bg-white p-4 rounded-lg shadow-sm border border-gray-100">
<div class="flex justify-between items-start mb-2">
<h3 class="font-bold text-gray-800">Baking Measurements</h3>
<button class="text-gray-400 hover:text-amber-500 save-tip-btn">
<i class="far fa-bookmark"></i>
</button>
</div>
<p class="text-gray-700 text-sm mb-3">Baking is a science. Learn how to measure ingredients properly for consistent results.</p>
<div class="flex justify-between text-xs text-gray-500">
<span>Baking</span>
<span>3 min read</span>
</div>
</div>
</div>
<div class="tip-card" data-id="5">
<div class="bg-white p-4 rounded-lg shadow-sm border border-gray-100">
<div class="flex justify-between items-start mb-2">
<h3 class="font-bold text-gray-800">Food Storage Tips</h3>
<button class="text-gray-400 hover:text-amber-500 save-tip-btn">
<i class="far fa-bookmark"></i>
</button>
</div>
<p class="text-gray-700 text-sm mb-3">Extend the shelf life of your ingredients with these simple storage techniques.</p>
<div class="flex justify-between text-xs text-gray-500">
<span>Storage</span>
<span>2 min read</span>
</div>
</div>
</div>
</div>
</div>
<!-- Profile/Community Screen (Hidden by default) -->
<div id="profile-screen" class="hidden fade-in">
<div class="text-center mb-6">
<div class="relative inline-block mb-3">
<img src="https://randomuser.me/api/portraits/women/44.jpg" alt="Profile" class="w-20 h-20 rounded-full border-4 border-emerald-100">
<button class="absolute bottom-0 right-0 bg-emerald-500 text-white rounded-full p-1">
<i class="fas fa-pencil-alt text-xs"></i>
</button>
</div>
<h2 class="text-xl font-bold text-gray-800">Sarah Johnson</h2>
<p class="text-gray-600 text-sm">Beginner Chef • 12 recipes tried</p>
</div>
<div class="bg-gray-50 rounded-lg p-4 mb-6">
<h3 class="font-semibold text-gray-800 mb-3">My Progress</h3>
<div class="space-y-4">
<div>
<div class="flex justify-between text-sm mb-1">
<span>Recipes Completed</span>
<span>12/50</span>
</div>
<div class="w-full bg-gray-200 rounded-full h-2">
<div class="bg-emerald-500 h-2 rounded-full" style="width: 24%"></div>
</div>
</div>
<div>
<div class="flex justify-between text-sm mb-1">
<span>Cooking Skills</span>
<span>Beginner</span>
</div>
<div class="w-full bg-gray-200 rounded-full h-2">
<div class="bg-blue-500 h-2 rounded-full" style="width: 30%"></div>
</div>
</div>
<div>
<div class="flex justify-between text-sm mb-1">
<span>Weekly Challenge Streak</span>
<span>3 weeks</span>
</div>
<div class="w-full bg-gray-200 rounded-full h-2">
<div class="bg-amber-500 h-2 rounded-full" style="width: 60%"></div>
</div>
</div>
</div>
</div>
<div class="mb-6">
<h3 class="font-bold text-gray-800 mb-3">My Creations</h3>
<div class="grid grid-cols-2 gap-3">
<div class="bg-white p-3 rounded-lg shadow-sm border border-gray-100">
<img src="https://images.unsplash.com/photo-1546069901-ba9590aed2c5?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxleHBsb3JlLWZlZWR8MXx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=500&q=60" alt="My Dish" class="w-full h-24 object-cover rounded-lg mb-2">
<h4 class="font-medium text-sm">Avocado Toast</h4>
<div class="flex justify-between text-xs text-gray-500 mt-1">
<span><i class="far fa-heart"></i> 24</span>
<span><i class="far fa-comment"></i> 5</span>
</div>
</div>
<div class="bg-white p-3 rounded-lg shadow-sm border border-gray-100">
<img src="https://images.unsplash.com/photo-1512621776951-a57141f2eefd?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxleHBsb3JlLWZlZWR8Mnx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=500&q=60" alt="My Dish" class="w-full h-24 object-cover rounded-lg mb-2">
<h4 class="font-medium text-sm">Summer Salad</h4>
<div class="flex justify-between text-xs text-gray-500 mt-1">
<span><i class="far fa-heart"></i> 18</span>
<span><i class="far fa-comment"></i> 3</span>
</div>
</div>
</div>
</div>
<div>
<h3 class="font-bold text-gray-800 mb-3">Saved Tips</h3>
<div class="space-y-3">
<div class="bg-white p-3 rounded-lg shadow-sm border border-gray-100 flex items-center">
<div class="bg-amber-100 text-amber-600 p-2 rounded-lg mr-3">
<i class="fas fa-bookmark"></i>
</div>
<div>
<h4 class="font-medium text-sm">Knife Skills 101</h4>
<p class="text-xs text-gray-500">Learn proper knife handling techniques</p>
</div>
</div>
<div class="bg-white p-3 rounded-lg shadow-sm border border-gray-100 flex items-center">
<div class="bg-amber-100 text-amber-600 p-2 rounded-lg mr-3">
<i class="fas fa-bookmark"></i>
</div>
<div>
<h4 class="font-medium text-sm">Perfect Vegetable Chopping</h4>
<p class="text-xs text-gray-500">Uniform cuts for even cooking</p>
</div>
</div>
</div>
</div>
</div>
</main>
<!-- Bottom Navigation -->
<nav class="bg-white border-t border-gray-200 fixed bottom-0 w-full max-w-md">
<div class="flex justify-around">
<button id="home-nav-btn" class="p-4 text-emerald-600">
<i class="fas fa-home text-xl"></i>
</button>
<button id="recipes-nav-btn" class="p-4 text-gray-500">
<i class="fas fa-utensils text-xl"></i>
</button>
<button id="tips-nav-btn" class="p-4 text-gray-500">
<i class="fas fa-lightbulb text-xl"></i>
</button>
<button id="profile-nav-btn" class="p-4 text-gray-500">
<i class="fas fa-user text-xl"></i>
</button>
</div>
</nav>
</div>
<script>
// Sample recipe data
const recipes = {
1: {
title: "Avocado Toast",
description: "A simple yet delicious breakfast that's packed with healthy fats and fiber. Perfect for busy mornings!",
time: "10 min",
difficulty: "Easy",
calories: "320 cal",
image: "https://images.unsplash.com/photo-1546069901-ba9590aed2c5?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxleHBsb3JlLWZlZWR8MXx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=500&q=60",
ingredients: [
"2 slices whole grain bread",
"1 ripe avocado",
"1/2 lemon, juiced",
"Salt and pepper to taste",
"Red pepper flakes (optional)",
"2 eggs (optional)",
"Microgreens for garnish (optional)"
],
instructions: [
"Toast the bread until golden and crisp.",
"Cut the avocado in half, remove the pit, and scoop the flesh into a bowl.",
"Add lemon juice, salt, and pepper to the avocado and mash with a fork to your desired consistency.",
"Spread the mashed avocado evenly on the toasted bread.",
"If adding eggs, fry or poach them to your liking and place on top of the avocado.",
"Sprinkle with red pepper flakes if desired and garnish with microgreens.",
"Serve immediately and enjoy!"
]
},
2: {
title: "Vegetable Salad",
description: "A refreshing and crunchy salad packed with fresh vegetables and a light vinaigrette. Perfect for summer days!",
time: "15 min",
difficulty: "Easy",
calories: "250 cal",
image: "https://images.unsplash.com/photo-1512621776951-a57141f2eefd?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxleHBsb3JlLWZlZWR8Mnx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=500&q=60",
ingredients: [
"2 cups mixed salad greens",
"1 cucumber, diced",
"1 bell pepper, diced",
"1 cup cherry tomatoes, halved",
"1/4 red onion, thinly sliced",
"1/4 cup feta cheese, crumbled",
"2 tbsp olive oil",
"1 tbsp balsamic vinegar",
"1 tsp honey",
"Salt and pepper to taste"
],
instructions: [
"In a large bowl, combine the salad greens, cucumber, bell pepper, cherry tomatoes, and red onion.",
"In a small bowl, whisk together the olive oil, balsamic vinegar, honey, salt, and pepper to make the dressing.",
"Pour the dressing over the salad and toss gently to combine.",
"Sprinkle the crumbled feta cheese on top.",
"Serve immediately or refrigerate for up to 1 hour before serving."
]
},
3: {
title: "Creamy Pasta",
description: "A rich and creamy pasta dish that's surprisingly easy to make. Perfect for a comforting weeknight dinner.",
time: "25 min",
difficulty: "Medium",
calories: "450 cal",
image: "https://images.unsplash.com/photo-1559847844-5315695dadae?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxleHBsb3JlLWZlZWR8NHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=500&q=60",
ingredients: [
"8 oz fettuccine pasta",
"2 tbsp butter",
"2 cloves garlic, minced",
"1 cup heavy cream",
"1/2 cup grated Parmesan cheese",
"Salt and pepper to taste",
"Fresh parsley, chopped (for garnish)"
],
instructions: [
"Cook the pasta according to package instructions until al dente. Reserve 1/2 cup of pasta water, then drain.",
"In a large skillet, melt the butter over medium heat. Add the garlic and sauté for about 30 seconds until fragrant.",
"Pour in the heavy cream and bring to a simmer. Cook for 2-3 minutes until slightly thickened.",
"Stir in the Parmesan cheese until melted and smooth. If the sauce is too thick, add a little of the reserved pasta water to thin it out.",
"Add the cooked pasta to the skillet and toss to coat evenly with the sauce.",
"Season with salt and pepper to taste.",
"Garnish with chopped parsley and serve immediately."
]
},
4: {
title: "Homemade Pizza",
description: "Make your own pizza from scratch with this simple dough recipe and your favorite toppings. Fun for the whole family!",
time: "1 hr",
difficulty: "Hard",
calories: "600 cal",
image: "https://images.unsplash.com/photo-1565299624946-b28f40a0ae38?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxleHBsb3JlLWZlZWR8Nnx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=500&q=60",
ingredients: [
"2 1/4 tsp active dry yeast",
"1 1/2 cups warm water",
"3 1/2 cups all-purpose flour",
"2 tbsp olive oil",
"1 tsp salt",
"1 tsp sugar",
"1/2 cup pizza sauce",
"2 cups shredded mozzarella cheese",
"Toppings of your choice (pepperoni, mushrooms, bell peppers, etc.)"
],
instructions: [
"In a small bowl, dissolve yeast and sugar in warm water. Let stand for about 10 minutes until frothy.",
"In a large bowl, combine flour and salt. Make a well in the center and add the yeast mixture and olive oil. Stir until a dough forms.",
"Turn the dough out onto a lightly floured surface and knead for about 7-8 minutes until smooth and elastic.",
"Place the dough in a greased bowl, cover with a damp cloth, and let rise in a warm place for about 30 minutes until doubled in size.",
"Preheat oven to 475°F (245°C). Punch down the dough and turn it out onto a floured surface. Divide into two equal pieces for two thin crusts or use whole for one thick crust.",
"Roll the dough out to fit your pizza pan. Transfer to the pan and let rest for 5 minutes.",
"Spread pizza sauce over the dough, then add cheese and your favorite toppings.",
"Bake in the preheated oven for 12-15 minutes until the crust is golden brown and the cheese is bubbly.",
"Remove from oven and let cool for 5 minutes before slicing and serving."
]
}
};
// Sample tips data
const tips = {
1: {
title: "Knife Skills 101",
content: "Always hold your knife properly with a firm grip on the handle and your fingers curled under your other hand (the 'claw' grip) when chopping. This gives you better control and helps prevent accidents. Keep your knife sharp - a dull knife is more dangerous than a sharp one because it requires more force and is more likely to slip.",
category: "Knives",
readTime: "2 min read"
},
2: {
title: "Perfect Vegetable Chopping",
content: "For evenly cooked vegetables, try to cut them into uniform sizes. This ensures everything cooks at the same rate. When dicing onions, cut off the stem end but leave the root end intact while you make your initial cuts - this helps hold the onion together as you chop. For herbs, use a rocking motion with your chef's knife rather than chopping up and down for finer, more even cuts.",
category: "Vegetables",
readTime: "3 min read"
},
3: {
title: "Meat Temperature Guide",
content: "Invest in a good meat thermometer to ensure perfect doneness every time. For beef: 120°F (49°C) for rare, 130°F (54°C) for medium-rare, 140°F (60°C) for medium, 150°F (66°C) for medium-well, 160°F (71°C) for well done. For poultry: 165°F (74°C). For pork: 145°F (63°C). Remember that meat continues to cook after removing from heat (carryover cooking), so remove it from heat 5-10°F below your target temperature.",
category: "Meat",
readTime: "4 min read"
},
4: {
title: "Baking Measurements",
content: "Baking is a science, so precise measurements are crucial. For dry ingredients like flour, spoon it into the measuring cup and level it off with a straight edge - don't scoop directly from the bag as this packs the flour and leads to using too much. For brown sugar, pack it firmly into the cup. For liquids, use clear liquid measuring cups and check at eye level. Invest in a kitchen scale for the most accurate measurements - weight is always more precise than volume.",
category: "Baking",
readTime: "3 min read"
},
5: {
title: "Food Storage Tips",
content: "Store herbs like parsley and cilantro like flowers - trim the stems and place in a glass of water in the refrigerator, loosely covered with a plastic bag. Most vegetables should be stored unwashed in the crisper drawer. Potatoes and onions should be stored in a cool, dark place (but not together - onions make potatoes sprout). Never refrigerate tomatoes - it makes them mealy. Store mushrooms in a paper bag in the fridge to prevent moisture buildup.",
category: "Storage",
readTime: "2 min read"
}
};
// Current screen tracking
let currentScreen = 'onboarding';
let currentRecipeId = null;
let timerInterval = null;
let timerSeconds = 0;
let savedTips = [1, 2]; // Sample saved tip IDs
// DOM elements
const screenContainer = document.getElementById('screen-container');
const onboardingScreen = document.getElementById('onboarding-screen');
const homeScreen = document.getElementById('home-screen');
const recipeListScreen = document.getElementById('recipe-list-screen');
const recipeDetailScreen = document.getElementById('recipe-detail-screen');
const tipsScreen = document.getElementById('tips-screen');
const profileScreen = document.getElementById('profile-screen');
// Navigation buttons
const backBtn = document.getElementById('back-btn');
const profileBtn = document.getElementById('profile-btn');
const homeNavBtn = document.getElementById('home-nav-btn');
const recipesNavBtn = document.getElementById('recipes-nav-btn');
const tipsNavBtn = document.getElementById('tips-nav-btn');
const profileNavBtn = document.getElementById('profile-nav-btn');
// Onboarding buttons
const getStartedBtn = document.getElementById('get-started-btn');
const preferenceBtns = document.querySelectorAll('.preference-btn');
// Home screen buttons
const startCookingBtn = document.getElementById('start-cooking-btn');
const tryChallengeBtn = document.getElementById('try-challenge-btn');
const viewAllRecipesBtn = document.getElementById('view-all-recipes-btn');
const recipeCards = document.querySelectorAll('.recipe-card');
// Recipe detail screen elements
const startCookingDetailBtn = document.getElementById('start-cooking-detail-btn');
const ingredientsList = document.getElementById('ingredients-list');
const instructionsList = document.getElementById('instructions-list');
// Timer modal elements
const timerModal = document.getElementById('timer-modal');
const timerDisplay = document.getElementById('timer-display');
const startTimerBtn = document.getElementById('start-timer-btn');
const resetTimerBtn = document.getElementById('reset-timer-btn');
const closeTimerBtn = document.getElementById('close-timer-btn');
const timerMinutesInput = document.getElementById('timer-minutes');
const setTimerBtn = document.getElementById('set-timer-btn');
// Tips screen elements
const filterBtns = document.querySelectorAll('.filter-btn');
const saveTipBtns = document.querySelectorAll('.save-tip-btn');
const tipCards = document.querySelectorAll('.tip-card');
// Event listeners
document.addEventListener('DOMContentLoaded', function() {
// Set up all event listeners
setupEventListeners();
});
function setupEventListeners() {
// Navigation buttons
backBtn.addEventListener('click', goBack);
profileBtn.addEventListener('click', showProfileScreen);
homeNavBtn.addEventListener('click', showHomeScreen);
recipesNavBtn.addEventListener('click', showRecipeListScreen);
tipsNavBtn.addEventListener('click', showTipsScreen);
profileNavBtn.addEventListener('click', showProfileScreen);
// Onboarding screen
getStartedBtn.addEventListener('click', showHomeScreen);
preferenceBtns.forEach(btn => {
btn.addEventListener('click', togglePreference);
});
// Home screen
startCookingBtn.addEventListener('click', showRecipeListScreen);
tryChallengeBtn.addEventListener('click', showWeeklyChallenge);
viewAllRecipesBtn.addEventListener('click', showRecipeListScreen);
recipeCards.forEach(card => {
card.addEventListener('click', function() {
showRecipeDetailScreen(parseInt(this.getAttribute('data-id')));
});
});
// Recipe detail screen
startCookingDetailBtn.addEventListener('click', showTimerModal);
// Timer modal
startTimerBtn.addEventListener('click', startTimer);
resetTimerBtn.addEventListener('click', resetTimer);
closeTimerBtn.addEventListener('click', closeTimerModal);
setTimerBtn.addEventListener('click', setTimer);
// Tips screen
filterBtns.forEach(btn => {
btn.addEventListener('click', filterTips);
});
saveTipBtns.forEach(btn => {
btn.addEventListener('click', saveTip);
});
tipCards.forEach(card => {
card.addEventListener('click', function() {
showTipDetail(parseInt(this.getAttribute('data-id')));
});
});
}
// Navigation functions
function goBack() {
switch(currentScreen) {
case 'home':
// Can't go back from home
break;
case 'recipe-list':
showHomeScreen();
break;
case 'recipe-detail':
showRecipeListScreen();
break;
case 'tips':
showHomeScreen();
break;
case 'profile':
showHomeScreen();
break;
}
}
function showScreen(screen) {
// Hide all screens
onboardingScreen.classList.add('hidden');
homeScreen.classList.add('hidden');
recipeListScreen.classList.add('hidden');
recipeDetailScreen.classList.add('hidden');
tipsScreen.classList.add('hidden');
profileScreen.classList.add('hidden');
// Show the requested screen
switch(screen) {
case 'onboarding':
onboardingScreen.classList.remove('hidden');
backBtn.classList.add('invisible');
break;
case 'home':
homeScreen.classList.remove('hidden');
backBtn.classList.add('invisible');
updateActiveNav('home');
break;
case 'recipe-list':
recipeListScreen.classList.remove('hidden');
backBtn.classList.remove('invisible');
updateActiveNav('recipes');
break;
case 'recipe-detail':
recipeDetailScreen.classList.remove('hidden');
backBtn.classList.remove('invisible');
break;
case 'tips':
tipsScreen.classList.remove('hidden');
backBtn.classList.remove('invisible');
updateActiveNav('tips');
break;
case 'profile':
profileScreen.classList.remove('hidden');
backBtn.classList.remove('invisible');
updateActiveNav('profile');
break;
}
currentScreen = screen;
}
function updateActiveNav(active) {
// Reset all nav buttons
homeNavBtn.classList.remove('text-emerald-600');
homeNavBtn.classList.add('text-gray-500');
recipesNavBtn.classList.remove('text-emerald-600');
recipesNavBtn.classList.add('text-gray-500');
tipsNavBtn.classList.remove('text-emerald-600');
tipsNavBtn.classList.add('text-gray-500');
profileNavBtn.classList.remove('text-emerald-600');
profileNavBtn.classList.add('text-gray-500');
// Set active nav button
switch(active) {
case 'home':
homeNavBtn.classList.remove('text-gray-500');
homeNavBtn.classList.add('text-emerald-600');
break;
case 'recipes':
recipesNavBtn.classList.remove('text-gray-500');
recipesNavBtn.classList.add('text-emerald-600');
break;
case 'tips':
tipsNavBtn.classList.remove('text-gray-500');
tipsNavBtn.classList.add('text-emerald-600');
break;
case 'profile':
profileNavBtn.classList.remove('text-gray-500');
profileNavBtn.classList.add('text-emerald-600');
break;
}
}
// Screen-specific functions
function showOnboardingScreen() {
showScreen('onboarding');
}
function showHomeScreen() {
showScreen('home');
}
function showRecipeListScreen() {
showScreen('recipe-list');
}
function showRecipeDetailScreen(recipeId) {
currentRecipeId = recipeId;
const recipe = recipes[recipeId];
// Update recipe details
document.getElementById('recipe-detail-title').textContent = recipe.title;
document.getElementById('recipe-detail-description').textContent = recipe.description;
document.getElementById('recipe-detail-time').textContent += recipe.time;
document.getElementById('recipe-detail-difficulty').textContent += recipe.difficulty;
document.getElementById('recipe-detail-calories').textContent += recipe.calories;
document.getElementById('recipe-detail-image').src = recipe.image;
// Clear previous ingredients and instructions
ingredientsList.innerHTML = '';
instructionsList.innerHTML = '';
// Add ingredients
recipe.ingredients.forEach(ingredient => {
const ingredientItem = document.createElement('div');
ingredientItem.className = 'flex items-start';
ingredientItem.innerHTML = `
<label class="custom-checkbox flex items-start">
<input type="checkbox" class="hidden">
<span class="checkmark w-5 h-5 border-2 border-gray-300 rounded inline-block relative mr-2 mt-1"></span>
<span class="text-gray-700">${ingredient}</span>
</label>
`;
ingredientsList.appendChild(ingredientItem);
});
// Add instructions
recipe.instructions.forEach((instruction, index) => {
const instructionItem = document.createElement('div');
instructionItem.className = 'flex';
instructionItem.innerHTML = `
<div class="bg-emerald-600 text-white rounded-full w-6 h-6 flex items-center justify-center flex-shrink-0 mr-3">${index + 1}</div>
<p class="text-gray-700">${instruction}</p>
`;
instructionsList.appendChild(instructionItem);
});
showScreen('recipe-detail');
}
function showTipsScreen() {
showScreen('tips');
}
function showProfileScreen() {
showScreen('profile');
}
function showWeeklyChallenge() {
alert("This week's challenge is to master the perfect omelette! Check out our tips section for guidance.");
}
function showTipDetail(tipId) {
const tip = tips[tipId];
alert(`${tip.title}\n\n${tip.content}`);
}
// Timer functions
function showTimerModal() {
timerModal.classList.remove('hidden');
}
function closeTimerModal() {
timerModal.classList.add('hidden');
}
function startTimer() {
if (timerInterval) {
clearInterval(timerInterval);
timerInterval = null;
startTimerBtn.textContent = 'Start';
return;
}
startTimerBtn.textContent = 'Pause';
timerInterval = setInterval(updateTimer, 1000);
}
function resetTimer() {
if (timerInterval) {
clearInterval(timerInterval);
timerInterval = null;
}
timerSeconds = 0;
updateTimerDisplay();
startTimerBtn.textContent = 'Start';
}
function setTimer() {
const minutes = parseInt(timerMinutesInput.value);
if (minutes > 0) {
timerSeconds = minutes * 60;
updateTimerDisplay();
}
}
function updateTimer() {
if (timerSeconds <= 0) {
clearInterval(timerInterval);
timerInterval = null;
startTimerBtn.textContent = 'Start';
alert("Time's up!");
return;
}
timerSeconds--;
updateTimerDisplay();
}
function updateTimerDisplay() {
const minutes = Math.floor(timerSeconds / 60);
const seconds = timerSeconds % 60;
timerDisplay.textContent = `${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}`;
}
// Helper functions
function togglePreference() {
this.classList.toggle('active');
}
function filterTips() {
filterBtns.forEach(btn => btn.classList.remove('active'));
this.classList.add('active');
const filter = this.getAttribute('data-filter');
tipCards.forEach(card => {
if (filter === 'all' || card.getAttribute('data-filter') === filter) {
card.style.display = 'block';
} else {
card.style.display = 'none';
}
});
}
function saveTip() {
const tipId = parseInt(this.closest('.tip-card').getAttribute('data-id'));
const isSaved = savedTips.includes(tipId);
if (isSaved) {
savedTips = savedTips.filter(id => id !== tipId);
this.innerHTML = '<i class="far fa-bookmark"></i>';
} else {
savedTips.push(tipId);
this.innerHTML = '<i class="fas fa-bookmark text-amber-500"></i>';
}
// Prevent event bubbling to the card click event
event.stopPropagation();
}
</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=Olaiya/timayo" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html> |