Skip to content

Commit

Permalink
added search icon: thecloudcode
Browse files Browse the repository at this point in the history
  • Loading branch information
thecloudcode committed Jun 13, 2024
1 parent 14a62e3 commit 6a2b124
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 8 deletions.
10 changes: 8 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-icons/1.8.1/font/bootstrap-icons.min.css">
<script src="https://kit.fontawesome.com/b08b6de27e.js" crossorigin="anonymous"></script>
<script src="https://unpkg.com/scrollreveal"></script>
<link rel="stylesheet" href=
"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<title>Beautiify</title>
</head>

Expand Down Expand Up @@ -75,9 +77,13 @@ <h3 class="sub-head">Every component, on the right place!!</h3>

<div class="container" id="components">
<!-- Search Bar -->
<!-- <br> -->
<h1 style="color: white;">Search Component</h1>
<div id="searchBar">
<h1>Search Component</h1><br>
<input type="text" id="componentSearch" placeholder="Enter Component Name" oninput="filterComponents()">
<div class="search-wrapper">
<i class="fas fa-search search-icon"></i>
<input type="text" id="componentSearch" placeholder="Enter Component Name" oninput="filterComponents()">
</div>
</div>

<div class="no-results">
Expand Down
59 changes: 53 additions & 6 deletions style.css
Original file line number Diff line number Diff line change
Expand Up @@ -664,20 +664,51 @@ footer p a {
/* Search Bar Css */

#searchBar {
display: flex;
text-align: center;
border-radius: 50px;
margin: 4rem 4rem 0;
color: white;
margin: 2rem 60rem ;
/* margin: auto; */
width: 100%;
}

#searchBar h1 {
.search-icon {
color: black;
font-size: 1.5rem; /* Adjust icon size as needed */
margin-left: 2rem; /* Optional margin for spacing */
}

#components h1 {
font-family: Ubuntu;
font-size: 4rem;
text-shadow: 2px 2px 10px var(--light);
margin-top: 16px;

}

.search-wrapper {
display: flex;
align-items: center;
justify-content: center;
width: 30rem;
height: 4rem;
border-radius: 2rem;
transition: all linear 0.2s;
background-color: white;
cursor: pointer;
margin-top: auto;
margin-bottom: auto;
margin-left: 5%;
/* margin-right: 10%; */
}

.search-wrapper:hover {
transform: scale(1.02);
box-shadow: -5px -5px 10px #9961a1;
}


#searchBar button {
font-size: 2.5rem;
background: transparent;
Expand All @@ -698,7 +729,23 @@ footer p a {
background: rgba(255, 255, 255, 0.881);
}

#searchBar input {
#componentSearch {
font-family: 'Poppins', sans-serif;
border: 0;
outline: none; /* Remove default focus outline */

padding: 1rem;
height: 4rem;
font-size: 2rem; /* Adjust font size as needed for consistency */
text-align: center;
border-radius: 2rem;
width: 40rem; /* Fills remaining space in the wrapper */
transition: all linear 0.2s;
font-weight: 600;
padding-right: 0 !important;
}

/* #searchBar input {
font-family: 'Poppins', sans-serif;
border: 0;
padding: 1rem;
Expand All @@ -710,12 +757,12 @@ footer p a {
transition: all linear .2s;
font-weight: 600;
padding-right: 0 !important;
}
} */

#searchBar input:hover {
/* #searchBar input:hover {
transform: scale(1.02);
box-shadow: -5px -5px 10px #9961a1;
}
} */

.no-results {
display: none;
Expand Down

0 comments on commit 6a2b124

Please sign in to comment.