├── index.html ├── README.md ├── index.js └── style.css /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Dictionary App 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 |

Dictionary App 📚

19 |
20 | 21 |
22 | 23 | 24 |
25 |
26 |
27 |
28 |
29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Dictionary-App: Your Vocabulary Booster 📚📖🔍 2 | 3 | https://github.com/Manishak798/Pokemon-card-genrator-/assets/90680330/c8a8f357-769f-4417-a04b-1fd35645075d 4 | 5 |
6 | 7 | **Visit Project🔗** 8 | 9 | https://manishak798.github.io/Dictionary-App/ 10 | 11 | **Description** 📄 12 | 13 | Get ready to expand your vocabulary and master word meanings with Dict-tactic, a user-friendly web app built with cutting-edge technologies! It leverages the power of HTML, CSS, JavaScript, and the Dictionary API to bring you comprehensive definitions, synonyms, antonyms, and example sentences, all at your fingertips. 14 | 15 | **Features** ✨⭐ 16 | 17 | * Instant Word Lookups: Search for any word and instantly see its definition, part of speech, and other details. 18 | * Clear & Concise Explanations: Understand word meanings easily with well-structured and easily digestible explanations. 19 | * Synonym & Antonym Power: Explore synonyms and antonyms to unlock new ways to express yourself and grasp subtle nuances. 20 | * Real-world Examples: See how words are used in context with practical example sentences. 21 | * Responsive Design: Enjoy a seamless experience on any device, whether desktop, mobile, or tablet. 22 | 23 | **Technologies:** 👩🏻‍💻 24 | 25 | * HTML: The sturdy foundation for the app's structure and content. 26 | * CSS: Enhances the visuals with elegant styles and formatting. 27 | * JavaScript: Manages interactivity, data fetching, and dynamic elements. 28 | * Dictionary API: The secret sauce, providing definitions, synonyms, antonyms, and examples. 29 | 30 | **Getting Started:** 🌟📍 31 | 32 | 1. Clone the Repository: 33 | ```bash 34 | git clone https://github.com/[your-username]/[project-name].git 35 | ``` 36 | 2. Install Dependencies: 37 | Follow the instructions in `package.json` (usually `npm install`). 38 | 3. Launch the App: 39 | Start the development server with the provided script (e.g., `npm start`). 40 | 4. Open in Browser: 41 | Visit the app at the specified URL (e.g., `http://localhost:3000`). 42 | 43 | **Customize & Contribute:** 🤝🏻 44 | 45 | * Make it your own: Adapt the app's name, styles, and features to your liking. 46 | * ➕ Integrate more APIs: Unlock even richer word information with additional language resources. 47 | * Join the community: Submit pull requests, raise issues, and help Dict-tastic grow! 48 | 49 | **Enjoy & Share the Knowledge!⭐** 50 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | //app.js file 2 | const url = "https://api.dictionaryapi.dev/api/v2/entries/en/"; 3 | const searchdword = document.getElementById("search-word"); 4 | const partofspeech = document.getElementById("pos"); 5 | const text = document.getElementById("text"); 6 | const worddefine = document.getElementById("word-defination"); 7 | const button = document.getElementById("btn"); 8 | const sound = document.getElementById("sound"); 9 | const result = document.getElementById("result"); 10 | button.addEventListener("click", () => { 11 | //to add eventlistner event name and call back 12 | const inptext = document.getElementById("inp-word").value;//when user click on btn it will listen for inp text 13 | // console.log(inptext); 14 | fetch(`${url}${inptext}`) 15 | .then((response) => response.json())//convert data to json format 16 | .then((data) => { 17 | if (`${inptext}` != data[0]) { 18 | result.style.margin = "20px"; 19 | result.innerHTML = "

Word not found!!

"; 20 | } 21 | result.innerHTML = ` 22 |
23 |

${data[0].word}

24 | 25 |
26 |
27 |

${data[0].meanings[0].partOfSpeech}

28 |

${data[0].phonetics[1].text}

29 |
30 |
31 |

${data[0].meanings[0].definitions[0].definition}

