forked from compilerla/compiler.la
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jobs.html
78 lines (65 loc) · 2.41 KB
/
jobs.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
---
layout: default
title: Jobs with Compiler
---
<div class="row jobs">
<div class="offset-md-1 col-md-7">
<span class="pill">Careers</span>
<h1 class="h2 mt-4">Compiler is a woman-owned software consultancy that’s passionate about making government tech solutions
accessible for all.</h1>
<h2 class="h4 mt-5 fs-6 pb-1 mb-2">Open roles</h2>
<ul id="open" class="list-unstyled d-flex flex-column gap-2 text-decoration-none"></ul>
<h2 class="h4 mt-5 fs-6 pb-1 mb-2">Past roles</h2>
<ul id="closed" class="list-unstyled d-flex flex-column gap-2"></ul>
<p class="mt-5 mb-0">
Missed a past opportunity? <a href="http://eepurl.com/h6qTKL">Subscribe</a> to our mailing list, as we
are always looking for great candidates.
</p>
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/build/global/luxon.min.js" crossorigin="anonymous"></script>
<script>
// override default Timezone for California
luxon.Settings.defaultZone = "America/Los_Angeles";
const DateTime = luxon.DateTime;
const now = DateTime.now();
const all_jobs = {% include job-json.html %};
const open_jobs = [];
const closed_jobs = [];
all_jobs.forEach(job => {
const open_date = DateTime.fromISO(job.open_date).startOf("day");
const close_date = DateTime.fromISO(job.close_date).endOf("day");
if (open_date <= now && close_date >= now) {
open_jobs.push(job);
}
else {
closed_jobs.push(job);
}
});
function createJobItem(job) {
const li = document.createElement("li");
const a = document.createElement("a");
a.append(job.title);
if (job.type) {
a.append(" (" + job.type + ")");
}
a.href = job.url;
li.appendChild(a);
return li;
}
const open_ul = document.getElementById("open");
const closed_ul = document.getElementById("closed");
open_jobs.forEach(job => {
const item = createJobItem(job);
open_ul.appendChild(item);
});
closed_jobs.forEach(job => {
const item = createJobItem(job);
closed_ul.appendChild(item);
});
if (open_jobs.length < 1) {
const p = document.createElement("p");
p.append("There are no positions accepting applications at the moment.");
open_ul.replaceWith(p);
}
</script>