Skip to content

Commit 5f01b39

Browse files
Merge pull request #1643 from ak-sh-at/dictionary
dictionary modified
2 parents 7f595b4 + d8f21ba commit 5f01b39

3 files changed

Lines changed: 42 additions & 6 deletions

File tree

Projects/dictionary/index.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
<meta charset="UTF-8">
55
<meta http-equiv="X-UA-Compatible" content="IE=edge">
66
<meta name="viewport" content="width=device-width, initial-scale=1.0">
7+
<link rel="preconnect" href="https://fonts.googleapis.com">
8+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
9+
<link href="https://fonts.googleapis.com/css2?family=Cormorant+Garamond&display=swap" rel="stylesheet">
710
<link
811
rel="stylesheet"
912
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css"
@@ -18,7 +21,7 @@
1821
<title>Dictionary</title>
1922
</head>
2023
<body>
21-
<h1>Word Dictionary</h1>
24+
<h1 id="h">Word Dictionary</h1>
2225
<audio id="sound"></audio>
2326
<div class="container">
2427
<div class="search-box">

Projects/dictionary/script.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ const sound = document.getElementById("sound");
44
const btn = document.getElementById("search-btn");
55

66
btn.addEventListener("click", () => {
7+
8+
document.getElementById("h").style.display = "none";
79
let inpWord = document.getElementById("inp-word").value;
810
fetch(`${url}${inpWord}`)
911
.then((response) => response.json())

Projects/dictionary/style.css

Lines changed: 36 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
font-family: "Poppins", sans-serif;
88
}
99
body {
10+
height: 100vh;
11+
display: flex;
12+
flex-direction: column;
1013
background-color: #ae9cff;
1114
}
1215
.container {
@@ -20,22 +23,41 @@ body {
2023
border-radius: 10px;
2124
box-shadow: 0 20px 40px rgba(38, 33, 61, 0.2);
2225
}
26+
@media(max-width:391px)
27+
{
28+
.search-box{
29+
display: flex;
30+
flex-direction: column;
31+
justify-content: space-between;
32+
align-items: center;
33+
padding: 0 ;
34+
height: 100px;
35+
width: 400px;
36+
}
37+
}
38+
@media(max-width:208px)
39+
{
40+
.container{
41+
min-width: fit-content;
42+
}
43+
}
2344
.search-box {
2445
width: 100%;
2546
display: flex;
26-
justify-content: space-between;
47+
justify-content: space-evenly;
2748
}
2849
.search-box input {
2950
padding: 5px;
30-
width: 70%;
51+
width: 50%;
52+
min-width: 170px;
3153
border: none;
3254
outline: none;
3355
border-bottom: 3px solid #ae9cff;
3456
font-size: 16px;
3557
}
3658
.search-box button {
3759
padding: 15px 0;
38-
width: 25%;
60+
width: 100px;
3961
background-color: #ae9cff;
4062
border: none;
4163
outline: none;
@@ -82,8 +104,17 @@ body {
82104
margin-top: 80px;
83105
text-align: center;
84106
}
85-
h1{ padding: 100px;
107+
h1{
108+
padding-top: 80px;
109+
font-size: 55px;
86110
text-align: center;
87111
text-decoration: underline;
88112
text-underline-position: under;
89-
}
113+
font-family: 'Cormorant Garamond', serif;
114+
}
115+
@media(max-width:371px)
116+
{
117+
h1{
118+
font-size: 35px;
119+
}
120+
}

0 commit comments

Comments
 (0)