-
Notifications
You must be signed in to change notification settings - Fork 221
Display featured jobs on Jobs page, above search results #985
Changes from 3 commits
8165397
7331beb
a4cfd23
501959b
32c9611
4f32134
f4dfab2
54af5e6
cfd6461
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/* Note: these styles are copied to match the ziprecruiter styles that are being dynamically inserted on our page (see jobs.js) */ | ||
|
||
.job { | ||
padding: 15px 0px; | ||
} | ||
|
||
.link { | ||
text-decoration: none; | ||
color: #1a0dab; | ||
font-size: 17px; | ||
float: left; | ||
margin-right: 3px; | ||
margin-bottom: 1px; | ||
} | ||
|
||
.details { | ||
font-size: 13px; | ||
color: #999999; | ||
margin: 3px 0; | ||
clear: both; | ||
} | ||
|
||
.detailsContainer { | ||
float: left; | ||
margin-right: 15px; | ||
} | ||
|
||
.detail { | ||
margin-left: 4px; | ||
} | ||
|
||
.remote { | ||
composes: detail; | ||
font-style: italic; | ||
} | ||
|
||
.description { | ||
clear: both; | ||
font-size: 14px; | ||
color: #545454; | ||
line-height: 1.4; | ||
word-wrap: break-word; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import FontAwesomeIcon from '@fortawesome/react-fontawesome'; | ||
import { faMapMarkerAlt, faBuilding, faCloudUploadAlt } from '@fortawesome/fontawesome-free-solid'; | ||
import OutboundLink from 'shared/components/outboundLink/outboundLink'; | ||
import styles from './featuredJob.css'; | ||
|
||
const FeaturedJob = ({ | ||
title, | ||
source, | ||
sourceUrl, | ||
city, | ||
state, | ||
country, | ||
description, | ||
remote | ||
}) => ( | ||
<div> | ||
<div className={styles.job}> | ||
<div> | ||
<OutboundLink href={sourceUrl} analyticsEventLabel={`[FeaturedJob] ${sourceUrl}`}> | ||
<span className={styles.link}>{title}</span> | ||
</OutboundLink> | ||
</div> | ||
<div className={styles.details}> | ||
<div className={styles.detailsContainer}> | ||
<FontAwesomeIcon icon={faBuilding} size="sm" style={{ color: '#afafaf' }} /> | ||
<span className={styles.detail}>{source}</span> | ||
</div> | ||
<div className={styles.detailsContainer}> | ||
<FontAwesomeIcon icon={faMapMarkerAlt} size="sm" style={{ color: '#afafaf' }} /> | ||
<span className={styles.detail}>{city},</span> | ||
<span className={styles.detail}>{state},</span> | ||
<span className={styles.detail}>{country}</span> | ||
</div> | ||
{remote && | ||
<div className={styles.detailsContainer}> | ||
<FontAwesomeIcon icon={faCloudUploadAlt} size="sm" style={{ color: '#afafaf' }} /> | ||
<span className={styles.remote}>Remote</span> | ||
</div> | ||
} | ||
</div> | ||
<div className={styles.description}> | ||
{description} | ||
</div> | ||
</div> | ||
</div > | ||
); | ||
|
||
FeaturedJob.propTypes = { | ||
title: PropTypes.string.isRequired, | ||
source: PropTypes.string.isRequired, | ||
sourceUrl: PropTypes.string.isRequired, | ||
city: PropTypes.string.isRequired, | ||
state: PropTypes.string.isRequired, | ||
country: PropTypes.string.isRequired, | ||
description: PropTypes.string.isRequired, | ||
remote: PropTypes.bool | ||
}; | ||
|
||
FeaturedJob.defaultProps = { | ||
remote: false | ||
}; | ||
|
||
export default FeaturedJob; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
[ | ||
{ | ||
"title": "Software Engineer", | ||
"source": "Microsoft", | ||
"sourceUrl": "https://www.microsoft.com", | ||
"city": "Redmond", | ||
"state": "Washington", | ||
"country": "United States", | ||
"description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.", | ||
"status": "active", | ||
"remote": false, | ||
"tags": [ | ||
"C#", | ||
"ASP.Net", | ||
"DevOps" | ||
] | ||
}, | ||
{ | ||
"title": "QA Engineer", | ||
"source": "Apple", | ||
"sourceUrl": "https://www.apple.com", | ||
"city": "San Francisco", | ||
"state": "California", | ||
"country": "United States", | ||
"description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. ", | ||
"status": "active", | ||
"remote": true, | ||
"tags": [ | ||
"C#", | ||
"ASP.Net", | ||
"DevOps" | ||
] | ||
}, | ||
{ | ||
"title": "DevOps Engineeer", | ||
"source": "GitHub", | ||
"sourceUrl": "https://www.github.com", | ||
"city": "Austin", | ||
"state": "texas", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Texas There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This JSON file is just mock data for now. Its content will be replaced with actual featured jobs, or the JSON file will discarded completely once the API endpoint is ready. |
||
"country": "United States", | ||
"description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.", | ||
"status": "inactive", | ||
"remote": false, | ||
"tags": [ | ||
"C#", | ||
"ASP.Net", | ||
"DevOps" | ||
] | ||
} | ||
] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/* Note: these styles are copied to match the ziprecruiter styles that are inserted on our page */ | ||
|
||
.featuredJobsContainer { | ||
width: 100%; | ||
float: left; | ||
clear: both; | ||
} | ||
|
||
.featuredJobs { | ||
font-family: Arial, Helvetica, sans-serif; | ||
margin: 30px 0px 10px; | ||
width: 100%; | ||
max-width: 768px; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
import React, { Component } from 'react'; | ||
import Section from 'shared/components/section/section'; | ||
import FeaturedJob from './featuredJob/featuredJob'; | ||
import FeaturedJobsData from './featuredJobs.json'; | ||
import styles from './jobs.css'; | ||
|
||
const zipRecruiterScript = document.createElement('script'); | ||
|
||
|
@@ -29,11 +32,39 @@ class Jobs extends Component { | |
}; | ||
tryRunInit(); | ||
} | ||
|
||
featuredJobs | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think you need to delete this line. |
||
render() { | ||
const featuredJobs = FeaturedJobsData | ||
.filter(x => x.status === 'active') | ||
.map(job => ( | ||
<FeaturedJob | ||
key={`${Math.random()} + ${job.name} + ${job.sourceUrl}`} | ||
title={job.title} | ||
source={job.source} | ||
sourceUrl={job.sourceUrl} | ||
city={job.city} | ||
state={job.state} | ||
country={job.country} | ||
description={job.description} | ||
status={job.status} | ||
remote={job.remote} | ||
/> | ||
)); | ||
return ( | ||
<Section title="Open Positions" theme="white"> | ||
<div id="zipsearch_container" /> | ||
</Section> | ||
<div> | ||
<Section title="Featured Jobs" theme="white"> | ||
<div className={styles.featuredJobsContainer}> | ||
<div className={styles.featuredJobs}> | ||
{featuredJobs} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You should do
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good idea. We should probably have a contact link somewhere here. It should display whether or not there are any featured jobs exist. Can start off with an email link to @ksmacleod99 for now. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @kylemh As long as we have the contact link (explaining how to get a featured job), we can probably go live with this sooner (without any featured jobs yet). Test out the waters and see if we get anyone contacting us. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Agreed. You've got the structure in place for jobs when they come in. I'd say create the default, see what traffic - if any - we get towards that feature. Back-end can look at the JSON in this PR as an example to prepare for, and the ticket can be ✅ There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @kylemh I also went ahead and set the three 'mock' Jobs in the JSON file as |
||
</div> | ||
</div> | ||
</Section> | ||
<Section title="Search All Jobs" theme="white"> | ||
<div id="zipsearch_container" /> | ||
</Section> | ||
</div> | ||
|
||
); | ||
} | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🙌 ty for thinking of analytics