-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path05_Dictionary.html
More file actions
143 lines (132 loc) · 4.59 KB
/
05_Dictionary.html
File metadata and controls
143 lines (132 loc) · 4.59 KB
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
<!DOCTYPE html>
<html>
<head>
<title>English to Bangla Dictionary</title>
<style>
body {
font-family: Arial, sans-serif;
background-color: #f2f2f2;
}
h1 {
text-align: center;
color: #007bff;
}
#container {
width: 80%;
margin: 20px auto;
background-color: #fff;
padding: 20px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
border-radius: 10px;
}
#search-box {
width: 100%;
padding: 10px;
border: 1px solid #ccc;
border-radius: 5px;
}
#results {
margin-top: 10px;
}
.result-item {
background-color: #f7f7f7;
padding: 10px;
margin: 10px 0;
border-radius: 5px;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}
.result-item strong {
font-weight: bold;
}
</style>
</head>
<body>
<h1>English to Bangla Dictionary</h1>
<div id="container">
<input type="text" id="search-box" placeholder="Search by alphabet...">
<div id="results"></div>
</div>
<script>
const words = {
"apple": "আপেল",
"banana": "কলা",
"orange": "কমলা",
"strawberry": "স্ট্রবেরি",
"grape": "আঙ্গুর",
"mango": "আম",
"kiwi": "কিউই",
"pineapple": "অনানাস",
"watermelon": "তরমুজ",
"cherry": "চেরি",
"lemon": "লেবু",
"papaya": "পেপে",
"apricot": "খুবানি",
"blueberry": "ব্লুবেরি",
"peach": "আড়ু",
"pear": "নাশপাতি",
"plum": "আলুবখারা",
"avocado": "আভোকাডো",
"fig": "ডুমুর",
"guava": "পেয়ারা",
"kiwi": "কিউই",
"mango": "আম",
"lychee": "লিচু",
"pomegranate": "ডালিম",
"coconut": "নারিকেল",
"peach": "আড়ু",
"banana": "কলা",
"strawberry": "স্ট্রবেরি",
"grape": "আঙ্গুর",
"mango": "আম",
"kiwi": "কিউই",
"pineapple": "অনানাস",
"watermelon": "তরমুজ",
"cherry": "চেরি",
"lemon": "লেবু",
"papaya": "পেপে",
"apricot": "খুবানি",
"blueberry": "ব্লুবেরি",
"peach": "আড়ু",
"pear": "নাশপাতি",
"plum": "আলুবখারা",
"avocado": "আভোকাডো",
"fig": "ডুমুর",
"guava": "পেয়ারা",
"kiwi": "কিউই",
"mango": "আম",
"lychee": "লিচু",
"pomegranate": "ডালিম",
"coconut": "নারিকেল",
"elephant": "হাতি",
"lion": "সিংহ",
"tiger": "বাঘ",
"giraffe": "গিরাফ",
"zebra": "জেব্রা",
"hippopotamus": "জলগোধূলি",
"cheetah": "চীতা",
"gazelle": "চিতা",
"crocodile": "মগর",
"panda": "পান্ডা",
"kangaroo": "ক্যাঙ্গারু",
"koala": "কোয়ালা",
"rhinoceros": "গোণ্ডা",
"octopus": "পষ্প",
};
const searchBox = document.getElementById('search-box');
const results = document.getElementById('results');
searchBox.addEventListener('input', () => {
const query = searchBox.value.toLowerCase();
results.innerHTML = "";
for (const word in words) {
if (word.startsWith(query)) {
const translation = words[word];
const resultItem = document.createElement('div');
resultItem.classList.add('result-item');
resultItem.innerHTML = `<strong>${word}:</strong> ${translation}`;
results.appendChild(resultItem);
}
}
});
</script>
</body>
</html>