Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added the notification section and changed the layout of the organisa… #327

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
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
38 changes: 38 additions & 0 deletions src/Components/JobCard/JobCards.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import React from "react";
import { formatDistanceToNow } from "date-fns"; // Import the function
import "./JobCards.scss"; // Import SCSS for styling

const JobCard = ({ job }) => {
const { title, company, location, experience, salary, postedDate, hiringStatus } = job;

return (
<div className="job-card">
{/* Job Title */}
<h3 className="job-card__title">{title}</h3>

{/* Company Name and Hiring Status */}
<div className="job-card__company-status-location">
<p className="job-card__company">{company}</p>
<div className="job-card__status">
<span>{hiringStatus}</span>
</div>
</div>

{/* Location, Experience, and Salary on the same line */}
<div className="job-card__location-salary-experience">
<p className="job-card__location">{location}</p>
<p className="job-card__experience">{experience}</p>
<p className="job-card__salary">Salary: {salary}</p>
</div>

{/* Relative Job Posting Date */}
<div className="job-card__posted">
<span>
Posted: {formatDistanceToNow(new Date(postedDate), { addSuffix: true })}
</span>
</div>
</div>
);
};

export default JobCard;
156 changes: 156 additions & 0 deletions src/Components/JobCard/JobCards.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,156 @@
.company-jobs {
display: grid;
// grid-template-columns: repeat(1, 1fr); // To make equal-width columns
width: 100%;
padding: 15px;
justify-content: flex-start;
gap: 1px;
}

.job-card {
max-width: 100%;
height: auto;
word-wrap: break-word;
line-height: 1.2;
background-color: #fff;
border: 1px solid #e0e0e0;
border-radius: 8px;
padding: 16px;
display: grid;
height: 215px;
grid-template-columns: 1fr; // Default for mobile
gap: 2px; // Reduced gap between elements overall
box-shadow: 0 2px 4px #9e0000;
transition: transform 0.2s ease-in-out;
max-width: 500px;
word-wrap: break-word;
line-height: 0.9;
margin-bottom: 15px;


&:hover {
transform: translateY(-5px);


.job-card__title {
text-decoration: underline;
color: #9e0000;
}
}

&__header {
margin-bottom: 2px;
}

&__title {
font-size: 1.25rem;
font-weight: bold;
color: #333;
margin-bottom: -22px;
}

&__company-status-location {
display: grid;
grid-template-columns: auto auto; // Company and status on the same line
align-items: center;
gap: 1px; // Further reduced gap between company and status
margin-bottom: 4px; // Space between company-status and location
}

&__company {
font-size: 1rem;
font-weight: 500;
color: #464646;
}

&__status {
font-size: 0.875rem;
color: #2684ff;
font-weight: bold;
margin-right: 10px;
margin-bottom: 16px;
span {
padding: 2px 10px;
border-radius: 12px;
font-weight: bold;
border: 1px solid #2684ff;
}
}

&__location-salary-experience {
display: grid;
grid-template-columns: auto auto auto; // Location, experience, and salary on the same line
gap: 2px; // Further reduced gap between location, experience, and salary
margin-bottom: 2px;
}

&__location {
font-size: 0.875rem;
color: #333;
margin-right: 4px;
}

&__salary {
font-size: 0.875rem;
color: #333;
font-weight: bold;
margin-right: 10px;
}

&__experience {
font-size: 0.875rem;
color: #333;
}

&__posted {
font-size: 0.875rem;
color: #333;

span {
background-color: #f0f0f0;
padding: 4px 8px;
border-radius: 12px;
color: #333;
font-weight: bold;
}
}

@media (max-width: 600px) {
padding: 12px;

.company-jobs{
justify-content: center;
}
&__title {
font-size: 1.1rem;
}

&__company,
&__status,
&__location,
&__salary,
&__experience,
&__posted {
font-size: 0.8rem;
}

&__status {
margin-right: 0; // Remove margin-right for smaller screens
}

&__salary {
margin-right: 0;
}
}

@media (min-width: 601px) and (max-width: 1200px) {
&__status {
margin-right: 0;
}

&__salary {
margin-right: 0;
}
}
}