Skip to content
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
25 changes: 20 additions & 5 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,42 @@
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"
/>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" crossorigin="anonymous">
<title>👨‍🎓 Showcase</title>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0jlpcV8Qyq46cDfL" crossorigin="anonymous"></script>
</head>
<body>
<header>
<h1>👨‍🎓 Students</h1>
<h1>👨‍🎓 Students</h1><div class="search-icon" ><button onclick="toggleSearchBox()">&#128269; </button></div><br>
<input type="text" id="search-box" placeholder="Search" class="hidden">
</div>
<nav>
<div class="navbar">
<a href="https://github.com/danishzayan/OpenSourceProject">
<i class="fa fa-github fa-lg"></i> GitHub
</a>
<!-- <a href="https://www.linkedin.com/in/danishzayan">About</a> -->
<!-- <a href="http://">Team</a> -->

</nav>
</header>
<div class="container mt-4">
<div class="row">
<div class="col-12 justify-contents-center mx-auto ">



<main>
<section id="card-container">
<a href="http://" target="_blank" rel="noopener noreferrer"></a>
</section>
</main>
<div id="scroll-to-top-button" onclick="scrollToTop()">
<i class="fa fa-chevron-up"></i>
</div>
<script type="module" src="script.js"></script>
<script> function toggleSearchBox() {
const searchBox = document.getElementById("search-box");
searchBox.classList.toggle("hidden");}</script>
<script type="module" src="script.js">


</script>
</body>
</html>
6 changes: 5 additions & 1 deletion script.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import userProfiles from "./profileData.js";

function toggleSearchBox() {
const searchBox = document.getElementById("search-box");
searchBox.classList.toggle("hidden");
}
function displayUserContributions() {
const cardContainer = document.getElementById("card-container");

Expand Down Expand Up @@ -93,3 +96,4 @@ console.log(top);
document
.getElementById("scroll-to-top-button")
.addEventListener("click", scrollToTop);

51 changes: 51 additions & 0 deletions style.css
Original file line number Diff line number Diff line change
Expand Up @@ -230,3 +230,54 @@ header nav a:hover {
opacity: 0;
}
}
.center {
border: 5px solid;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
padding: 10px;
}
/* Add your desktop styles here */
.navbar {
display: flex;
justify-content: space-between;
}

/* Add your responsive styles here */

/* ... (your existing styles) ... */

/* Position the search container horizontally and stack elements vertically */
@media (max-width: 768px) {
.search-container {
display: flex;
flex-direction: column;
align-items: center;
margin-top: 10px; /* Adjust the margin as needed */
}

/* Style the search button as needed */
.search-icon {
background: none;
border: none;
font-size: 24px;
cursor: pointer;
}

/* Ensure that the input box is hidden by default */
.hidden {
display: none;
}}
@media (min-width: 768px) {
.search-icon {
display: inline;
}
.search-icon {
background: none;
border: none;
font-size: 24px;
cursor: pointer;
}

}