<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport"…
- User
.container { background: #ffffff; border-radius: 10px; box-shadow: 20px 20px 60px #d9d9d9, -20px -20px 60px #ffffff; padding: 40px; max-width: 1000px; width: 100%; } h1 { text-align: center; margin-bottom: 30px; background: linear-gradient(180deg, #904e95, #e96443); background-clip: text; -webkit-background-clip: text; color: transparent; font-size: 2em; font-weight: bold; } .filters { display: flex; justify-content: space-between; margin-bottom: 30px; } select, input[type="search"] { padding: 10px; border: none; border-radius: 5px; box-shadow: inset 5px 5px 10px #d9d9d9, inset -5px -5px 10px #ffffff; font-size: 1em; outline: none; } select:focus, input[type="search"]:focus { box-shadow: 5px 5px 10px #d9d9d9, -5px -5px 10px #ffffff; } .job-listing { background: #f0f0f0; border-radius: 10px; box-shadow: 5px 5px 10px #d9d9d9, -5px -5px 10px #ffffff; padding: 20px; margin-bottom: 20px; position: relative; transition: transform 0.2s ease, box-shadow 0.2s ease; } .job-listing:hover { transform: translateY(-5px); box-shadow: 10px 10px 20px #d9d9d9, -10px -10px 20px #ffffff; } .job-title { font-size: 1.2em; font-weight: bold; color: #333; } .job-details { margin-top: 10px; color: #666; } .job-details i { margin-right: 5px; } /* Glow effect on hover */ .job-listing::before { content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 100%; border-radius: 10px; background: linear-gradient( 45deg, #ff0000, #ff7300, #fffb00, #48ff00, #00ffd5, #002bff, #7a00ff, #ff00c8, #ff0000 ); background-size: 400% 400%; animation: glow 5s ease infinite; opacity: 0; transition: opacity 0.2s ease; z-index: -1; } .job-listing:hover::before { opacity: 0.3; } @keyframes glow { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } } #cursor { width: 20px; height: 20px; border-radius: 50%; background: linear-gradient(to right, #1a2980, #26d0ce); position: fixed; pointer-events: none; z-index: 9999; transition: transform 0.1s ease; transform: translate(-50%, -50%);}
.logo-icon { width: 100px; height: 100px; border-radius: 50%; overflow: hidden; animation: rotate 5s linear infinite; }
.loading-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(91, 175, 149, 0.568); display: flex; justify-content: center; align-items: center; z-index: 10000; display: none; } @keyframes rotate { from { transform: rotate(0deg); } to { transform: rotate(360deg); } } </style>function searchJobs() { const searchQuery = document .getElementById("job-search") .value.toLowerCase(); const jobs = document.querySelectorAll(".job-listing"); jobs.forEach((job) => { const title = job .querySelector(".job-title") .textContent.toLowerCase(); if (title.includes(searchQuery)) { job.style.display = "block"; } else { job.style.display = "none"; } }); } const cursor = document.getElementById('cursor'); let mouseX = 0, mouseY = 0; let currentX = 0, currentY = 0; const speed = 0.1; document.addEventListener('mousemove', (e) => { mouseX = e.clientX; mouseY = e.clientY; }); function updateCursor() { currentX += (mouseX - currentX) * speed; currentY += (mouseY - currentY) * speed; cursor.style.left = `${currentX}px`; cursor.style.top = `${currentY}px`; requestAnimationFrame(updateCursor); } requestAnimationFrame(updateCursor); </script>Job Detail Page: Detailed information about a those job. goto job detail page when a user presses one among the job-listings.
- Assistant
Sure, to implement a job detail page that displays detailed information about a job when a user clicks on one of the job listings, we can use JavaScript to dynamically load the content into a new page or a modal popup.
For simplicity, I'll illustrate two options: the modal popup method and the redirection to a new detailed page.
Option 1: Modal Popup Method
This method will display job details in a popup modal.
- HTML Changes
Add a modal structure to the HTML:
<div id="job-detail-modal" class="modal"> <div class="modal-content"> <span class="close-button" onclick="closeModal()">×</span> <div id="job-detail-content"> <!-- Job details will be loaded here --> </div> </div> </div>- CSS for Modal
/* Modal Styles */ .modal { display: none; position: fixed; z-index: 1; padding-top: 100px; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgba(0, 0, 0, 0.4); } .modal-content { background-color: #fefefe; margin: auto; padding: 20px; border: 1px solid #888; width: 80%; } .close-button { color: #aaa; float: right; font-size: 28px; font-weight: bold; } .close-button:hover, .close-button:focus { color: black; text-decoration: none; cursor: pointer; }- JavaScript for Modal
// Open and Close Modal Functions function openModal(jobTitle, jobDetails) { const modal = document.getElementById("job-detail-modal"); const modalContent = document.getElementById("job-detail-content"); modalContent.innerHTML = ` <h2>${jobTitle}</h2> ${jobDetails} `; modal.style.display = "block"; } function closeModal() { const modal = document.getElementById("job-detail-modal"); modal.style.display = "none"; } // Close the modal when the user clicks anywhere outside of the modal window.onclick = function(event) { const modal = document.getElementById("job-detail-modal"); if (event.target === modal) { modal.style.display = "none"; } } // Add event listeners to job listings document.querySelectorAll(".job-listing").forEach(listing => { listing.onclick = function() { const jobTitle = listing.querySelector(".job-title").textContent; const jobDetails = listing.innerHTML; openModal(jobTitle, jobDetails); }; });Option 2: Redirection to a New Detailed Page
If you prefer to redirect users to a separate detailed page, the setup would involve a bit more work, such as creating separate HTML pages for each job or using query parameters to dynamically load job details. Below is an example of using query parameters:
- JavaScript Update for Redirection
document.querySelectorAll(".job-listing").forEach(listing => { listing.onclick = function() { const jobTitle = listing.querySelector(".job-title").textContent; const jobDetails = encodeURIComponent(listing.innerText); window.location.href = `job-detail.html?title=${encodeURIComponent(jobTitle)}&details=${jobDetails}`; }; });- Create
job-detail.htmlPage
Create a new HTML file named
job-detail.html:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>Job Detail</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css" /> <style> body { font-family: "Roboto", sans-serif; background: #f0f0f0; display: flex; justify-content: center; align-items: center; min-height: 100vh; padding: 20px; } .container { background: #ffffff; border-radius: 10px; box-shadow: 20px 20px 60px #d9d9d9, -20px -20px 60px #ffffff; padding: 40px; max-width: 1000px; width: 100%; } .job-detail { text-align: center; } .job-detail h1 { text-align: center; margin-bottom: 30px; background: linear-gradient(180deg, #904e95, #e96443); background-clip: text; -webkit-background-clip: text; color: transparent; font-size: 2em; font-weight: bold; } .job-details { margin-top: 10px; color: #666; } .job-details i { margin-right: 5px; } </style> </head> <body> <div class="container"> <div class="job-detail"> <h1 id="job-title"></h1> <div id="job-details"></div> </div> </div> <script> function getQueryParam(param) { const urlParams = new URLSearchParams(window.location.search); return urlParams.get(param); } document.getElementById("job-title").textContent = getQueryParam('title'); document.getElementById("job-details").textContent = decodeURIComponent(getQueryParam('details')); </script> </body> </html>This setup should provide a navigable and user-friendly job board with detailed job views. If you have any specific preferences or further customization needs, feel free to ask!