Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue #55 #259

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 62 additions & 3 deletions css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,65 @@ header {
font-weight: bold;
}

/* Animated search-bar */

nav .searchbar {
position: absolute;/*change*/
margin-left: 19rem;
}

/* Styling the search box where the
input would be given */
nav .searchbar input[type="text"] {
outline: none;
border:0;
padding: 0;
width: 0px;
height: 30px;
border-radius: 3px;
transition: all 0.3s ease;
}

/* Styling the search bar icon */
nav .searchbar .icon {
display: flex;
position: absolute;
top: 0;
right: 0;
left: -5px;
width: 35px;
height: 100%;
background: none;
border-radius: 3px;
color: #fff;
transition: all 0.5s 0.3s ease;
}

nav .searchbar .icon i {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
cursor: pointer;
}

nav .searchbar .icon.active {
background: #062333;
transition: all 0.3s ease;
}

nav .searchbar input[type="text"].active {
width: 200px;
padding: 0 40px;
transition: all 0.5s 0.2s ease;
}







.brand1 {
color: #3caea3;
padding-right: 0.5rem;
Expand All @@ -99,8 +158,8 @@ header {

.nav-items {
color: white !important;
margin-left: 3rem;
padding-right: 2rem !important;
margin-left: 2rem;
padding-right: 1rem !important;
}

.navbar-nav .nav-link {
Expand Down Expand Up @@ -682,4 +741,4 @@ hr {

#social-sidebar a[class*="github"]:hover,
#social-sidebar a[class*="github"] span,
#social-sidebar a[class*="github"] span:before {background: #9C7A5B;}
#social-sidebar a[class*="github"] span:before {background: #9C7A5B;}
23 changes: 22 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,17 @@
preloader.style.display = 'none';
}
</script>
<!--Linking the script for search bar animation-->
<script src="https://code.jquery.com/jquery-3.5.1.min.js"></script>

<script>
$(document).ready(function() {
$(".fa-search").click(function() {
$(".icon").toggleClass("active");
$("input[type='text']").toggleClass("active");
});
});
</script>


</head>
Expand Down Expand Up @@ -89,6 +100,16 @@
<a class="dropdown-item" href="practicedsa.html">DSA Problems</a>

</div>
<!--Placing the search bar as a list item-->
<li class="searchbar">
<div class="searchbar">
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use proper indentations.

<input type="text" placeholder="search">
<div class="icon">
<i class="fas fa-search"></i>
</div>
</div>


</ul>

</div>
Expand Down Expand Up @@ -239,4 +260,4 @@ <h5 class="font-weight-bold text-white mb-lg-4 pb-2 margin-top-mobile">Follow Us

</body>

</html>
</html>