<!DOCTYPE html>
<html lang=”th”>
<head>
<meta charset=”UTF-8″>
<meta name=”viewport” content=”width=device-width, initial-scale=1.0″>
<title>5 สมุนไพรในครัว – Thaimedschool</title>
<script src=”https://cdn.tailwindcss.com”></script>
<script src=”https://cdn.jsdelivr.net/npm/chart.js”></script>
<link href=”https://fonts.googleapis.com/css2?family=Sarabun:wght@300;400;500;600;700&display=swap” rel=”stylesheet”>
<script>
tailwind.config = {
theme: {
extend: {
fontFamily: {
sans: [‘Sarabun’, ‘sans-serif’],
},
colors: {
cream: ‘#F9F7F2’,
sage: ‘#8DA399’,
deepGreen: ‘#2F4F4F’,
terracotta: ‘#C17C5D’,
softOrange: ‘#F4A460’,
}
}
}
}
</script>
<style>
body {
background-color: #F9F7F2;
color: #2D3748;
}
.chart-container {
position: relative;
width: 100%;
max-width: 600px;
margin-left: auto;
margin-right: auto;
height: 300px;
max-height: 400px;
}
.herb-card {
transition: all 0.3s ease;
}
.herb-card:hover {
transform: translateY(-5px);
box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}
.active-filter {
background-color: #C17C5D;
color: white;
border-color: #C17C5D;
}
</style>
</head>
<body class=”antialiased min-h-screen flex flex-col”>
<header class=”bg-deepGreen text-cream py-8 px-4 shadow-lg”>
<div class=”container mx-auto max-w-5xl text-center”>
<h1 class=”text-3xl md:text-5xl font-bold mb-4″>ไม่ต้องพึ่งยาเคมี! 5 สมุนไพรในครัว</h1>
<h2 class=”text-xl md:text-2xl font-light text-sage mb-6″>พลิกครัวเป็นตู้ยา แก้โรคยอดฮิตที่วัย 40+ ต้องเจอ</h2>
<p class=”text-lg max-w-2xl mx-auto opacity-90″>
ภูมิปัญญาไทยที่เริ่มง่ายๆ ได้ที่บ้านคุณ สุขภาพดีเริ่มต้นจากความเข้าใจธาตุและธรรมชาติ
</p>
</div>
</header>
<main class=”flex-grow container mx-auto max-w-5xl px-4 py-10 space-y-16″>
<section>
<div class=”text-center mb-8″>
<h3 class=”text-2xl font-bold text-deepGreen mb-3″>คุณกำลังกังวลเรื่องอะไร?</h3>
<p class=”text-gray-600″>เลือกอาการที่คุณเป็นอยู่ เพื่อค้นหาสมุนไพรที่เหมาะสมที่สุดสำหรับคุณ</p>
</div>
<div class=”flex flex-wrap justify-center gap-3 mb-8″ id=”filter-container”>
<button onclick=”filterHerbs(‘all’)” class=”filter-btn active-filter px-6 py-2 rounded-full border-2 border-sage text-deepGreen hover:bg-sage hover:text-white transition font-medium transition duration-300″ data-filter=”all”>ดูทั้งหมด</button>
<button onclick=”filterHerbs(‘digestion’)” class=”filter-btn px-6 py-2 rounded-full border-2 border-sage text-deepGreen hover:bg-sage hover:text-white transition font-medium transition duration-300″ data-filter=”digestion”>ท้องอืด/ย่อยอาหาร</button>
<button onclick=”filterHerbs(‘pain’)” class=”filter-btn px-6 py-2 rounded-full border-2 border-sage text-deepGreen hover:bg-sage hover:text-white transition font-medium transition duration-300″ data-filter=”pain”>ปวดเมื่อย/ปวดข้อ</button>
<button onclick=”filterHerbs(‘energy’)” class=”filter-btn px-6 py-2 rounded-full border-2 border-sage text-deepGreen hover:bg-sage hover:text-white transition font-medium transition duration-300″ data-filter=”energy”>อ่อนเพลีย/ฮอร์โมน</button>
<button onclick=”filterHerbs(‘respiratory’)” class=”filter-btn px-6 py-2 rounded-full border-2 border-sage text-deepGreen hover:bg-sage hover:text-white transition font-medium transition duration-300″ data-filter=”respiratory”>หวัด/ภูมิแพ้</button>
<button onclick=”filterHerbs(‘detox’)” class=”filter-btn px-6 py-2 rounded-full border-2 border-sage text-deepGreen hover:bg-sage hover:text-white transition font-medium transition duration-300″ data-filter=”detox”>ล้างพิษ/ขับถ่าย</button>
</div>
</section>
<section>
<div id=”herbs-grid” class=”grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6″>
</div>
</section>
<section class=”bg-white p-6 rounded-2xl shadow-sm border border-gray-100″>
<div class=”grid md:grid-cols-3 gap-8 items-center”>
<div class=”md:col-span-1″>
<h3 class=”text-2xl font-bold text-deepGreen mb-4″>จุดเด่นของสมุนไพร</h3>
<p class=”text-gray-600 mb-4″>
กราฟนี้แสดงให้เห็นว่าสมุนไพรแต่ละชนิดมีความโดดเด่นในด้านใดบ้าง เพื่อให้คุณเลือกใช้ได้ตรงกับธาตุและอาการ
</p>
<ul class=”space-y-2 text-sm text-gray-500″>
<li class=”flex items-center”><span class=”w-3 h-3 rounded-full bg-yellow-500 mr-2″></span> ขิง: เด่นเรื่องลมและข้อ</li>
<li class=”flex items-center”><span class=”w-3 h-3 rounded-full bg-orange-400 mr-2″></span> ขมิ้นชัน: ราชาแห่งท้องไส้</li>
<li class=”flex items-center”><span class=”w-3 h-3 rounded-full bg-green-500 mr-2″></span> ตะไคร้: ผ่อนคลาย ขับปัสสาวะ</li>
</ul>
</div>
<div class=”md:col-span-2 flex justify-center”>
<div class=”chart-container”>
<canvas id=”herbRadarChart”></canvas>
</div>
</div>
</div>
</section>
</main>
<footer class=”bg-sage text-white py-12″>
<div class=”container mx-auto px-4 text-center”>
<h2 class=”text-3xl font-bold mb-4″>อยากเปลี่ยนความรู้ในครัว สู่ทักษะการรักษาอย่างมืออาชีพ?</h2>
<p class=”text-xl mb-8 opacity-90″>เรียนรู้ศาสตร์แพทย์แผนไทยที่ลึกซึ้งและนำไปใช้ได้จริง</p>
<div class=”flex flex-col md:flex-row justify-center gap-4″>
<a href=”https://thaimedschool.com” target=”_blank” class=”bg-terracotta hover:bg-orange-700 text-white font-bold py-3 px-8 rounded-full shadow-lg transition duration-300 transform hover:scale-105″>
สมัครเรียนที่ Thaimedschool
</a>
<button onclick=”window.location.href=’tel:02113447′” class=”bg-white text-deepGreen font-bold py-3 px-8 rounded-full shadow-lg hover:bg-gray-100 transition duration-300″>
โทรสอบถาม 02-113-447
</button>
</div>
<div class=”mt-8 text-sm opacity-75″>
© Thaimedschool วัดทินกรนิมิต
</div>
</div>
</footer>
<script>
// Data Structure
const herbsData = [
{
id: 1,
name: “ขิง (Ginger)”,
thaiName: “ขิง”,
icon: “🫚”,
tags: [“digestion”, “pain”],
properties: “แก้ท้องอืด ขับลม ลดการอักเสบในข้อ”,
usage: “ชงน้ำขิงดื่มอุ่นๆ หลังมื้ออาหาร ช่วยย่อยและไล่ลมได้ดีเยี่ยม”,
scores: { digestion: 5, pain: 4, energy: 3, respiratory: 3, detox: 2 }
},
{
id: 2,
name: “กระชาย (Fingerroot)”,
thaiName: “กระชาย”,
icon: “🌿”,
tags: [“energy”, “hormone”],
properties: “\”โสมไทย\” บำรุงกำลัง ปรับสมดุลฮอร์โมน”,
usage: “ปั่นคั้นน้ำผสมน้ำผึ้งมะนาว ดื่มเพื่อเพิ่มความสดชื่นและบำรุงร่างกาย”,
scores: { digestion: 3, pain: 2, energy: 5, respiratory: 2, detox: 3 }
},
{
id: 3,
name: “ขมิ้นชัน (Turmeric)”,
thaiName: “ขมิ้นชัน”,
icon: “💊”,
tags: [“digestion”, “detox”],
properties: “สมานแผลในกระเพาะอาหาร ขับพิษออกจากตับ”,
usage: “ใส่ในเมนูอาหาร (แกงเหลือง/แกงไตปลา) หรือทานแบบแคปซูลหลังมื้ออาหาร”,
scores: { digestion: 4, pain: 3, energy: 2, respiratory: 1, detox: 5 }
},
{
id: 4,
name: “ตะไคร้ (Lemongrass)”,
thaiName: “ตะไคร้”,
icon: “🍵”,
tags: [“detox”, “relax”],
properties: “ขับปัสสาวะ ลดความดัน ผ่อนคลายความเครียด”,
usage: “ทุบต้นตะไคร้ต้มน้ำดื่มจิบระหว่างวัน ช่วยให้สบายตัวและลดความดัน”,
scores: { digestion: 3, pain: 2, energy: 2, respiratory: 3, detox: 5 }
},
{
id: 5,
name: “หอมแดง (Red Onion)”,
thaiName: “หอมแดง”,
icon: “🧅”,
tags: [“respiratory”, “heart”],
properties: “แก้หวัด คัดจมูก บำรุงระบบไหลเวียนเลือด”,
usage: “ทุบใส่แกงร้อนๆ หรือทุบแล้วสูดดมกลิ่นเพื่อช่วยให้จมูกโล่ง”,
scores: { digestion: 2, pain: 1, energy: 3, respiratory: 5, detox: 3 }
}
];
// State
let currentFilter = ‘all’;
// DOM Elements
const gridElement = document.getElementById(‘herbs-grid’);
const filterButtons = document.querySelectorAll(‘.filter-btn’);
// Render Functions
function renderCards() {
gridElement.innerHTML = ”;
const filteredHerbs = currentFilter === ‘all’
? herbsData
: herbsData.filter(herb => herb.tags.includes(currentFilter) || (currentFilter === ‘heart’ && herb.tags.includes(‘heart’)) || (currentFilter === ‘hormone’ && herb.tags.includes(‘hormone’)));
if (filteredHerbs.length === 0) {
gridElement.innerHTML = ‘<div class=”col-span-full text-center py-10 text-gray-500″>ไม่พบสมุนไพรสำหรับหมวดหมู่นี้</div>’;
return;
}
filteredHerbs.forEach(herb => {
const card = document.createElement(‘div’);
card.className = ‘herb-card bg-white rounded-xl shadow-md overflow-hidden border-t-4 border-terracotta flex flex-col h-full’;
card.innerHTML = `
<div class=”p-6 flex flex-col flex-grow”>
<div class=”flex items-center justify-between mb-4″>
<div class=”text-4xl bg-cream p-3 rounded-full shadow-inner”>${herb.icon}</div>
<span class=”text-xs font-semibold text-sage uppercase tracking-wider bg-green-50 px-2 py-1 rounded-lg border border-sage/20″>${herb.tags.join(‘ / ‘)}</span>
</div>
<h3 class=”text-xl font-bold text-deepGreen mb-2″>${herb.name}</h3>
<p class=”text-gray-600 mb-4 flex-grow”>${herb.properties}</p>
<div class=”mt-4 pt-4 border-t border-gray-100″>
<button onclick=”toggleUsage(${herb.id})” class=”text-terracotta font-semibold text-sm hover:text-deepGreen transition flex items-center group”>
<span>วิธีใช้ (คลิกเพื่อดู)</span>
<span class=”ml-1 transform group-hover:translate-x-1 transition-transform”>→</span>
</button>
<div id=”usage-${herb.id}” class=”hidden mt-3 p-3 bg-cream rounded-lg text-sm text-gray-700 italic border-l-2 border-sage”>
“${herb.usage}”
</div>
</div>
</div>
`;
gridElement.appendChild(card);
});
}
// Interaction Logic
function toggleUsage(id) {
const el = document.getElementById(`usage-${id}`);
if (el.classList.contains(‘hidden’)) {
el.classList.remove(‘hidden’);
el.classList.add(‘block’, ‘animate-fade-in-down’);
} else {
el.classList.add(‘hidden’);
el.classList.remove(‘block’, ‘animate-fade-in-down’);
}
}
function filterHerbs(category) {
currentFilter = category;
// Update UI buttons
filterButtons.forEach(btn => {
if (btn.dataset.filter === category) {
btn.classList.add(‘active-filter’);
btn.classList.remove(‘text-deepGreen’);
btn.classList.add(‘text-white’);
} else {
btn.classList.remove(‘active-filter’);
btn.classList.add(‘text-deepGreen’);
btn.classList.remove(‘text-white’);
}
});
renderCards();
updateChartHighlight();
}
// Chart.js Logic
let radarChart;
function initChart() {
const ctx = document.getElementById(‘herbRadarChart’).getContext(‘2d’);
const dataSets = herbsData.map((herb, index) => {
const colors = [
‘rgba(255, 206, 86, 1)’, // Ginger Yellow
‘rgba(75, 192, 192, 1)’, // Fingerroot Teal
‘rgba(255, 159, 64, 1)’, // Turmeric Orange
‘rgba(141, 163, 153, 1)’, // Lemongrass Green
‘rgba(193, 124, 93, 1)’ // Onion Red/Brown
];
return {
label: herb.thaiName,
data: [
herb.scores.digestion,
herb.scores.pain,
herb.scores.energy,
herb.scores.respiratory,
herb.scores.detox
],
fill: true,
backgroundColor: colors[index].replace(‘1)’, ‘0.2)’),
borderColor: colors[index],
pointBackgroundColor: colors[index],
pointBorderColor: ‘#fff’,
pointHoverBackgroundColor: ‘#fff’,
pointHoverBorderColor: colors[index]
};
});
radarChart = new Chart(ctx, {
type: ‘radar’,
data: {
labels: [‘ย่อยอาหาร’, ‘ลดปวด’, ‘กำลัง/ฮอร์โมน’, ‘ทางเดินหายใจ’, ‘ล้างพิษ’],
datasets: dataSets
},
options: {
responsive: true,
maintainAspectRatio: false,
elements: {
line: { borderWidth: 2 }
},
scales: {
r: {
angleLines: { display: true },
suggestedMin: 0,
suggestedMax: 5,
ticks: { display: false } // Hide numbers to keep it clean
}
},
plugins: {
legend: {
position: ‘bottom’,
labels: {
font: { family: “‘Sarabun’, sans-serif” }
}
}
}
}
});
}
function updateChartHighlight() {
if (!radarChart) return;
radarChart.data.datasets.forEach(dataset => {
// If filter is all, show all. If filter is specific, dim others?
// Strategy: Keep chart static to allow comparison, or highlight relevant herbs?
// Decision: Keep all visible to encourage “Holistic View” as per requirement.
// Just ensuring re-render if needed.
});
radarChart.update();
}
// Initialize
document.addEventListener(‘DOMContentLoaded’, () => {
renderCards();
initChart();
});
</script>
</body>
</html>
