ใส่ behaviour เหล่านี้ลงไปให้สามารถทำ customize journal ได้ ขอภาษาไทยนะ
Browse filesconst behaviorDatabase = {
"Sleep & Circadian Health": [
"Blue-Light Blocking Glasses",
"Sound Machine",
"Read in Bed",
"Shared Bed",
"Cat in Bedroom",
"Dog in Bedroom",
"Sleep Mask",
"Sleep in Dark Room",
"Morning Sunlight",
"Late Meals",
"CPAP Machine",
"Mouth Tape",
"Nasal Strip",
"Weighted Blanket",
"Artificial Light",
"Nap",
"Consistent Bedtime",
"Consistent Wake Time",
"Sleep Tracking Device",
"White Noise",
"Humidifier",
"No Screens Before Bed",
"Evening Meditation",
"Herbal Tea Before Bed",
"Warm Shower Before Bed"
],
"Recovery": [
"Massage Therapy",
"Ice Bath",
"Stretching",
"Sauna",
"Steam Room",
"Acupuncture",
"Cupping",
"Air Compression",
"Meditation",
"Breathwork",
"Warm Bath",
"Cold Shower",
"Foam Rolling",
"Contrast Bath",
"Active Recovery",
"Rest Day",
"CBD Topical",
"Epsom Salt Bath",
"Red Light Therapy",
"Float Tank",
"Chiropractic Adjustment",
"Physical Therapy",
"Infrared Sauna",
"Cryotherapy",
"Compression Garments"
],
"Nutrition": [
"Intermittent Fasting",
"Paleo Diet",
"Plant-based Diet",
"Keto Diet",
"Mediterranean Diet",
"Caffeine",
"Alcohol Consumption",
"Alcohol Free",
"Hydration Tracking",
"Meal Prep",
"Organic Food",
"Gluten Free",
"Dairy Free",
"Low Sugar",
"High Protein",
"Pre-workout Meal",
"Post-workout Meal",
"Meal Timing",
"Calorie Tracking",
"Macro Tracking",
"Intermittent Energy Restriction",
"Time-restricted Eating",
"Nutrient Timing",
"Sports Drink",
"Electrolyte Supplement"
],
"Medications & Supplements": [
"Magnesium Supplement",
"Melatonin",
"Multivitamin",
"Vitamin B-12",
"Vitamin C",
"Vitamin D",
"Zinc",
"Probiotics",
"CBD",
"Marijuana",
"Prescription Pain Medication",
"Anti-inflammatory NSAIDs",
"Weight Loss Medication",
"AD(H)D Medication",
"Creatine",
"Protein Powder",
"BCAA",
"Pre-workout Supplement",
"Beta-alanine",
"Ashwagandha",
"Rhodiola",
"Fish Oil",
"Iron Supplement",
"Calcium Supplement",
"Joint Support"
],
"Lifestyle & Mental Health": [
"Anxiety",
"Stress",
"Working from Home",
"Screen Time",
"Traveling on a Plane",
"Sex",
"Parenting an Infant",
"Cuddling with Child",
"Therapy",
"Journaling",
"Social Time",
"Nature Walk",
"Digital Detox",
"Gratitude Practice",
"Cold Exposure",
"Heat Exposure",
"Breathing Exercises",
"Mindfulness",
"Yoga",
"Tai Chi",
"Floatation Therapy",
"Art Therapy",
"Music Therapy",
"Pet Therapy",
"Community Service"
],
"Reproductive Health": [
"Menstruation",
"Pregnancy",
"Postpartum",
"Breastfeeding",
"Birth Control",
"Hormone Therapy",
"Fertility Treatment",
"Menopause",
"Ovulation Tracking",
"PMS Symptoms",
"PCOS",
"Endometriosis",
"Hormonal Changes",
"Trying to Conceive"
],
"Environment": [
"Air Quality Monitor",
"Water Filter",
"EMF Protection",
"Clean Air",
"Natural Light",
"Green Space",
"Indoor Plants",
"Organic Mattress",
"Non-toxic Cleaning",
"Water Purification",
"Humidity Control",
"Temperature Control",
"Noise Reduction",
"Ergonomic Setup"
],
"Performance": [
"Strength Training",
"Cardio Exercise",
"HIIT Workout",
"Endurance Training",
"Flexibility Training",
"Sports Practice",
"Competition",
"Training Load",
"Performance Tracking",
"Goal Setting",
"Visualization",
"Skill Practice",
"Cross Training",
"Functional Fitness"
]
};
- index.html +315 -4
|
@@ -589,7 +589,6 @@
|
|
| 589 |
</div>
|
| 590 |
</div>
|
| 591 |
</div>
|
| 592 |
-
|
| 593 |
<!-- Goals Tab -->
|
| 594 |
<div id="goals" class="tab-content hidden p-4">
|
| 595 |
<!-- Active Goals -->
|
|
@@ -640,13 +639,30 @@
|
|
| 640 |
</div>
|
| 641 |
</div>
|
| 642 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 643 |
<!-- Add New Goal -->
|
| 644 |
<button class="w-full bg-purple-100 text-purple-600 rounded-xl p-4 font-medium text-sm hover:bg-purple-200 transition-colors">
|
| 645 |
<i data-feather="plus-circle" class="w-4 h-4 inline mr-2"></i>
|
| 646 |
เพิ่มเป้าหมายใหม่
|
| 647 |
</button>
|
| 648 |
</div>
|
| 649 |
-
|
| 650 |
|
| 651 |
<!-- Bottom Navigation -->
|
| 652 |
<div class="fixed bottom-0 left-0 right-0 bg-white border-t max-w-md mx-auto">
|
|
@@ -675,9 +691,30 @@
|
|
| 675 |
</div>
|
| 676 |
</div>
|
| 677 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 678 |
|
| 679 |
<script>
|
| 680 |
-
|
| 681 |
feather.replace();
|
| 682 |
|
| 683 |
// Tab Switching
|
|
@@ -762,7 +799,6 @@
|
|
| 762 |
switchTab(tabs[currentIndex - 1]);
|
| 763 |
}
|
| 764 |
}
|
| 765 |
-
|
| 766 |
// Add haptic feedback (vibration) on button clicks for mobile
|
| 767 |
document.querySelectorAll('button').forEach(button => {
|
| 768 |
button.addEventListener('click', () => {
|
|
@@ -771,6 +807,281 @@
|
|
| 771 |
}
|
| 772 |
});
|
| 773 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 774 |
</script>
|
| 775 |
<script src="https://huggingface.co/deepsite/deepsite-badge.js"></script>
|
| 776 |
</body>
|
|
|
|
| 589 |
</div>
|
| 590 |
</div>
|
| 591 |
</div>
|
|
|
|
| 592 |
<!-- Goals Tab -->
|
| 593 |
<div id="goals" class="tab-content hidden p-4">
|
| 594 |
<!-- Active Goals -->
|
|
|
|
| 639 |
</div>
|
| 640 |
</div>
|
| 641 |
|
| 642 |
+
<!-- Daily Journal -->
|
| 643 |
+
<div class="mb-4">
|
| 644 |
+
<h3 class="font-semibold mb-3">บันทึกประจำวัน</h3>
|
| 645 |
+
<div class="bg-white rounded-xl p-4 card-shadow">
|
| 646 |
+
<div class="mb-3">
|
| 647 |
+
<label class="text-sm font-medium text-gray-700 mb-2 block">พฤติกรรมวันนี้</label>
|
| 648 |
+
<div class="space-y-2 max-h-40 overflow-y-auto">
|
| 649 |
+
<!-- Behaviors will be populated here -->
|
| 650 |
+
</div>
|
| 651 |
+
</div>
|
| 652 |
+
<button onclick="showBehaviorSelector()" class="w-full bg-purple-100 text-purple-600 rounded-lg p-3 font-medium text-sm hover:bg-purple-200 transition-colors">
|
| 653 |
+
<i data-feather="plus-circle" class="w-4 h-4 inline mr-2"></i>
|
| 654 |
+
เพิ่มพฤติกรรม
|
| 655 |
+
</button>
|
| 656 |
+
</div>
|
| 657 |
+
</div>
|
| 658 |
+
|
| 659 |
<!-- Add New Goal -->
|
| 660 |
<button class="w-full bg-purple-100 text-purple-600 rounded-xl p-4 font-medium text-sm hover:bg-purple-200 transition-colors">
|
| 661 |
<i data-feather="plus-circle" class="w-4 h-4 inline mr-2"></i>
|
| 662 |
เพิ่มเป้าหมายใหม่
|
| 663 |
</button>
|
| 664 |
</div>
|
| 665 |
+
</div>
|
| 666 |
|
| 667 |
<!-- Bottom Navigation -->
|
| 668 |
<div class="fixed bottom-0 left-0 right-0 bg-white border-t max-w-md mx-auto">
|
|
|
|
| 691 |
</div>
|
| 692 |
</div>
|
| 693 |
</div>
|
| 694 |
+
|
| 695 |
+
<!-- Behavior Selector Modal -->
|
| 696 |
+
<div id="behaviorModal" class="fixed inset-0 bg-black bg-opacity-50 z-50 hidden">
|
| 697 |
+
<div class="flex items-center justify-center min-h-screen p-4">
|
| 698 |
+
<div class="bg-white rounded-2xl max-w-md w-full max-h-[80vh] overflow-hidden">
|
| 699 |
+
<div class="p-4 border-b sticky top-0 bg-white">
|
| 700 |
+
<div class="flex justify-between items-center">
|
| 701 |
+
<h3 class="font-semibold text-lg">เลือกพฤติกรรม</h3>
|
| 702 |
+
<button onclick="closeBehaviorSelector()" class="p-1">
|
| 703 |
+
<i data-feather="x" class="w-5 h-5"></i>
|
| 704 |
+
</button>
|
| 705 |
+
</div>
|
| 706 |
+
</div>
|
| 707 |
+
<div class="p-4 overflow-y-auto max-h-[60vh]">
|
| 708 |
+
<div id="behaviorCategories" class="space-y-4">
|
| 709 |
+
<!-- Categories will be populated here -->
|
| 710 |
+
</div>
|
| 711 |
+
</div>
|
| 712 |
+
</div>
|
| 713 |
+
</div>
|
| 714 |
+
</div>
|
| 715 |
|
| 716 |
<script>
|
| 717 |
+
// Initialize Feather Icons
|
| 718 |
feather.replace();
|
| 719 |
|
| 720 |
// Tab Switching
|
|
|
|
| 799 |
switchTab(tabs[currentIndex - 1]);
|
| 800 |
}
|
| 801 |
}
|
|
|
|
| 802 |
// Add haptic feedback (vibration) on button clicks for mobile
|
| 803 |
document.querySelectorAll('button').forEach(button => {
|
| 804 |
button.addEventListener('click', () => {
|
|
|
|
| 807 |
}
|
| 808 |
});
|
| 809 |
});
|
| 810 |
+
|
| 811 |
+
// Behavior Database
|
| 812 |
+
const behaviorDatabase = {
|
| 813 |
+
"การนอนและสุขภาพรอบวัน": [
|
| 814 |
+
"แว่นกันแสงสีฟ้า",
|
| 815 |
+
"เครื่องเสียง",
|
| 816 |
+
"อ่านหนังสือบนเตียง",
|
| 817 |
+
"นอนร่วมกับผู้อื่น",
|
| 818 |
+
"แมวอยู่ในห้องนอน",
|
| 819 |
+
"สุนัขอยู่ในห้องนอน",
|
| 820 |
+
"หน้ากากปิดตา",
|
| 821 |
+
"นอนในห้องมืด",
|
| 822 |
+
"แสงแดดตอนเช้า",
|
| 823 |
+
"รับประทานอาหารดึก",
|
| 824 |
+
"เครื่อง CPAP",
|
| 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 |
+
"การ meditate",
|
| 850 |
+
"การฝึกหายใจ",
|
| 851 |
+
"อาบน้ำอุ่น",
|
| 852 |
+
"อาบน้ำเย็น",
|
| 853 |
+
"โฟมรอลลิ่ง",
|
| 854 |
+
"อาบน้ำสลับ",
|
| 855 |
+
"การฟื้นตัวแบบ active",
|
| 856 |
+
"วันพัก",
|
| 857 |
+
"CBD ภายนอก",
|
| 858 |
+
"อาบน้ำเกลือ Epsom",
|
| 859 |
+
"บำบัดแสงแดง",
|
| 860 |
+
"ถังลอย",
|
| 861 |
+
"การปรับสันหลัง",
|
| 862 |
+
"กายภาพบำบัด",
|
| 863 |
+
"ซาวน่าอินฟราเรด",
|
| 864 |
+
"ครีโอเทอราพี",
|
| 865 |
+
"เสื้อผ้าบีบอัด"
|
| 866 |
+
],
|
| 867 |
+
"โภชนาการ": [
|
| 868 |
+
"การลดน้ำหนักแบบ Intermittent Fasting",
|
| 869 |
+
"อาหาร Paleo",
|
| 870 |
+
"อาหารพืช",
|
| 871 |
+
"อาหาร Keto",
|
| 872 |
+
"อาหาร Mediterranean",
|
| 873 |
+
"คาเฟอีน",
|
| 874 |
+
"การดื่มแอลกอฮอล์",
|
| 875 |
+
"ไม่ดื่มแอลกอฮอล์",
|
| 876 |
+
"การติดตามการบริโภคน้ำ",
|
| 877 |
+
"การเตรียมอาหารล่วงหน้า",
|
| 878 |
+
"อาหารออร์แกนิก",
|
| 879 |
+
"ปราศจากกลูเตน",
|
| 880 |
+
"ปราศจากแล็กโทส",
|
| 881 |
+
"น้ำตาลต่ำ",
|
| 882 |
+
"โปรตีนสูง",
|
| 883 |
+
"มื้ออาหารก่อนออกกำลังกาย",
|
| 884 |
+
"มื้ออาหารหลังออกกำลังกาย",
|
| 885 |
+
"การจัดเวลามื้ออาหาร",
|
| 886 |
+
"การติดตามแคลอรี่",
|
| 887 |
+
"การติดตามแมโคร",
|
| 888 |
+
"การจำกัดพลังงานแบบ Intermittent",
|
| 889 |
+
"การรับประทานแบบจำกัดเวลา",
|
| 890 |
+
"การจัดเวลาธาตุอาหาร",
|
| 891 |
+
"เครื่องดื่มกีฬา",
|
| 892 |
+
"อาหารเสริมอิเล็กโทรไลต์"
|
| 893 |
+
],
|
| 894 |
+
"ยาและอาหารเสริม": [
|
| 895 |
+
"อาหารเสริมแมกนีเซียม",
|
| 896 |
+
"เมลาโทนิน",
|
| 897 |
+
"วิตามินรวม",
|
| 898 |
+
"วิตามิน B-12",
|
| 899 |
+
"วิตามิน C",
|
| 900 |
+
"วิตามิน D",
|
| 901 |
+
"สังกะสี",
|
| 902 |
+
"โปรไบโอติกส์",
|
| 903 |
+
"CBD",
|
| 904 |
+
"กัญชา",
|
| 905 |
+
"ยาแก้ปวดตามใบสั่งแพทย์",
|
| 906 |
+
"ยาต้านการอักเสบ NSAIDs",
|
| 907 |
+
"ยาลดน้ำหนัก",
|
| 908 |
+
"ยา AD(H)D",
|
| 909 |
+
"ครีเอทีน",
|
| 910 |
+
"ผงโปรตีน",
|
| 911 |
+
"BCAA",
|
| 912 |
+
"อาหารเสริมก่อนออกกำลังกาย",
|
| 913 |
+
"บีตาอะลานีน",
|
| 914 |
+
"อาชวากันดา",
|
| 915 |
+
"โรดิโอล่า",
|
| 916 |
+
"น้ำมันปลา",
|
| 917 |
+
"อาหารเสริมเหล็ก",
|
| 918 |
+
"อาหารเสริมแคลเซียม",
|
| 919 |
+
"การสนับสนุนข้อต่อ"
|
| 920 |
+
],
|
| 921 |
+
"ไลฟ์สไตล์และสุขภาพจิต": [
|
| 922 |
+
"ความวิตกกังวล",
|
| 923 |
+
"ความเครียด",
|
| 924 |
+
"ทำงานที่บ้าน",
|
| 925 |
+
"เวลาหน้าจอ",
|
| 926 |
+
"เดินทางโดยเครื่องบิน",
|
| 927 |
+
"เพศสัมพันธ์",
|
| 928 |
+
"เลี้ยงดูเด็กทารก",
|
| 929 |
+
"กอดเด็ก",
|
| 930 |
+
"การบำบัด",
|
| 931 |
+
"การเขียนบันทึก",
|
| 932 |
+
"เวลาทางสังคม",
|
| 933 |
+
"เดินเที่ยวในธรรมชาติ",
|
| 934 |
+
"การ detox จากดิจิทัล",
|
| 935 |
+
"การฝึกความขอบคุณ",
|
| 936 |
+
"การสัมผัสความเย็น",
|
| 937 |
+
"การสัมผัสความร้อน",
|
| 938 |
+
"การออกกำลังกายการหายใจ",
|
| 939 |
+
"การตั้งสติ",
|
| 940 |
+
"โยคะ",
|
| 941 |
+
"ไท่จี",
|
| 942 |
+
"บำบัดการลอยตัว",
|
| 943 |
+
"บำบัดศิลปะ",
|
| 944 |
+
"บำบัดดนตรี",
|
| 945 |
+
"บำบัดสัตว์เลี้ยง",
|
| 946 |
+
"บริการชุมชน"
|
| 947 |
+
],
|
| 948 |
+
"สุขภาพการสืบพันธุ์": [
|
| 949 |
+
"ประจำเดือน",
|
| 950 |
+
"การตั้งครรภ์",
|
| 951 |
+
"หลังคลอด",
|
| 952 |
+
"ให้นมบุตร",
|
| 953 |
+
"การคุมกำเนิด",
|
| 954 |
+
"ฮอร์โมนบำบัด",
|
| 955 |
+
"การรักษาภาวะมีบุตรยาก",
|
| 956 |
+
"วัยทอง",
|
| 957 |
+
"การติดตามการตกไข่",
|
| 958 |
+
"อาการ PMS",
|
| 959 |
+
"ภาวะถุงน้ำในรังไข่",
|
| 960 |
+
"เยื่อบุโพรงมดลูกเจริญผิดที่",
|
| 961 |
+
"การเปลี่ยนแปลงฮอร์โมน",
|
| 962 |
+
"พยายามมีบุตร"
|
| 963 |
+
],
|
| 964 |
+
"สิ่งแวดล้อม": [
|
| 965 |
+
"เครื่องตรวจสอบคุณภาพอากาศ",
|
| 966 |
+
"ตัวกรองน้ำ",
|
| 967 |
+
"การป้องกัน EMF",
|
| 968 |
+
"อากาศบริสุทธิ์",
|
| 969 |
+
"แสงธรรมชาติ",
|
| 970 |
+
"พื้นที่สีเขียว",
|
| 971 |
+
"ไม้ในร่ม",
|
| 972 |
+
"ที่นอนออร์แกนิก",
|
| 973 |
+
"การทำความสะอาดปราศจากสารพิษ",
|
| 974 |
+
"การบำบัดน้ำ",
|
| 975 |
+
"การควบคุมความชื้น",
|
| 976 |
+
"การควบคุมอุณหภูมิ",
|
| 977 |
+
"การลดเสียงรบกวน",
|
| 978 |
+
"การจัดการสิ่งอำนวยความสะดวก"
|
| 979 |
+
],
|
| 980 |
+
"ประสิทธิภาพ": [
|
| 981 |
+
"การฝึกกำลัง",
|
| 982 |
+
"การออกกำลังกายแบบคาร์ดิโอ",
|
| 983 |
+
"การออกกำลังกาย HIIT",
|
| 984 |
+
"การฝึกความอดทน",
|
| 985 |
+
"การฝึกความยืดหยุ่น",
|
| 986 |
+
"การฝึกกีฬา",
|
| 987 |
+
"การแข่งขัน",
|
| 988 |
+
"ภาระการฝึก",
|
| 989 |
+
"การติดตามประสิทธิภาพ",
|
| 990 |
+
"การตั้งเป้าหมาย",
|
| 991 |
+
"การสร้างภาพในใจ",
|
| 992 |
+
"การฝึกทักษะ",
|
| 993 |
+
"การฝึกข้าม",
|
| 994 |
+
"ฟิตเนสเชิงฟังก์ชัน"
|
| 995 |
+
]
|
| 996 |
+
};
|
| 997 |
+
|
| 998 |
+
// Daily Journal Behaviors
|
| 999 |
+
let selectedBehaviors = [];
|
| 1000 |
+
|
| 1001 |
+
function showBehaviorSelector() {
|
| 1002 |
+
const modal = document.getElementById('behaviorModal');
|
| 1003 |
+
const categoriesContainer = document.getElementById('behaviorCategories');
|
| 1004 |
+
|
| 1005 |
+
categoriesContainer.innerHTML = '';
|
| 1006 |
+
|
| 1007 |
+
Object.entries(behaviorDatabase).forEach(([category, behaviors]) => {
|
| 1008 |
+
const categoryDiv = document.createElement('div');
|
| 1009 |
+
categoryDiv.className = 'bg-gray-50 rounded-lg p-3';
|
| 1010 |
+
|
| 1011 |
+
const categoryTitle = document.createElement('h4');
|
| 1012 |
+
categoryTitle.className = 'font-semibold text-sm mb-2 text-purple-600';
|
| 1013 |
+
categoryTitle.textContent = category;
|
| 1014 |
+
categoryDiv.appendChild(categoryTitle);
|
| 1015 |
+
|
| 1016 |
+
const behaviorsGrid = document.createElement('div');
|
| 1017 |
+
behaviorsGrid.className = 'grid grid-cols-2 gap-2';
|
| 1018 |
+
|
| 1019 |
+
behaviors.forEach(behavior => {
|
| 1020 |
+
const behaviorLabel = document.createElement('label');
|
| 1021 |
+
behaviorLabel.className = 'flex items-center space-x-2 cursor-pointer';
|
| 1022 |
+
|
| 1023 |
+
const checkbox = document.createElement('input');
|
| 1024 |
+
checkbox.type = 'checkbox';
|
| 1025 |
+
checkbox.className = 'rounded text-purple-600';
|
| 1026 |
+
checkbox.value = behavior;
|
| 1027 |
+
checkbox.checked = selectedBehaviors.includes(behavior);
|
| 1028 |
+
|
| 1029 |
+
const label = document.createElement('span');
|
| 1030 |
+
label.className = 'text-xs';
|
| 1031 |
+
label.textContent = behavior;
|
| 1032 |
+
|
| 1033 |
+
behaviorLabel.appendChild(checkbox);
|
| 1034 |
+
behaviorLabel.appendChild(label);
|
| 1035 |
+
behaviorsGrid.appendChild(behaviorLabel);
|
| 1036 |
+
});
|
| 1037 |
+
|
| 1038 |
+
categoryDiv.appendChild(behaviorsGrid);
|
| 1039 |
+
categoriesContainer.appendChild(categoryDiv);
|
| 1040 |
+
});
|
| 1041 |
+
|
| 1042 |
+
modal.classList.remove('hidden');
|
| 1043 |
+
feather.replace();
|
| 1044 |
+
}
|
| 1045 |
+
|
| 1046 |
+
function closeBehaviorSelector() {
|
| 1047 |
+
const modal = document.getElementById('behaviorModal');
|
| 1048 |
+
|
| 1049 |
+
// Save selected behaviors
|
| 1050 |
+
const checkboxes = modal.querySelectorAll('input[type="checkbox"]:checked');
|
| 1051 |
+
selectedBehaviors = Array.from(checkboxes).map(cb => cb.value);
|
| 1052 |
+
|
| 1053 |
+
// Update journal display
|
| 1054 |
+
updateJournalDisplay();
|
| 1055 |
+
|
| 1056 |
+
modal.classList.add('hidden');
|
| 1057 |
+
}
|
| 1058 |
+
|
| 1059 |
+
function updateJournalDisplay() {
|
| 1060 |
+
const journalContainer = document.querySelector('#goals .bg-white .space-y-2');
|
| 1061 |
+
|
| 1062 |
+
if (selectedBehaviors.length > 0) {
|
| 1063 |
+
journalContainer.innerHTML = selectedBehaviors.map(behavior => `
|
| 1064 |
+
<div class="flex items-center justify-between bg-purple-50 rounded-lg p-2">
|
| 1065 |
+
<span class="text-sm">${behavior}</span>
|
| 1066 |
+
<button onclick="removeBehavior('${behavior}')" class="text-red-500">
|
| 1067 |
+
<i data-feather="x" class="w-4 h-4"></i>
|
| 1068 |
+
</button>
|
| 1069 |
+
</div>
|
| 1070 |
+
`).join('');
|
| 1071 |
+
} else {
|
| 1072 |
+
journalContainer.innerHTML = '<p class="text-xs text-gray-500 text-center py-4">ยังไม่ได้เพิ่มพฤติกรรมวันนี้</p>';
|
| 1073 |
+
}
|
| 1074 |
+
|
| 1075 |
+
feather.replace();
|
| 1076 |
+
}
|
| 1077 |
+
|
| 1078 |
+
function removeBehavior(behavior) {
|
| 1079 |
+
selectedBehaviors = selectedBehaviors.filter(b => b !== behavior);
|
| 1080 |
+
updateJournalDisplay();
|
| 1081 |
+
}
|
| 1082 |
+
|
| 1083 |
+
// Initialize journal display
|
| 1084 |
+
updateJournalDisplay();
|
| 1085 |
</script>
|
| 1086 |
<script src="https://huggingface.co/deepsite/deepsite-badge.js"></script>
|
| 1087 |
</body>
|