32 |
` 33 | console.log(data); 34 | // searchdword.innerHTML = ; 35 | // partofspeech.innerHTML = data[0].meanings[0].partOfSpeech; 36 | // text.innerHTML = data[0].phonetics[1].text; 37 | // worddefine.innerHTML = data[0].meanings[0].definitions[0].definition; 38 | // wordexmple.innerHTML = data[0].meanings[0].definitions[0].example || " "; 39 | sound.setAttribute("src", data[0].phonetics[0].audio); 40 | }) 41 | }) 42 | function iconchange() { 43 | 44 | // Change the icon to high volume icon 45 | const soundIcon = document.querySelector(".sound-icn i"); 46 | soundIcon.className = "fa-solid fa-volume-high"; 47 | 48 | } 49 | 50 | function playsound() { 51 | 52 | sound.play(); 53 | } 54 | -------------------------------------------------------------------------------- /style.css: -------------------------------------------------------------------------------- 1 | * { 2 | padding: 0; 3 | margin: 0; 4 | } 5 | 6 | body { 7 | background-color: #d1ccc0; 8 | font-family: 'Poppins', sans-serif; 9 | } 10 | 11 | .heading { 12 | text-align: center; 13 | margin-top: 5%; 14 | font-size: 60px; 15 | font-style: italic; 16 | font-family: 'Poppins', sans-serif; 17 | font-family: 'Recursive', sans-serif; 18 | } 19 | 20 | .container { 21 | margin-top: 5%; 22 | margin-left: 30%; 23 | width: 30%; 24 | border: 1px solid black; 25 | box-shadow: 5px 5px 5px gray; 26 | background-color: #f7f1e3; 27 | border-radius: 10px; 28 | padding: 10px 40px; 29 | } 30 | 31 | .search-word { 32 | display: flex; 33 | justify-content: space-around; 34 | } 35 | 36 | .inp { 37 | margin-top: 5%; 38 | width: 70%; 39 | border: none; 40 | outline: none; 41 | border-bottom: 2px solid #40407a; 42 | background-color: #f7f1e3; 43 | font-size: 16px; 44 | padding: 5px 5px; 45 | } 46 | 47 | .search-btn { 48 | margin-top: 5%; 49 | width: 20%; 50 | padding: 5px 5px; 51 | font-weight: 600; 52 | border-radius: 10px; 53 | background-color: #d1ccc0; 54 | } 55 | 56 | .word { 57 | margin-top: 60px; 58 | display: flex; 59 | justify-content: space-between; 60 | padding: 5px 5px; 61 | } 62 | 63 | h3 { 64 | font-size: 30px; 65 | letter-spacing: 0.3px; 66 | color: #2d3436; 67 | } 68 | 69 | .sound-icn { 70 | color: #2d3436; 71 | font-size: 25px; 72 | padding: 5px 5px; 73 | background-color: transparent; 74 | border: none; 75 | } 76 | 77 | 78 | .word-verb { 79 | display: flex; 80 | gap: 16px; 81 | font-style: italic; 82 | padding: 5px 5px; 83 | color: #636e72; 84 | font-weight: 100; 85 | letter-spacing: 0.5px; 86 | } 87 | 88 | .defination { 89 | padding: 5px 5px; 90 | margin-top: 10px; 91 | border-left: 4px solid #636e72; 92 | font-style: italic; 93 | } 94 | 95 | #word-defination { 96 | font-weight: 400; 97 | letter-spacing: 0.2px; 98 | font-size: 20px; 99 | color: #2d3436; 100 | margin-left: 7px; 101 | } 102 | 103 | /* Extra small devices (phones, 600px and down) */ 104 | @media only screen and (max-width: 600px) { 105 | .app { 106 | font-size: 1rem; 107 | } 108 | 109 | .heading { 110 | font-size: 2rem; 111 | } 112 | 113 | .container { 114 | width: 70%; 115 | margin: 0 auto; 116 | margin-top: 30px; 117 | } 118 | 119 | .search-btn { 120 | width: max-content; 121 | } 122 | } 123 | 124 | /* Small devices (portrait tablets and large phones, 600px and up) */ 125 | @media only screen and (min-width: 600px) {} 126 | 127 | /* Medium devices (landscape tablets, 768px and up) */ 128 | @media only screen and (min-width: 768px) {} 129 | 130 | /* Large devices (laptops/desktops, 992px and up) */ 131 | @media only screen and (min-width: 992px) {} 132 | 133 | /* Extra large devices (large laptops and desktops, 1200px and up) */ 134 | @media only screen and (min-width: 1200px) {} --------------------------------------------------------------------------------