diff --git a/PREAH BUDDHA RANGSAY TEMPLE b/PREAH BUDDHA RANGSAY TEMPLE new file mode 100644 index 0000000..da77dc4 --- /dev/null +++ b/PREAH BUDDHA RANGSAY TEMPLE @@ -0,0 +1,94 @@ +buddhist-lookup/ +│ +├── index.html +├── style.css +├── script.js +│ +└── data/ + ├── vi.json + ├── en.json + ├── kh.json + └── pali.json + + + + + Tra cứu Phật giáo + + + + +

📚 Tra cứu Phật giáo đa ngôn ngữ

+ + + + + + +
+ + + + +body { + font-family: Arial, sans-serif; + margin: 40px; +} + +input, select, button { + padding: 8px; + margin: 5px; +} + +#result { + margin-top: 20px; + padding: 15px; + border: 1px solid #ccc; +} +async function search() { + const lang = document.getElementById("language").value; + const keyword = document.getElementById("search").value.toLowerCase(); + const resultDiv = document.getElementById("result"); + + const response = await fetch(`data/${lang}.json`); + const data = await response.json(); + + const result = data.find(item => + item.title.toLowerCase().includes(keyword) + ); + + if (result) { + resultDiv.innerHTML = ` +

${result.title}

+

${result.content}

+ `; + } else { + resultDiv.innerHTML = "

Không tìm thấy kết quả.

"; + } +} +[ + { + "title": "Tứ Diệu Đế", + "content": "Khổ, Tập, Diệt, Đạo là bốn chân lý căn bản của Phật giáo." + }, + { + "title": "Bát Chánh Đạo", + "content": "Con đường tám ngành dẫn đến giải thoát." + } +][ + { + "title": "Four Noble Truths", + "content": "Suffering, origin, cessation, and path." + } +] +[ + { + "title": "Cattāri Ariyasaccāni", + "content": "Dukkha, samudaya, nirodha, magga." + } +] +