Skip to content

Commit

Permalink
feat: add src
Browse files Browse the repository at this point in the history
  • Loading branch information
oyepriyansh committed Oct 3, 2023
1 parent f885ed7 commit 002462b
Show file tree
Hide file tree
Showing 3 changed files with 220 additions and 0 deletions.
48 changes: 48 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Dev Profiles</title>
<link rel="shortcut icon" href="https://oyepriyansh.pages.dev/i/favicon.ico" type="image/x-icon">
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/all.min.css" integrity="sha512-z3gLpd7yknf1YoNbCzqRKc4qyor8gaKU1qmn+CShxbuBusANI9QpRohGBreCFkKxLhei6S9CQXFEbbKuqLg0DA==" crossorigin="anonymous" referrerpolicy="no-referrer" />
</head>
<body>
<h1>Dev Profiles</h1>

<button class="add" onclick='window.open("https://github.com/oyepriyansh/DevProfiles","_blank")'">Add your Profile &nbsp; <i class="fa-sharp fa-solid fa-user-plus"></i> </button>

<div class="line"><br></div>

<div class="search">
<input type="text" id="searchInput" placeholder="Search by name or skill...">
</div>

<div class="container">

<!--Profiles-->

<div class="profile">
<div class="pfp"><img src="https://github.com/oyepriyansh.png" alt="User Image"></div>
<h3 class="name">Username</h3>
<div class="skills">
<span class="skill">React</span>
<span class="skill">NextJS</span>
<span class="skill">Python</span>
</div>
<div class="social">
<a href="" target="_blank"><i class="fa-brands fa-github"></i></a>
<a href="" target="_blank"><i class="fa-brands fa-x-twitter"></i></a>
<a href="" target="_blank"><i class="fa-brands fa-linkedin-in"></i></a>
</div>
</div>

<!--Profiles-->

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

</html>
19 changes: 19 additions & 0 deletions script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
const searchInput = document.getElementById('searchInput');
const profiles = document.querySelectorAll('.profile');

searchInput.addEventListener('input', filterProfiles);

function filterProfiles() {
const query = searchInput.value.toLowerCase();

profiles.forEach((profile) => {
const name = profile.querySelector('.name').textContent.toLowerCase();
const skills = profile.querySelector('.skills').textContent.toLowerCase();

if (name.includes(query) || skills.includes(query)) {
profile.style.display = 'block'; // Show matching profiles
} else {
profile.style.display = 'none'; // Hide non-matching profiles
}
});
}
153 changes: 153 additions & 0 deletions style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
@import url('https://fonts.googleapis.com/css2?family=PT+Serif&family=Poppins:wght@200&display=swap');

::-webkit-scrollbar {
width: 9px;
}

::-webkit-scrollbar-track {
background-color: #141414;
}

::-webkit-scrollbar-thumb {
background-color: #302f2f;
border-radius: 12px;
}

* {
margin: 0;
padding: 0;
box-sizing: border-box;
}

body {
background-color: #121212;
color: #ffffff;
font-family: Arial, sans-serif;
text-align: center;
}

h1 {
padding: 20px;
font-size: 36px;
font-family: 'PT Serif', serif;
}

.container {
display: flex;
flex-wrap: wrap;
justify-content: center;
max-width: 1200px;
margin: 0 auto;
padding: 20px;
}

.profile {
background-color: #292929;
border-radius: 10px;
padding: 20px;
margin: 20px;
width: calc(33.33% - 40px);
text-align: center;
transition: background-color 0.3s ease;
}

.profile:hover {
background-color: #333333;
}

.pfp img {
width: 100px;
height: 100px;
border-radius: 50%;
margin-bottom: 10px;
}

.name {
font-family: 'Poppins', sans-serif;
font-size: 20px;
margin-bottom: 10px;
}

.skills {
margin-bottom: 10px;
}

.skill {
background-color: #444;
padding: 5px 10px;
border-radius: 5px;
margin-right: 5px;
font-size: 14px;
display: inline-block;
}

.social {
margin-top: 10px;
}

.social a {
color: #ffffff;
margin: 0 10px;
font-size: 24px;
text-decoration: none;
}

.social a {
color: #ffffff;
margin: 0 10px;
font-size: 24px;
text-decoration: none;
transition: color 0.3s, font-size 0.3s;
}

.social a:hover {
color: #00aaff;
font-size: 28px;
}

@media screen and (max-width: 768px) {
.container {
justify-content: center;
}

.profile {
width: 100%;
}
}

button {
color: #fff;
padding: 10px 20px;
background-color: #2b3031;
border: none;
cursor: pointer;
font-family: 'Poppins',sans-serif;
font-size: 1.1em;
border-radius: 5%;
}

.search {
text-align: center;
margin-bottom: 20px;
}

#searchInput {
width: 80%;
padding: 10px;
border: none;
border-radius: 5px;
background-color: #121212;
color: #ffffff;
font-size: 16px;
box-shadow: 0px 0px 5px rgba(255, 255, 255, 0.2);
}

#searchInput::placeholder {
color: #777;
}

#searchInput:focus {
outline: none;
box-shadow: 0px 0px 5px rgba(255, 255, 255, 0.5);
}

0 comments on commit 002462b

Please sign in to comment.