Skip to content

Commit 43df3c2

Browse files
authored
Improve job board (ocaml#499)
* Rename opportunities to jobs * Add a few jobs to the board * Remove job board search bar * Improve UI of cards in job board
1 parent 8808e5c commit 43df3c2

File tree

11 files changed

+64
-79
lines changed

11 files changed

+64
-79
lines changed

CONTRIBUTING.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,15 +58,15 @@ Where `<id>` is the ID of the Discuss post.
5858

5959
### <a name="content-job"></a> Add an entry to the job board
6060

61-
> Contribute to the [Job Board](https://ocaml.org/opportunities).
61+
> Contribute to the [Job Board](https://ocaml.org/jobs).
6262
6363
The job board displays OCaml job opportunities.
6464

6565
To add a new entry to the job board, you can add it to [`data/jobs.yml`](data/jobs.yml).
6666

67-
Please make sure that the opportunity involves mostly writing OCaml. Contributions to add opportunities unrelated to OCaml, or where OCaml is a negligible part of the opportunity won't be accepted.
67+
Please make sure that the job involves mostly writing OCaml. Contributions to add jobs unrelated to OCaml, or where OCaml is a negligible part of the job won't be accepted.
6868

69-
If you notice that a job opportunity is outdated (e.g. already fullfilled, or not opened anymore), PRs to remove it are welcome as well.
69+
If you notice that a job opportunity is outdated (e.g. already fulfilled, or not opened anymore), PRs to remove it are welcome as well.
7070

7171
### <a name="content-success-story"></a> Add a success story
7272

data/jobs.yml

Lines changed: 32 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,36 @@
11
jobs:
2-
- title: Benchmark Tooling Engineer
3-
link: https://tarides.com/jobs/benchmark-tooling-engineer
2+
- title: Compiler Engineer
3+
link: https://mina-foundation.breezy.hr/p/5d51e6552a93-site-reliability-engineer-sre
4+
location: France
5+
company: DGFiP
6+
company_logo: https://upload.wikimedia.org/wikipedia/fr/thumb/6/6d/Logo_DGFP-fr.svg/2560px-Logo_DGFP-fr.svg.png
7+
- title: Cryptography Engineer
8+
link: https://boards.greenhouse.io/o1labs/jobs/4023646004
9+
location: Remote
10+
company: O(1) Labs
11+
company_logo: https://workshub.imgix.net/7b409fdc3bc46438b64686a627d56b2b?fit=clip&crop=entropy&auto=format&w=60&h=60&q=40&dpr=2
12+
- title: Site Reliability Engineer (SRE)
13+
link: https://mina-foundation.breezy.hr/p/5d51e6552a93-site-reliability-engineer-sre
14+
location: Remote
15+
company: Mina Foundation
16+
company_logo: https://gallery-cdn.breezy.hr/32bca23d-fe68-4510-be6d-a3857ea72141/CompanyProfilePic.png
17+
- title: Team Lead - Software Engineering
18+
link: https://tarides.com/jobs/team-lead-software-engineering
19+
location: Remote
20+
company: Tarides
21+
company_logo: https://tarides.com/static/logo_tarides-52f91b59a8657d768e013129896b63e0.png
22+
- title: Remote Senior Full Stack Engineer
23+
link: https://heliax.dev/jobs/senior-full-stack-engineer/
24+
location: Remote
25+
company: Heliax
26+
company_logo: https://workshub.imgix.net/e52e257a6a9cdbc2bc868a5991ccd717?fit=clip&crop=entropy&auto=format
27+
- title: Senior Software Engineer - Irmin
28+
link: https://tarides.com/jobs/senior-software-engineer-irmin
29+
location: Remote
30+
company: Tarides
31+
company_logo: https://tarides.com/static/logo_tarides-52f91b59a8657d768e013129896b63e0.png
32+
- title: Senior Software Engineer - Tooling team
33+
link: https://tarides.com/jobs/senior-software-engineer-tooling-team
434
location: Remote
535
company: Tarides
636
company_logo: https://tarides.com/static/logo_tarides-52f91b59a8657d768e013129896b63e0.png
@@ -24,11 +54,6 @@ jobs:
2454
location: United-Kingdom
2555
company: Jane Street
2656
company_logo: /logos/janestreet.svg
27-
- title: Developer Educator
28-
link: https://www.janestreet.com/join-jane-street/position/5596802002/
29-
location: United States
30-
company: Jane Street
31-
company_logo: /logos/janestreet.svg
3257
- title: Senior Software Engineer
3358
link: https://www.marigold.dev/job-offers/software-engineer-senior-1
3459
location: France

src/ocamlorg_frontend/components/footer.eml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ let render () =
7777
<ul>
7878
<li class="text-lg font-semibold pb-3">Community</li>
7979
<li class="py-3"><a href="<%s Url.blog %>">Blog</a></li>
80-
<li class="py-3"><a href="<%s Url.opportunities %>">Opportunities</a></li>
80+
<li class="py-3"><a href="<%s Url.jobs %>">Jobs</a></li>
8181
</ul>
8282

8383
<ul>

src/ocamlorg_frontend/dune

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@
9090
(action
9191
(run %{bin:dream_eml} %{deps} --workspace %{workspace_root})))
9292
(rule
93-
(targets opportunities.ml)
94-
(deps opportunities.eml)
93+
(targets jobs.ml)
94+
(deps jobs.eml)
9595
(action
9696
(run %{bin:dream_eml} %{deps} --workspace %{workspace_root})))
9797
(rule

src/ocamlorg_frontend/ocamlorg_frontend.ml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,7 @@ let blog ~featured ~rss ~rss_page ~rss_pages_number ~news =
2222

2323
let news ~page ~pages_number news = News.render ~page ~pages_number news
2424
let news_post news = News_post.render news
25-
26-
let opportunities ?search ?location ~locations opportunities =
27-
Opportunities.render ?search ?location ~locations opportunities
25+
let jobs ?location ~locations jobs = Jobs.render ?location ~locations jobs
2826

2927
let package_overview ~readme ~readme_title ~dependencies ~rev_dependencies
3028
~homepages ~source package =

src/ocamlorg_frontend/pages/community.eml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,12 +171,12 @@ Layout.render
171171
<div class="bg-primary-600">
172172
<div class="container-fluid">
173173
<div class="text-center text-white lg:p-16 py-10">
174-
<h3 class="font-bold mb-6">Opportunities</h3>
174+
<h3 class="font-bold mb-6">OCaml Jobs</h3>
175175
<div class="text-lg mb-8 lg:px-28">This is a space where groups, companies, and organisations can advertise their projects directly to the OCaml community.</div>
176176
<div class="space-x-0 md:space-x-5 space-y-5 md:space-y-0">
177-
<a href="<%s Url.opportunities %>">
177+
<a href="<%s Url.jobs %>">
178178
<button class="btn btn-lg btn-tertiary">
179-
<span>View Opportunities</span>
179+
<span>View OCaml Jobs</span>
180180
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
181181
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7" />
182182
</svg>

src/ocamlorg_frontend/pages/opportunities.eml renamed to src/ocamlorg_frontend/pages/jobs.eml

Lines changed: 13 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,27 @@
1-
let render ?(search = "") ?(location = "All") ~locations (opportunities : Ood.Job.t list) =
1+
let render ?(location = "All") ~locations (jobs : Ood.Job.t list) =
22
Layout.render
3-
~title:"OCaml Opportunities"
3+
~title:"OCaml Jobs"
44
~description:"This is a space where groups, companies, and organisations can advertise their projects directly to the
55
OCaml community." @@
66
<div class="intro-section-simple">
77
<div class="container-fluid">
88
<div class="text-center w-full lg:w-2/3 m-auto">
9-
<h1 class="font-bold mb-6">Opportunities</h1>
9+
<h1 class="font-bold mb-6">OCaml Job Board</h1>
1010
<p>This is a space where groups, companies, and organisations can advertise their projects directly to the
1111
OCaml community.</p>
12-
<div
13-
class="flex justify-center flex-col lg:flex-row lg:space-x-6 space-y-5 lg:space-y-0 md:space-y-5 w-full lg:w-auto mt-16">
14-
<form action="<%s Url.opportunities %>" method="GET" class="form-input">
15-
<div class="form-input__icon">
16-
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 text-body-400" fill="none"
17-
viewBox="0 0 24 24" stroke="rgba(26, 32, 44, 1)">
18-
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
19-
d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z" />
20-
</svg>
21-
</div>
22-
<label for="q" class="sr-only">Opportunities</label>
23-
<input class="focus:ring-orange-500" id="q" name="q" type="search" placeholder="Search for an opportunity" value="<%s search %>">
24-
<button class="btn btn-lg btn-secondary ml-4" type="submit">Search</button>
25-
</form>
26-
</div>
2712
</div>
2813
</div>
2914
</div>
3015

31-
<div class="py-24 bg-white">
16+
<div class="py-12 bg-white">
3217
<div class="container-fluid">
3318
<div class="flex justify-between items-center">
34-
<% let job_num = match List.length opportunities with 0 -> "No Job" | 1 -> "1 Job" | l -> Printf.sprintf "%i Jobs" l in %>
19+
<% let job_num = match List.length jobs with 0 -> "No Job" | 1 -> "1 Job" | l -> Printf.sprintf "%i Jobs" l in %>
3520
<h5 class="font-bold">
3621
<%s job_num %>
3722
</h5>
3823
<div class="relative h-14 w-64">
39-
<form action="<%s Url.opportunities %>" method="GET">
40-
<input id="q" name="q" type="search" placeholder="Search for an opportunity" class="hidden"
41-
value="<%s search %>">
24+
<form action="<%s Url.jobs %>" method="GET">
4225
<label for="c" class="sr-only">Location</label>
4326
<select
4427
class="w-full w-full appearance-none text-body-600 border rounded-md py-3 pl-6 border-gray-200 pr-20 h-full"
@@ -52,7 +35,7 @@ OCaml community." @@
5235
</form>
5336
</div>
5437
</div>
55-
<% (match List.length opportunities with | 0 -> %>
38+
<% (match List.length jobs with | 0 -> %>
5639
<div class="flex flex-col items-center justify-center pt-24 space-y-4 text-body-400">
5740
<div>
5841
<svg xmlns="http://www.w3.org/2000/svg" class="h-10 w-10" fill="none" viewBox="0 0 24 24"
@@ -61,20 +44,20 @@ OCaml community." @@
6144
d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z" />
6245
</svg>
6346
</div>
64-
<div class="text-xl">No Opportunities found matching "<%s search %>"</div>
47+
<div class="text-xl">No Jobs found</div>
6548
</div>
6649
<% | _ -> %>
67-
<div class="grid grid-cols-1 pb-10 lg:grid-cols-3 gap-8 mt-16" x-data="{ location: '<%s location %>' }">
68-
<% opportunities |> List.iter (fun (item : Ood.Job.t) -> %>
50+
<div class="grid grid-cols-1 pb-8 lg:grid-cols-3 gap-8 mt-12" x-data="{ location: '<%s location %>' }">
51+
<% jobs |> List.iter (fun (item : Ood.Job.t) -> %>
6952
<a href="<%s item.link %>"
7053
target="_blank"
7154
class="text-left p-8 border border-gray-200 rounded-xl card-hover"
7255
:class="{ 'hidden': location != 'All' && location != '<%s item.location %>' }">
73-
<img class="mb-6 max-h-8 max-w-[7rem]" src="<%s item.company_logo %>" alt="">
74-
<div class="text-lg mb-3 text-body-600">
56+
<img class="mb-4 max-h-8 max-w-[7rem]" src="<%s item.company_logo %>" alt="">
57+
<div class="text-base mb-2 text-body-600 opacity-80">
7558
<%s item.company %>
7659
</div>
77-
<div class="text-lg mb-3 font-semibold text-body-600">
60+
<div class="text-lg mb-4 font-extrabold text-body-600 truncate">
7861
<%s item.title %>
7962
</div>
8063
<div class="flex items-center space-x-2">

src/ocamlorg_frontend/url.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ let workshop v = "/workshops/" ^ v
3737
let blog = "/blog"
3838
let news = "/news"
3939
let news_post v = "/news/" ^ v
40-
let opportunities = "/opportunities"
40+
let jobs = "/jobs"
4141
let carbon_footprint = "/carbon-footprint"
4242
let privacy_policy = "/privacy-policy"
4343
let governance = "/governance"

src/ocamlorg_web/lib/handler.ml

Lines changed: 4 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -191,35 +191,13 @@ let news_post req =
191191
| Some news_post -> Dream.html (Ocamlorg_frontend.news_post news_post)
192192
| None -> not_found req
193193

194-
let opportunities req =
195-
let search_job pattern t =
196-
let open Ood.Job in
197-
let pattern = String.lowercase_ascii pattern in
198-
let title_is_s { title; _ } = String.lowercase_ascii title = pattern in
199-
let title_contains_s { title; _ } =
200-
String.contains_s (String.lowercase_ascii title) pattern
201-
in
202-
let score job =
203-
if title_is_s job then -1
204-
else if title_contains_s job then 0
205-
else failwith "impossible job score"
206-
in
207-
t
208-
|> List.filter (fun p -> title_contains_s p)
209-
|> List.sort (fun job_1 job_2 -> compare (score job_1) (score job_2))
210-
in
211-
let search = Dream.query req "q" in
212-
let jobs =
213-
match search with
214-
| None -> Ood.Job.all
215-
| Some search -> search_job search Ood.Job.all
216-
in
194+
let jobs req =
217195
let location = Dream.query req "c" in
218196
let jobs =
219197
match location with
220-
| None | Some "All" -> jobs
198+
| None | Some "All" -> Ood.Job.all
221199
| Some location ->
222-
List.filter (fun job -> job.Ood.Job.location = location) jobs
200+
List.filter (fun job -> job.Ood.Job.location = location) Ood.Job.all
223201
in
224202
let locations =
225203
List.filter_map
@@ -229,7 +207,7 @@ let opportunities req =
229207
Ood.Job.all
230208
|> List.sort_uniq String.compare
231209
in
232-
Dream.html (Ocamlorg_frontend.opportunities ?search ?location ~locations jobs)
210+
Dream.html (Ocamlorg_frontend.jobs ?location ~locations jobs)
233211

234212
let page (page : Ood.Page.t) (_req : Dream.request) =
235213
Dream.html

src/ocamlorg_web/lib/redirection.ml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -637,8 +637,8 @@ let manual =
637637
fwd_v2 "/releases/4.14/manual/";
638638
]
639639

640-
let make ?(permanant = false) t =
641-
let status = if permanant then `Moved_Permanently else `See_Other in
640+
let make ?(permanent = false) t =
641+
let status = if permanent then `Moved_Permanently else `See_Other in
642642
Dream.scope ""
643643
[ Dream_encoding.compress ]
644644
(List.filter_map
@@ -654,4 +654,5 @@ let t =
654654
make from_v2;
655655
make v2_assets;
656656
Dream.scope "" [ Dream_encoding.compress ] manual;
657+
make ~permanent:true [ ("/opportunities", "/jobs") ];
657658
]

0 commit comments

Comments
 (0)