Skip to content

Commit

Permalink
file upload
Browse files Browse the repository at this point in the history
  • Loading branch information
Rajat Samant committed May 13, 2024
0 parents commit 75045fe
Show file tree
Hide file tree
Showing 4 changed files with 414 additions and 0 deletions.
Binary file added Assests/sunflower.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
88 changes: 88 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Dicty</title>
<link
rel="stylesheet"
href="https://fonts.googleapis.com/icon?family=Material+Icons"
/>
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css"
/>

<link rel="stylesheet" href="main.css" />
</head>
<body>
<nav>
<div class="logo">
<img
width="60"
height="60"
src="https://img.icons8.com/clouds/100/glossary.png"
alt="glossary"
/>
</div>
<ul>
<li><a href="https://dictionaryapi.dev/">API</a></li>
<li><a href="https://github.com/Rajat069">Github</a></li>
</ul>
</nav>
<div class="wrapper">
<header>
<i class="fa-solid fa-spell-check"></i> English Dictionary
</header>
<div class="search">
<input
type="text"
placeholder="Search a word"
required
spellcheck="false"
/>
<i class="fas fa-search"></i>
<span class="material-icons">close</span>
</div>
<p class="info-text">
Type any existing word and press enter to get meaning, example,
synonyms, etc.
</p>
<ul>
<li class="word">
<div class="details">
<p>__</p>
<span>_ _</span>
</div>
<i class="fas fa-volume-up"></i>
</li>
<div class="content">
<li class="meaning">
<div class="details">
<p>Meaning</p>
<span>___</span>
<span id="m2">__</span>
</div>
</li>
<li class="example">
<div class="details">
<p>Example</p>
<span>___</span>
</div>
</li>
<li class="synonyms">
<div class="details">
<p>Synonyms</p>
<div class="list"></div>
</div>
</li>
</div>
</ul>
</div>
<script src="main.js"></script>
<script
src="https://kit.fontawesome.com/55c8767a80.js"
crossorigin="anonymous"
></script>
</body>
</html>
224 changes: 224 additions & 0 deletions main.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,224 @@
/* Import Google Font - Poppins */
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap");
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: "Poppins", sans-serif;
}
body {
display: flex;
align-items: center;
flex-direction: column;
justify-content: center;
min-height: 100vh;
background: url(./Assests/sunflower.jpg);
background-repeat: no-repeat;
background-size: cover;
}
::selection {
color: #fff;
background: #ecc059;
}
nav a:hover {
color: #117108;
}
nav {
position: fixed;
top: 0;
height: 8vh;
background: #f4c24e;
width: 100%;
display: flex;
flex-direction: row;
align-items: center;
border-bottom: 2px solid #646432;
}
nav ul {
margin-left: auto;
display: flex;
flex-direction: row;
list-style: none;
align-items: center;
justify-items: center;
}
nav ul a {
text-decoration: none;
color: #000;
font-size: 18px;
font-weight: 300;
margin: 0 30px;
}
.logo img {
margin-left: 3vh;
}
.wrapper {
width: 520px;
border-radius: 7px;
background: #fff;
padding: 25px 28px 45px;
box-shadow: 7px 7px 20px rgba(0, 0, 0, 0.05);
}
.wrapper header {
font-size: 28px;
font-weight: 500;
text-align: center;
}
.wrapper .search {
position: relative;
margin: 35px 0 18px;
}
.search input {
height: 53px;
width: 100%;
outline: none;
font-size: 16px;
border-radius: 5px;
padding: 0 42px;
border: 1px solid #999;
}
.search input:focus {
padding: 0 41px;
border: 3px solid #f4c24e;
}
.search input::placeholder {
color: #b8b8b8;
}
.search :where(i, span) {
position: absolute;
top: 50%;
color: #999;
transform: translateY(-50%);
}
.search i {
left: 18px;
pointer-events: none;
font-size: 16px;
}
.search input:focus ~ i {
color: #f4c24e;
}
.search span {
right: 15px;
cursor: pointer;
font-size: 18px;
display: none;
}
.search input:valid ~ span {
display: block;
}
.wrapper .info-text {
font-size: 13px;
color: #9a9a9a;
margin: -3px 0 -10px;
}
.wrapper.active .info-text {
display: none;
}
.info-text span {
font-weight: 500;
}
.wrapper ul {
height: 0;
opacity: 0;
padding-right: 1px;
overflow-y: hidden;
transition: all 0.2s ease;
}
.wrapper.active ul {
opacity: 1;
height: 303px;
}
.wrapper ul li {
display: flex;
list-style: none;
margin-bottom: 14px;
align-items: center;
padding-bottom: 17px;
border-bottom: 1px solid #d9d9d9;
justify-content: space-between;
}
ul li:last-child {
margin-bottom: 0;
border-bottom: 0;
padding-bottom: 0;
}
ul .word p {
font-size: 22px;
font-weight: 500;
}
ul .word span {
font-size: 12px;
color: #989898;
}
ul .word i {
color: #999;
font-size: 15px;
cursor: pointer;
}
ul .content {
max-height: 215px;
overflow-y: auto;
}
ul .content::-webkit-scrollbar {
width: 0px;
}
.details {
display: flex;
flex-direction: column;
}
.content li .details {
padding-left: 10px;
border-radius: 4px 0 0 4px;
border-left: 3px solid #646432;
}
.content li p {
font-size: 17px;
font-weight: 500;
}
.content li span {
font-size: 15px;
color: #7e7e7e;
}
.content .synonyms .list {
display: flex;
flex-wrap: wrap;
}
.content .synonyms span {
cursor: pointer;
margin-right: 5px;
text-decoration: underline;
}
@media (max-width: 550px) {
.wrapper {
width: 40vh;
}
}
@media (max-width: 400px) {
.wrapper header {
font-size: 18px;
}
ul .word p {
font-size: 15px;
font-weight: 300;
}
.search input {
height: 40px;
}
nav ul a {
margin: 0 10px;
font-size: 15px;
}
p {
font-size: 15px !important;
}
}
@media (min-width: 900px) and (max-width: 1100px) {
nav ul a {
font-size: 30px;
}
nav img {
width: 100px;
height: 100px;
}
}
Loading

0 comments on commit 75045fe

Please sign in to comment.