Auto commit: 2025-09-17T15:26:17.516Z
This commit is contained in:
parent
34e0e19b90
commit
0ad162d6ac
@ -53,4 +53,76 @@ document.addEventListener('DOMContentLoaded', function () {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 3. Toggle for the new job search form
|
||||
const toggleBtn = document.getElementById('toggle-search-form');
|
||||
const searchForm = document.getElementById('job-search-form');
|
||||
|
||||
if (toggleBtn && searchForm) {
|
||||
toggleBtn.addEventListener('click', function() {
|
||||
if (searchForm.style.display === 'none') {
|
||||
searchForm.style.display = 'block';
|
||||
} else {
|
||||
searchForm.style.display = 'none';
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 4. Handle search form submission
|
||||
const searchFormElement = document.getElementById('job-search-form');
|
||||
if (searchFormElement) {
|
||||
searchFormElement.addEventListener('submit', function(event) {
|
||||
event.preventDefault();
|
||||
|
||||
const titleQuery = this.querySelector('input[placeholder="Job title"]').value.toLowerCase().trim();
|
||||
const locationQuery = this.querySelector('input[placeholder="Location"]').value.toLowerCase().trim();
|
||||
const typeQuery = this.querySelector('select').value;
|
||||
|
||||
const allJobCards = document.querySelectorAll('.job-card');
|
||||
const noResults = document.getElementById('no-results');
|
||||
let matches = 0;
|
||||
|
||||
allJobCards.forEach(function(card) {
|
||||
const title = card.querySelector('h5').textContent.toLowerCase();
|
||||
const location = card.querySelector('p').textContent.toLowerCase();
|
||||
const type = card.querySelector('.badge').textContent;
|
||||
|
||||
const titleMatch = title.includes(titleQuery);
|
||||
const locationMatch = location.includes(locationQuery);
|
||||
const typeMatch = (typeQuery === 'All') || (typeQuery.toLowerCase() === type.toLowerCase());
|
||||
|
||||
if (titleMatch && locationMatch && typeMatch) {
|
||||
card.parentElement.style.display = '';
|
||||
matches++;
|
||||
} else {
|
||||
card.parentElement.style.display = 'none';
|
||||
}
|
||||
});
|
||||
|
||||
if (matches === 0) {
|
||||
noResults.style.display = 'block';
|
||||
} else {
|
||||
noResults.style.display = 'none';
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 5. Handle search reset
|
||||
const resetBtn = document.getElementById('reset-search');
|
||||
if (resetBtn) {
|
||||
resetBtn.addEventListener('click', function() {
|
||||
const searchFormElement = document.getElementById('job-search-form');
|
||||
searchFormElement.querySelector('input[placeholder="Job title"]').value = '';
|
||||
searchFormElement.querySelector('input[placeholder="Location"]').value = '';
|
||||
searchFormElement.querySelector('select').selectedIndex = 0;
|
||||
|
||||
const allJobCards = document.querySelectorAll('.job-card');
|
||||
allJobCards.forEach(function(card) {
|
||||
card.parentElement.style.display = '';
|
||||
});
|
||||
|
||||
const noResults = document.getElementById('no-results');
|
||||
noResults.style.display = 'none';
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
50
careers.php
50
careers.php
@ -9,21 +9,21 @@ header("Expires: 0");
|
||||
$jobs = [
|
||||
[
|
||||
'id' => 1,
|
||||
'title' => 'Senior Frontend Developer – Space Data Platform',
|
||||
'title' => 'Senior Frontend Developer – Space Data Platform Engineering',
|
||||
'department' => 'Engineering',
|
||||
'location' => 'Remote',
|
||||
'type' => 'Full-time'
|
||||
],
|
||||
[
|
||||
'id' => 2,
|
||||
'title' => 'Product Manager – Orbital Systems & Services',
|
||||
'title' => 'Product Manager – Orbital Systems & Services Product',
|
||||
'department' => 'Product',
|
||||
'location' => 'New York, NY',
|
||||
'type' => 'Full-time'
|
||||
],
|
||||
[
|
||||
'id' => 3,
|
||||
'title' => 'UI/UX Designer – Mission-Control Interfaces',
|
||||
'title' => 'UI/UX Designer – Mission-Control Interfaces Design',
|
||||
'department' => 'Design',
|
||||
'location' => 'Remote',
|
||||
'type' => 'Contract'
|
||||
@ -35,7 +35,7 @@ $jobs = [
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Careers - HR Platform</title>
|
||||
<title>Careers - CosmicHire</title>
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
@ -49,7 +49,7 @@ $jobs = [
|
||||
<!-- Header -->
|
||||
<nav class="navbar navbar-expand-lg navbar-light">
|
||||
<div class="container">
|
||||
<a class="navbar-brand" href="index.php">HR Platform</a>
|
||||
<a class="navbar-brand" href="index.php">CosmicHire</a>
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
@ -72,34 +72,29 @@ $jobs = [
|
||||
<h1>Find Your Next Opportunity</h1>
|
||||
<p class="lead mb-4">Join our team and help us build the future of work.</p>
|
||||
<div class="col-md-8 mx-auto">
|
||||
<div class="text-center">
|
||||
<button id="search-toggle-btn" class="btn btn-primary btn-lg" type="button">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-search"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line></svg>
|
||||
Search Job Listings
|
||||
</button>
|
||||
<div class="d-grid">
|
||||
<button class="btn btn-primary btn-lg" type="button" id="toggle-search-form">Search Jobs</button>
|
||||
</div>
|
||||
<form id="job-search-form" class="d-none mt-4 p-4 border rounded bg-light">
|
||||
<form id="job-search-form" class="mt-4" style="display: none;">
|
||||
<div class="row g-3">
|
||||
<div class="col-md-5">
|
||||
<label for="job-title" class="form-label">Job title</label>
|
||||
<input type="text" class="form-control" id="job-title" placeholder="e.g., Product Manager">
|
||||
<input type="text" class="form-control" placeholder="Job title">
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<label for="work-format" class="form-label">Work format</label>
|
||||
<select id="work-format" class="form-select">
|
||||
<option selected>Choose...</option>
|
||||
<option>Full-time</option>
|
||||
<option>Contract</option>
|
||||
<option>Part-time</option>
|
||||
</select>
|
||||
<input type="text" class="form-control" placeholder="Location">
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label for="location" class="form-label">Location</label>
|
||||
<input type="text" class="form-control" id="location" placeholder="e.g., New York">
|
||||
<select class="form-select">
|
||||
<option selected>All</option>
|
||||
<option value="full-time">Full-time</option>
|
||||
<option value="part-time">Part-time</option>
|
||||
<option value="contract">Contract</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-center mt-4">
|
||||
<button type="submit" class="btn btn-primary">Find Jobs</button>
|
||||
<div class="d-grid mt-3">
|
||||
<button class="btn btn-secondary" type="submit">Find Jobs</button>
|
||||
<button class="btn btn-outline-secondary mt-2" type="button" id="reset-search">Reset</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
@ -124,6 +119,9 @@ $jobs = [
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<div id="no-results" class="text-center" style="display: none;">
|
||||
<p class="lead">No jobs found matching your criteria.</p>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
@ -143,7 +141,7 @@ $jobs = [
|
||||
<section class="container my-5">
|
||||
<div class="row align-items-center flex-row-reverse">
|
||||
<div class="col-md-6">
|
||||
<img src="https://picsum.photos/seed/office-perks/800/600" class="img-fluid rounded" alt="A person writing on a whiteboard during a brainstorming session.">
|
||||
<img src="https://picsum.photos/seed/milky-way-person/800/600" class="img-fluid rounded" alt="A person standing in front of the Milky Way, representing the vast opportunities at our company.">
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<h3>Our Benefits</h3>
|
||||
@ -155,7 +153,7 @@ $jobs = [
|
||||
<!-- Footer -->
|
||||
<footer class="footer">
|
||||
<div class="container">
|
||||
<p>© <?php echo date('Y'); ?> HR Platform. All Rights Reserved.</p>
|
||||
<p>© <?php echo date('Y'); ?> CosmicHire. All Rights Reserved.</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
45
index.php
45
index.php
@ -1,4 +1,10 @@
|
||||
<?php
|
||||
// Disable caching
|
||||
header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0");
|
||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
header("Pragma: no-cache");
|
||||
header("Expires: 0");
|
||||
|
||||
// Sample data for job listings
|
||||
$jobs = [
|
||||
[
|
||||
@ -44,7 +50,7 @@ $jobs = [
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Careers - HR Platform</title>
|
||||
<title>CosmicHire</title>
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
@ -58,7 +64,7 @@ $jobs = [
|
||||
<!-- Header -->
|
||||
<nav class="navbar navbar-expand-lg navbar-light">
|
||||
<div class="container">
|
||||
<a class="navbar-brand" href="index.php">HR Platform</a>
|
||||
<a class="navbar-brand" href="index.php">CosmicHire</a>
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
@ -80,11 +86,31 @@ $jobs = [
|
||||
<div class="container">
|
||||
<h1>Find Your Next Opportunity</h1>
|
||||
<p class="lead mb-4">Join our team and help us build the future of work.</p>
|
||||
<div class="col-md-6 mx-auto">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control form-control-lg" placeholder="Search for jobs...">
|
||||
<button class="btn btn-secondary" type="button">Search</button>
|
||||
<div class="col-md-8 mx-auto">
|
||||
<div class="d-grid">
|
||||
<button class="btn btn-primary btn-lg" type="button" id="toggle-search-form">Search Jobs</button>
|
||||
</div>
|
||||
<form id="job-search-form" class="mt-4" style="display: none;">
|
||||
<div class="row g-3">
|
||||
<div class="col-md-5">
|
||||
<input type="text" class="form-control" placeholder="Job title">
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<input type="text" class="form-control" placeholder="Location">
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<select class="form-select">
|
||||
<option selected>All</option>
|
||||
<option value="full-time">Full-time</option>
|
||||
<option value="part-time">Part-time</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="d-grid mt-3">
|
||||
<button class="btn btn-secondary" type="submit">Find Jobs</button>
|
||||
<button class="btn btn-outline-secondary mt-2" type="button" id="reset-search">Reset</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
@ -107,6 +133,9 @@ $jobs = [
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<div id="no-results" class="text-center" style="display: none;">
|
||||
<p class="lead">No jobs found matching your criteria.</p>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
@ -126,7 +155,7 @@ $jobs = [
|
||||
<section class="container my-5">
|
||||
<div class="row align-items-center flex-row-reverse">
|
||||
<div class="col-md-6">
|
||||
<img src="https://picsum.photos/seed/team-perks/800/600" class="img-fluid rounded" alt="Team members enjoying perks in a relaxed office environment.">
|
||||
<img src="https://picsum.photos/seed/milky-way-person/800/600" class="img-fluid rounded" alt="A person standing in front of the Milky Way, representing the vast opportunities at our company.">
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<h3>Our Benefits</h3>
|
||||
@ -138,7 +167,7 @@ $jobs = [
|
||||
<!-- Footer -->
|
||||
<footer class="footer">
|
||||
<div class="container">
|
||||
<p>© <?php echo date('Y'); ?> HR Platform. All Rights Reserved.</p>
|
||||
<p>© <?php echo date('Y'); ?> CosmicHire. All Rights Reserved.</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
@ -1,4 +1,10 @@
|
||||
<?php
|
||||
// Disable caching
|
||||
header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0");
|
||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
header("Pragma: no-cache");
|
||||
header("Expires: 0");
|
||||
|
||||
// Simulate fetching job data based on an ID from the URL
|
||||
$jobs = [
|
||||
[
|
||||
@ -99,8 +105,8 @@ foreach ($jobs as $j) {
|
||||
}
|
||||
|
||||
// SEO and page metadata
|
||||
$page_title = $job ? htmlspecialchars($job['title']) . ' - Flatlogic HR' : 'Job Not Found';
|
||||
$page_description = $job ? 'Apply for the ' . htmlspecialchars($job['title']) . ' position at Flatlogic. Location: ' . htmlspecialchars($job['location']) : 'The job you are looking for could not be found.';
|
||||
$page_title = $job ? htmlspecialchars($job['title']) . ' - CosmicHire' : 'Job Not Found';
|
||||
$page_description = $job ? 'Apply for the ' . htmlspecialchars($job['title']) . ' position at CosmicHire. Location: ' . htmlspecialchars($job['location']) : 'The job you are looking for could not be found.';
|
||||
$page_keywords = 'jobs, careers, hiring, ' . ($job ? htmlspecialchars($job['title']) : '');
|
||||
|
||||
?>
|
||||
@ -189,7 +195,7 @@ $page_keywords = 'jobs, careers, hiring, ' . ($job ? htmlspecialchars($job['titl
|
||||
<nav class="navbar navbar-expand-lg navbar-light bg-white shadow-sm">
|
||||
<div class="container">
|
||||
<a class="navbar-brand" href="index.php">
|
||||
<img src="https://flatlogic.com/assets/logo.svg" alt="Flatlogic Logo">
|
||||
<img src="https://flatlogic.com/assets/logo.svg" alt="CosmicHire Logo">
|
||||
</a>
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
@ -275,12 +281,13 @@ $page_keywords = 'jobs, careers, hiring, ' . ($job ? htmlspecialchars($job['titl
|
||||
|
||||
<footer class="text-center text-muted">
|
||||
<div class="container">
|
||||
<p>© <?php echo date('Y'); ?> Flatlogic, Inc. All rights reserved.</p>
|
||||
<p>© <?php echo date('Y'); ?> CosmicHire. All rights reserved.</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
|
||||
<script src="assets/js/main.js?v=<?php echo time(); ?>"></script>
|
||||
<script>
|
||||
feather.replace();
|
||||
</script>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user