Skip to content

Commit 776adfb

Browse files
committed
Add jobs
1 parent 5e6b76d commit 776adfb

File tree

5 files changed

+136
-5
lines changed

5 files changed

+136
-5
lines changed

data/jobs.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
- title: "Senor Front-End Developer"
2+
active: true
3+
salary: $132,000
4+
content: |
5+
Seeking a skilled Frontend-focused Full Stack Engineer who
6+
thrives on building beautiful and functional user interfaces,
7+
but still feels comfortable on the server.
8+
9+
While we're looking for developers with strong technical skills
10+
we typically don't hire for experience in a particular framework
11+
or technology. We're mostly seeking generalists that enjoy working
12+
in new technical stacks and have exceptional communication: because
13+
we're a small company, everyone here takes on a lot of roles,
14+
and strong relationships with our clients is absolutely essential
15+
to our success.
16+
17+
We offer a 20-hour work week, retirement and health benefits, a
18+
competitive salary, an unlimited vacation and parental leave policy.
19+
At Apsis, you'll have the opportunity to contribute meaningfully
20+
throughout the entire development lifecycle, from initial concept
21+
to polished product. We believe in sustainable work practices,
22+
detailed on [our mission statement](/mission).

src/lib/posts.ts

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import fg from "fast-glob";
99
import { processMarkdown } from "./markdown";
1010
import yaml from "js-yaml";
1111

12-
import { PostFrontmatter, Post, PostParams, Person } from "lib/types";
12+
import { PostFrontmatter, Post, PostParams, Person, Job } from "lib/types";
1313
import _ from "lodash";
1414

1515
const postsDirectory = path.join(process.cwd(), "posts");
@@ -27,7 +27,7 @@ export const getRandomCta = () => {
2727
export const getPeople = async (): Promise<Record<string, Person>> => {
2828
const peopleFile = readFileSync(
2929
path.join(dataDirectory, "people.yml"),
30-
"utf8",
30+
"utf8"
3131
);
3232
return yaml.load(peopleFile);
3333
};
@@ -36,10 +36,21 @@ export const getCurrentPeople = async (): Promise<Record<string, Person>> => {
3636
const people = await getPeople();
3737

3838
return Object.fromEntries(
39-
Object.entries(people).filter(([_, p]) => p.current),
39+
Object.entries(people).filter(([_, p]) => p.current)
4040
);
4141
};
4242

43+
export const getJobs = async (): Promise<Record<string, Job>> => {
44+
const jobFile = readFileSync(path.join(dataDirectory, "jobs.yml"), "utf8");
45+
return yaml.load(jobFile);
46+
};
47+
48+
export const getActiveJobs = async (): Promise<Record<string, Job>> => {
49+
const jobs = await getJobs();
50+
51+
return Object.fromEntries(Object.entries(jobs).filter(([_, j]) => j.active));
52+
};
53+
4354
const getPostPaths = () => {
4455
return fg.sync(path.join(postsDirectory, "**"), { objectMode: true });
4556
};
@@ -124,7 +135,7 @@ async function getAllPosts(): Promise<Post[]> {
124135
person: people[matterResult.data.author] ?? null,
125136
...matterResult.data,
126137
};
127-
}),
138+
})
128139
);
129140
}
130141

@@ -157,7 +168,7 @@ export async function getPostData({
157168
const people = await getPeople();
158169
const fullPath = path.join(
159170
postsDirectory,
160-
`${year}-${month}-${day}-${slug}.md`,
171+
`${year}-${month}-${day}-${slug}.md`
161172
);
162173
const fileContents = readFileSync(fullPath, "utf8");
163174
const { content, data } = await parseMatter(fileContents);

src/lib/types.d.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,11 @@ export type Post = Modify<
5151
},
5252
FrontmatterData
5353
>;
54+
55+
56+
export type Job = {
57+
title: string;
58+
content: string;
59+
salary: string;
60+
active: boolean;
61+
}

src/pages/jobs.tsx

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
import { ContactForm } from "components/forms/ContactForm";
2+
import { MarkdownContent } from "components/MarkdownContent";
3+
import { PageHeader } from "components/PageHeader";
4+
import { PageMeta } from "components/PageMeta";
5+
import { SiteLayout } from "components/SiteLayout";
6+
import { getActiveJobs } from "lib/posts";
7+
import { Job } from "lib/types";
8+
import { NextPage } from "next";
9+
10+
export async function getStaticProps() {
11+
return {
12+
props: {
13+
jobs: await getActiveJobs(),
14+
},
15+
};
16+
}
17+
18+
const HirePage: NextPage<{ jobs: Record<string, Job> }> = ({ jobs }) => {
19+
return (
20+
<>
21+
<PageMeta
22+
title="Join Our Team"
23+
description="Sometimes Apsis Labs is hiring. Join us."
24+
/>
25+
26+
<SiteLayout contained>
27+
<div className="stack gap-lg">
28+
<article className="stack gap-md">
29+
<PageHeader
30+
title={
31+
<>
32+
Work <span className="text-muted">@</span>{" "}
33+
<span className="text-primary">Apsis</span>
34+
</>
35+
}
36+
subtitle={<>Sometimes we're hiring. Join us.</>}
37+
/>
38+
<section className="typography">
39+
<p className="lead">
40+
Apsis Labs is a tightly-knit software agency operating as a
41+
fully distributed team. We specialize in crafting bespoke
42+
solutions for our clients — ranging from dynamic web
43+
applications and mobile experiences to HIPAA compliant data
44+
warehouses.
45+
</p>
46+
<p className="lead">
47+
To apply, send your resume to{" "}
48+
<a href="mailto:contact@apsis.io">contact@apsis.io</a>.
49+
</p>
50+
</section>
51+
<hr className="divider" />
52+
{Object.entries(jobs).length > 0 ? (
53+
<section className="typography">
54+
{Object.entries(jobs).map(([key, job]) => (
55+
<div key={key} className="stack gap-md">
56+
<header className="stack gap-sm">
57+
<h3 className="text-primary m-0">{job.title}</h3>
58+
<small className="text-muted">
59+
<strong>Salary:</strong> {job.salary}
60+
</small>
61+
</header>
62+
<div className="typography">
63+
<MarkdownContent content={job.content} />
64+
<p>
65+
To apply, send your resume to{" "}
66+
<a href="mailto:contact@apsis.io">contact@apsis.io</a>.
67+
</p>
68+
</div>
69+
</div>
70+
))}
71+
</section>
72+
) : (
73+
<section className="typography">
74+
<div className="alert alert-note">
75+
No jobs at this moment. Check back later!
76+
</div>
77+
</section>
78+
)}
79+
</article>
80+
</div>
81+
</SiteLayout>
82+
</>
83+
);
84+
};
85+
86+
export default HirePage;

src/styles/_global.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@
1515
}
1616
}
1717

18+
.m-0 {
19+
margin: 0 !important;
20+
}
21+
1822
.hidden {
1923
visibility: hidden;
2024
display: none;

0 commit comments

Comments
 (0)