Skip to content

Commit

Permalink
fix: directory 404 pages js and css display
Browse files Browse the repository at this point in the history
  • Loading branch information
oyepriyansh committed Oct 7, 2023
1 parent 22367c4 commit 33dd0e5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 35 deletions.
10 changes: 4 additions & 6 deletions 404.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
<title>DevProfiles - 404 Not-Found</title>
<meta name="description" content="DevProfiles is a platform for developers to easily share their profiles, spotlight your skills, and connect with fellow developers in the community.">
<meta name="author" content="Priyansh Prajapat">
<meta name="robots" content="index, follow">
<meta property="og:title" content="DevProfiles - 404 Not-Found">
<meta property="og:description" content="DevProfiles is a platform for developers to easily share their profiles, spotlight your skills, and connect with fellow developers in the community.">
<meta property="og:image" content="https://profile.is-a.dev/assets/devprofiles.jpg">
Expand All @@ -17,10 +16,9 @@
<meta name="twitter:description" content="DevProfiles is a platform for developers to easily share their profiles, spotlight your skills, and connect with fellow developers in the community.">
<meta name="twitter:image" content="https://profile.is-a.dev/assets/devprofiles.jpg">
<meta name="github" content="https://github.com/oyepriyansh/DevProfiles">
<meta name="google-site-verification" content="e9Bhucu2K3Rh7A6l2YCSSPnnldDLjpdGyVQ011d_nc8" />
<link rel="canonical" href="https://profile.is-a.dev">
<link rel="shortcut icon" href="assets/favicon.ico" type="image/x-icon">
<link rel="stylesheet" href="css/404.css">
<link rel="shortcut icon" href="/assets/favicon.ico" type="image/x-icon">
<link rel="stylesheet" href="/css/404.css">
<script async src="https://www.googletagmanager.com/gtag/js?id=G-GTFGBS8HG8"></script>
<script type="text/javascript" src="https://oyepriyansh.pages.dev/cdnjs/analytics/devprofiles.js"></script>
</head>
Expand All @@ -32,6 +30,6 @@
<center><button onclick='location.href="/"'>Back to Home</button></center>
</div>
</div>
<script src="js/404.js"></script>
<script src="/js/404.js"></script>
</body>
</html>
</html>
29 changes: 0 additions & 29 deletions js/theme.js
Original file line number Diff line number Diff line change
@@ -1,32 +1,3 @@
const searchInput = document.getElementById('searchInput');
const profiles = document.querySelectorAll('.profile');
const noProfileDiv = document.getElementById('no-profile');
searchInput.addEventListener('input', filterProfiles);

function filterProfiles() {
const query = searchInput.value.toLowerCase();
let hasMatchingProfile = false;
profiles.forEach((profile) => {
const name = profile.querySelector('.name').textContent.toLowerCase();
const skills = profile.querySelector('.skills').textContent.toLowerCase();
if (name.includes(query) || skills.includes(query)) {
hasMatchingProfile = true;
profile.style.display = 'block'; // Show matching profiles
} else {
profile.style.display = 'none'; // Hide non-matching profiles
}
});
if (hasMatchingProfile) {
noProfileDiv.style.display = 'none';
} else {
noProfileDiv.style.display = 'block';
}

}


// Light and dark mode implementetion

const colorSwitch = document.getElementById("input-toggle-button");
colorSwitch.addEventListener("click", checkMode);

Expand Down

0 comments on commit 33dd0e5

Please sign in to comment.