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
5 changes: 1 addition & 4 deletions public/js/interactivity.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ document.addEventListener("DOMContentLoaded", function() {
applyJob(body);
});

// Add an event listener for the "Hire with UpWork" link
document.querySelector('a[href="#HireWithUpWork"]').addEventListener("click", function(e) {
e.preventDefault();
window.location.href = "/jobpost";
Expand Down Expand Up @@ -73,10 +72,8 @@ function handleLogin(username, password) {
.then(response => response.json())
.then(data => {
if (data.message === 'Login successful') {
// Redirect user to their profile page
window.location.href = '/profile';
} else {
// Display other messages
alert(data.message);
}
})
Expand Down Expand Up @@ -129,4 +126,4 @@ function submitJobPosting(jobData) {
function validateEmail(email) {
const re = /^(([^<>()\[\]\\.,;:\s@\"]+(\.[^<>()\[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
return re.test(email);
}
}
25 changes: 23 additions & 2 deletions styles/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,14 @@ button:hover {

.job-card h2 {
margin-bottom: 12px;
color: #333;
font-size: 20px;
}

.job-card p {
margin-bottom: 6px;
color: #666;
line-height: 1.4;
}

.login-container,
Expand All @@ -102,6 +106,22 @@ button:focus {
outline: 3px solid #007bff;
}

.apply-button {
display: inline-block;
background: #007bff;
color: #ffffff;
border: none;
padding: 12px 24px;
margin-top: 12px;
cursor: pointer;
border-radius: 6px;
transition: background 0.3s ease;
}

.apply-button:hover {
background: #0056b9;
}

@media (max-width: 768px) {
.container {
width: 95%;
Expand All @@ -110,9 +130,10 @@ button:focus {

footer {
background-color: #000;
color: #000; /* Modified color to black from #fff */
color: #fff;
padding: 20px;
text-align: center;
text-shadow: none;
z-index: 1000;
position: relative;
position: relative;
}
21 changes: 13 additions & 8 deletions views/jobListing.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,28 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Job Listings</title>
<link rel="stylesheet" href="/css/styles.css">
<link rel="stylesheet" href="/styles/main.css">
</head>
<body>
<div class="container">
<% if(jobs && jobs.length > 0) { %>
<% jobs.forEach(function(job) { %>
<div class="job-listing">
<h2><%= job.companyName %></h2>
<p>Role: <%= job.role %></p>
<p>Domain: <%= job.domain %></p>
<p>Location: <%= job.location %></p>
<p>Skills Required: <%= job.skillsRequired.join(', ') %></p>
<p>Nature of Work: <%= job.natureOfWork %></p>
<div class="job-card">
<div class="job-listing">
<h2><%= job.companyName %></h2>
<p>Role: <%= job.role %></p>
<p>Domain: <%= job.domain %></p>
<p>Location: <%= job.location %></p>
<p>Skills Required: <%= job.skillsRequired.join(', ') %></p>
<p>Nature of Work: <%= job.natureOfWork %></p>
</div>
<a href="<%= job.jobPostingLink %>" class="apply-button">Apply</a>
</div>
<% }); %>
<% } else { %>
<p>No job listings available at the moment.</p>
<% } %>
</div>
</body>
<script src="/public/js/interactivity.js"></script>
</body>
</html>