Skip to content

Commit

Permalink
Added Animated Search-bar (#291)
Browse files Browse the repository at this point in the history
## Related Issue
Add Animated Search Bar project

write issue no. here closes #284 

## Email id used to register for VSoc'24
devdabrajraj90@gmail.com

## Description
Added the Animated Search Bar project to our repository. The project
includes the following features:
1. A stylish and interactive search bar animation.
2. Smooth transitions and responsiveness.
3. Clean and organized code structure.
## Type of PR

- [ ] Bug fix
- [x ] Feature enhancement
- [ ] Documentation update
- [ ] Security enhancement
- [ ] Other (specify): _______________


check in issue by entering [X] in boxes

## Screenshots / Videos (if applicable)


https://github.com/user-attachments/assets/6a455c9b-3fc7-4f0f-a14c-8fa2a1da439e

## Checklist
- [x ] I have performed a self-review of my code.
- [x] I have read and followed the Contribution Guidelines.
- [ x] I have tested the changes thoroughly before submitting this pull
request.
- [x ] I have provided relevant issue numbers, screenshots, and videos
after making the changes.
- [x ] I have commented my code, particularly in hard-to-understand
areas.
- [x ] I have followed the code style guidelines of this project.
- [x ] I have checked for any existing open issues that my pull request
may address.
- [x ] I have ensured that my changes do not break any existing
functionality.
- [ x] Each contributor is allowed to create a maximum of 4 issues per
day. This helps us manage and address issues efficiently.
- [x ] I have read the resources for guidance listed below.
- [x ] I have followed security best practices in my code changes.

check in issue by entering [X] in boxes

## Additional Context
Verified the search bar works across different browsers.

## Contribution Guidelines

Thank you for considering contributing to our project! To ensure smooth
collaboration and effective contribution management, please adhere to
the following guidelines:

### Issue Creation

1. **Limit on Issues:**
- Each contributor is allowed to create a maximum of **4 issues per
day**. This helps us manage and address issues efficiently.

### Contribution Levels

2. **Basic Contributions:**
- This project is primarily focused on documentation. Most of the setup
has been completed, so contributors will generally need to work on basic
code tasks, such as writing tests.
   - For these tasks, issues will be assigned the **Easy** label.

3. **Acknowledging Hard Work:**
- If a contributor puts in significant effort on a task, the issue will
be upgraded to **Medium**. This is our way of recognizing and
appreciating extra effort.

4. **Feature Additions and Component Work:**
- Contributors working on new features or components using JSX/TSX will
be assigned a level based on the complexity and quality of their work.
- The more complex and valuable the contribution, the higher the level
assigned.

### Level Definitions

- **Easy:**
- Tasks are straightforward, such as fixing minor bugs, writing tests,
or making simple documentation updates.
- **Medium:**
- Tasks require more effort, such as addressing complex bugs, improving
existing features, or making substantial documentation improvements.
- **Hard:**
- Tasks are highly complex and involve significant new feature
development, major refactoring, or extensive contributions to the
project’s core components.

We look forward to your contributions and appreciate your effort in
helping us improve the project!
  • Loading branch information
dhairyagothi authored Jul 16, 2024
2 parents cd5cc13 + d494f2a commit ef85b86
Show file tree
Hide file tree
Showing 6 changed files with 128 additions and 16 deletions.
8 changes: 8 additions & 0 deletions public/Animated Searchbar/app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
const searchContainer = document.querySelector(".container");
const mic = document.querySelector(".mic-icon");
const magnifier = document.querySelector(".magnifier");

magnifier.addEventListener("click", () => {
searchContainer.classList.toggle("active");
mic.classList.toggle("hidden");
});
26 changes: 26 additions & 0 deletions public/Animated Searchbar/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@

<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Animated Search Bar</title>
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.1/css/all.min.css"
integrity="sha512-KfkfwYDsLkIlwQp6LFnl8zNdLGxu9YAA1QvwINks4PhcElQSvqcyVLLD9aMhXd13uQjoXtEKNosOWaZqXgel0g=="
crossorigin="anonymous"
referrerpolicy="no-referrer"
/>
<link rel="stylesheet" href="style.css" />
</head>
<body>
<div class="container">
<i class="fa-solid fa-magnifying-glass magnifier"> </i>
<input type="text" class="input" placeholder="Search..." />
<i class="fa-solid fa-microphone mic-icon"></i>
</div>

<script src="app.js"></script>
</body>
</html>
76 changes: 76 additions & 0 deletions public/Animated Searchbar/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: sans-serif;
}

body {
height: 100vh;
margin: 0;
display: flex;
justify-content: center;
align-items: center;
background: #1b1b1b;
}

.container{
display: flex;
align-items: center;
background: #292929;
padding: 5px;
width: 300px;
height: 50px;
border-radius: 50px;
box-shadow: 1px 1px 5px #292929;
margin: 10px;
position: relative;
transition: width 1.5s;
}

.input {
margin: 10px 50px;
width: 100%;
color: #fff;
border: none;
background: transparent;
outline: none;
transition-delay: 0.5s;
}

.magnifier {
position: absolute;
left: 15px;
width: 25px;
text-align: center;
margin: 0 auto;
cursor: pointer;
color: #ffa31a;
}

.mic-icon {
position: absolute;
right: 10px;
width: 30px;
transition: width 0.4s;
transition-delay: 0.5s;
color: #ffa31a;
}

/* JavaScript */
.active.container {
width: 50px;
display: flex;
}

.active .input {
width: 0;
}

.active .mic-icon {
width: 0;
}

.hidden {
visibility: hidden;
}
1 change: 1 addition & 0 deletions public/Word_dictionary/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,3 +126,4 @@ async function getData(word) {
wordBox.appendChild(meaning);
wordBox.appendChild(br);
}

27 changes: 12 additions & 15 deletions public/Word_dictionary/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Dictionary app</title>
<title>Dictionary App</title>
<link rel="stylesheet" href="./style.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
</head>
Expand All @@ -17,33 +17,30 @@ <h1>Word Dictionary</h1>
</nav>
<section class="input container">
<div id="box">
<h2>Find any word exist in the world</h2>
<div class="form__wrap">
<div class="input__wrap">
<input type="text" placeholder="Type a word" id="input">

<button id="start-btn">Start Speaking</button>
<button id="stop-btn">Stop</button>
<button id="search">Search</button>
<h2>Find any word that exists in the world</h2>
<div class="form__wrap">
<div class="input__wrap">
<input type="text" placeholder="Type a word" id="input">
<button id="start-btn" aria-label="Start Speaking">Start Speaking</button>
<button id="stop-btn" aria-label="Stop">Stop</button>
<button id="search" aria-label="Search">Search</button>
</div>
</div>
</div>
</div>
</section>
<section class="words_Meaning">


</section>
<section class="words_Meaning">
</section>

<section class="data container">
<span class="loading">Loading...</span>
<p class="def"></p>
<div class="audio"></div>
<div class="not__found"></div>
<div class="words_and_meaning">

</div>
</section>
<script src="./app.js"></script>
</body>

</html>
</html>
6 changes: 5 additions & 1 deletion public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,11 @@
<div class="project-name">code-space-game project</div>
<a href="/code-jump-space-game/index.html" class="demo-link">Demo</a>
</div>

<div class="table">
<div class="day-number">Day 77</div>
<div class="project-name">Animated Searchbar</div>
<a href="Animated Searchbar/index.html" class="demo-link">Demo</a>
</div>
<footer>
<div class="footer-container">
<div class="footer-left">
Expand Down

0 comments on commit ef85b86

Please sign in to comment.