Skip to content

Commit fa9efd0

Browse files
Add job board with example data. (#1197)
new Pages: - Jobs board - https://ep2025-job-board.ep-preview.click/jobs/ - Single Sponsor page - https://ep2025-job-board.ep-preview.click/sponsor/numberly/ - Community partners - https://ep2025-job-board.ep-preview.click/sponsors/ or https://ep2025-job-board.ep-preview.click/community-partners/ - Single Job position page - https://ep2025-job-board.ep-preview.click/sponsor/numberly/internship-software-engineer-backend-fullstack Drafts are visible only on non-prod environments. Close #1173. --------- Co-authored-by: Mia Bajić <38294198+clytaemnestra@users.noreply.github.com>
1 parent bbeda93 commit fa9efd0

File tree

106 files changed

+1734
-452
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

106 files changed

+1734
-452
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@
4747
"@types/js-yaml": "^4.0.9",
4848
"prettier": "^3.5.3",
4949
"prettier-plugin-astro": "^0.14.1",
50-
"tsx": "^4.19.4",
5150
"puppeteer": "^24.7.2",
51+
"tsx": "^4.19.4",
5252
"typescript": "^5.8.3"
5353
},
5454
"prettier": {

pnpm-lock.yaml

Lines changed: 168 additions & 319 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/draft.png

14 KB
Loading

src/components/BaseHead.astro

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,9 @@ const { title, description, image = "/social-card.png" } = Astro.props;
5757
is:inline
5858
data-domain="ep2025.europython.eu"
5959
src="https://plausible.io/js/script.js"></script>
60+
61+
<script
62+
defer
63+
is:inline
64+
data-domain="ep2025.europython.eu"
65+
src="https://plausible.io/js/script.outbound-links.js"></script>

src/components/CardContent.astro

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
import { getEntry } from "astro:content";
3+
import { marked } from 'marked';
4+
const { collection, entry:entryId } = Astro.props;
5+
6+
const entry = await getEntry(collection, entryId);
7+
const html = entry && entry.body ? marked.parse(entry.body) : "";
8+
9+
---
10+
11+
{ html &&
12+
<div class="mb-2 prose prose-li:m-0 prose-ul:m-0 prose-ul:mb-2 prose-a:underline prose-h1:text-text prose-headings:font-title prose-headings:text-text prose-a:text-text hover:prose-a:text-primary-hover prose-strong:text-text prose-strong:font-bold prose-li:marker:text-text p-6">
13+
<article set:html={html} />
14+
</div>
15+
}

src/components/JobCard.astro

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
---
2+
import { getEntry } from "astro:content";
3+
const { job:jobId, sponsor:sponsorId } = Astro.props;
4+
5+
const job = await getEntry("jobs", jobId);
6+
if (!job) {
7+
throw new Error(`Job with ID "${jobId}" not found`);
8+
}
9+
10+
const sponsor = await getEntry("sponsors", sponsorId);
11+
12+
if (!sponsor) {
13+
throw new Error(`Sponsor with ID "${sponsorId}" not found`);
14+
}
15+
16+
// TODO: add tags
17+
const { title, location, type, level, salary, description, responsibilities, requirements, benefits, apply_link, draft } = job.data;
18+
19+
---
20+
21+
<div class="mb-6 last:mb-0 rounded-lg shadow-md bg-white">
22+
<div class=`flex-1 p-6 ${draft ? "draft": ""}`>
23+
<a href={`/sponsor/${jobId}`}>
24+
<h2 class="text-3xl font-bold mb-2">{title}</h2>
25+
</a>
26+
27+
<a class="lg:hidden text-[#1a56db] hover:text-[#4f46e5] text-xl pb-2 inline-block font-bold" href={`/sponsor/${sponsor.id}`}>
28+
{sponsor.data.name}
29+
</a>
30+
31+
{ level && type && location &&
32+
<p class="text-gray-600 mb-2">{level}{type}{location}</p>
33+
}
34+
<p class="text-gray-700 mb-4">{salary}</p>
35+
<p class="mb-3">{description}</p>
36+
37+
{ responsibilities &&
38+
<h3 class="text-xl font-semibold mb-2">Responsibilities</h3>
39+
<ul class="list-disc list-inside mb-4">
40+
{responsibilities.map((item:string ) => <li>{item}</li>)}
41+
</ul>
42+
}
43+
44+
{ requirements &&
45+
<h3 class="text-xl font-semibold mb-2">Requirements</h3>
46+
<ul class="list-disc list-inside mb-4">
47+
{requirements.map((item:string) => <li>{item}</li>)}
48+
</ul>
49+
}
50+
51+
{ benefits &&
52+
<h3 class="text-xl font-semibold mb-2">Benefits</h3>
53+
<ul class="list-disc list-inside mb-6">
54+
{benefits.map((item:string) => <li>{item}</li>)}
55+
</ul>
56+
}
57+
58+
<a
59+
href={apply_link}
60+
target="_blank"
61+
class="apply-btn"
62+
>
63+
Apply Now
64+
</a>
65+
</div>
66+
</div>
67+
68+
<style>
69+
70+
.apply-btn {
71+
display: inline-block;
72+
padding: 8px 24px;
73+
color: white;
74+
font-weight: 700;
75+
border-radius: 9999px;
76+
border: 1px solid transparent;
77+
text-decoration: none;
78+
transition: all 0.1s ease;
79+
background: linear-gradient(to right, #16a34a, #22c55e);
80+
}
81+
82+
.apply-btn:hover {
83+
color:white;
84+
}
85+
86+
a{
87+
text-decoration: underline;
88+
}
89+
a:hover {
90+
color: var(--color-primary-hover);
91+
text-decoration: underline;
92+
}
93+
94+
</style>

src/components/Search.astro

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ document.addEventListener("DOMContentLoaded", function () {
3333
let selectedIndex = -1;
3434

3535
function openSearch() {
36-
console.log("open");
3736
openModal.click();
3837
if (searchInput) {
3938
searchInput.value = "Tips";

0 commit comments

Comments
 (0)