Skip to content

Commit b6ac451

Browse files
Astraxx04farhaanbukhsh
authored andcommitted
Job Board Section
1 parent 07ee6a1 commit b6ac451

File tree

7 files changed

+318
-7
lines changed

7 files changed

+318
-7
lines changed

src/_data/env.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
const isDev = process.env.ELEVENTY_ENV === 'dev'
1+
const isDev = process.env.ELEVENTY_ENV === "dev";
22

33
module.exports = {
4-
baseUrl: isDev
5-
? '/'
6-
: '/2025/'
7-
}
4+
baseUrl: isDev ? "/" : "/2025/",
5+
spreadsheetURL: "https://docs.google.com/spreadsheets/d/1gIGszJWFngjaP4GuEqudAuYg95LGRLm-xO6re-DIKMA/gviz/tq?tqx=out:json"
6+
};

src/_data/jobData.js

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
const env = require("./env");
2+
3+
async function fetchJobPostings(URL) {
4+
try {
5+
const response = await fetch(URL);
6+
const text = await response.text();
7+
8+
const jsonString = text.substring(47).slice(0, -2);
9+
const json = JSON.parse(jsonString);
10+
const rows = json.table.rows;
11+
12+
const ensureHttps = (url) => {
13+
if (!/^https?:\/\//.test(url)) {
14+
return `https://${url}`;
15+
}
16+
return url;
17+
};
18+
19+
const isValidUrl = (url) => {
20+
const pattern = /^(https?:\/\/)?([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}(:\d+)?(\/.*)?$/;
21+
return pattern.test(url);
22+
};
23+
24+
const jobPostings = rows.map((row) => ({
25+
title: row.c[5]?.v || "No title",
26+
company: row.c[2]?.v || "Unknown",
27+
company_website: ensureHttps(row.c[4]?.v) || "#",
28+
job_type: row.c[6]?.v || "N/A",
29+
location: row.c[8]?.v || "Unknown",
30+
description: row.c[7]?.v || "No description available",
31+
link_to_apply: ensureHttps(row.c[9]?.v) || "#",
32+
}))
33+
.filter((job_post) =>
34+
isValidUrl(job_post.company_website) &&
35+
isValidUrl(job_post.link_to_apply)
36+
);
37+
38+
return jobPostings;
39+
} catch (error) {
40+
console.error("Error fetching or processing job postings:", error);
41+
return [];
42+
}
43+
}
44+
45+
module.exports = async function () {
46+
return await fetchJobPostings(env.spreadsheetURL);
47+
};

src/_data/menuItems.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@
2323
"name": "Health and Safety",
2424
"link": "attend/health-and-safety"
2525
},
26+
{
27+
"name": "Job Board",
28+
"link": "attend/jobs"
29+
},
2630
{
2731
"name": "FAQ's",
2832
"link": "attend/faqs"

src/_includes/components/button.njk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
{% set bg_class = "bg-pycon-lime hover:bg-pycon-lime/90" %}
44
{% set text_class = "text-black" %}
55
{% else %}
6-
{% set bg_class = "bg-transparent border-pycon-lime" %}
7-
{% set text_class = "text-pycon-lime" %}
6+
{% set bg_class = "bg-pycon-purple hover:bg-pycon-purple/90" %}
7+
{% set text_class = "text-black" %}
88
{% endif %}
99

1010
<a

src/attend/job-board-guidelines.njk

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
---
2+
title: Job Board - Rules and Guildelines
3+
description: PyCon India 2025 Job Board
4+
layout: base.njk
5+
---
6+
7+
<div class="w-full h-auto bg-pycon-blue -mb-24 px-[6%] flex flex-col md:flex-row">
8+
<div class="pt-32 pb-8 md:pb-32 w-full lg:w-[70%]">
9+
<div class="black-han-sans-regular font-normal text-3xl md:text-5xl md:text-center text-[#FFFFFF] text-center lg:text-left">
10+
Job Board - Rules and Guidelines
11+
</div>
12+
</div>
13+
<div class="lg:w-[30%] w-[80%] lg:mt-60 flex items-center justify-center mx-auto">
14+
<img src="{{ env.baseUrl }}img/assets/notepad.svg" alt="Guide" class="w-[40%] lg:w-[60%] transition-transform duration-100" style="animation: floating 2s ease-in-out infinite;">
15+
<img src="{{ env.baseUrl }}img/assets/book-stars.svg" alt="Guide" class="w-[40%] lg:w-[60%] transition-transform duration-100" style="animation: floating 2s ease-in-out infinite;">
16+
</div>
17+
</div>
18+
19+
20+
<div class="main-container pt-16 md:pt-48 bg-lavender w-full h-auto px-[6%]">
21+
<div class="pb-40 md:pb-60 lg:pb-[20%] w-full text-justify lg:w-[70%]">
22+
<div class="text-md lg:text-xl font-light">
23+
<div class="pt-8">
24+
<p class="text-2xl font-bold flex items-center"><span><img src="{{ env.baseUrl }}img/assets/square-lime.svg" alt="Bullet Icon" class="w-5 mr-2"></span>Job Submission & Approval:</p>
25+
<ul class="list-none pt-4 space-y-4">
26+
<li class="flex">
27+
<img src="{{ env.baseUrl }}img/assets/circle-purple.svg" alt="Bullet Icon" class="w-4 h-4 mr-2 mt-2">
28+
<span>We do not impose any restrictions on the industry/technology of the submitted jobs. Any jobs that are helpful to the community are welcome.</span>
29+
</li>
30+
<li class="flex">
31+
<img src="{{ env.baseUrl }}img/assets/circle-purple.svg" alt="Bullet Icon" class="w-4 h-4 mr-2 mt-2">
32+
<span>After successful job submission, each job will undergo a verification process by the PyCon India 2025 team to ensure there are no spam postings.</span>
33+
</li>
34+
<li class="flex">
35+
<img src="{{ env.baseUrl }}img/assets/circle-purple.svg" alt="Bullet Icon" class="w-4 h-4 mr-2 mt-2">
36+
<span>The approval process may take approximately 2-3 hours.</span>
37+
</li>
38+
<li class="flex">
39+
<img src="{{ env.baseUrl }}img/assets/circle-purple.svg" alt="Bullet Icon" class="w-4 h-4 mr-2 mt-2">
40+
<span>Approved jobs will be made visible on the job board once they pass the verification process.</span>
41+
</li>
42+
<li class="flex">
43+
<img src="{{ env.baseUrl }}img/assets/circle-purple.svg" alt="Bullet Icon" class="w-4 h-4 mr-2 mt-1">
44+
<span>Submissions that do not meet the guidelines may be rejected.</span>
45+
</li>
46+
</ul>
47+
</div>
48+
49+
<div class="pt-8">
50+
<p class="text-2xl font-bold flex items-center"><span><img src="{{ env.baseUrl }}img/assets/square-lime.svg" alt="Bullet Icon" class="w-5 mr-2"></span>Job Posts Order:</p>
51+
<ul class="list-none pt-4 space-y-4">
52+
<li class="flex">
53+
<img src="{{ env.baseUrl }}img/assets/circle-purple.svg" alt="Bullet Icon" class="w-4 h-4 mr-2 mt-2">
54+
<span>Job posts are sorted based on the timestamp they are submitted. The first job submitted will be visible first, followed by subsequent submissions in chronological order.</span>
55+
</li>
56+
</ul>
57+
</div>
58+
59+
<div class="pt-8">
60+
<p class="text-2xl font-bold flex items-center"><span><img src="{{ env.baseUrl }}img/assets/square-lime.svg" alt="Bullet Icon" class="w-5 mr-2"></span>Transparency:</p>
61+
<ul class="list-none pt-4 space-y-4">
62+
<li class="flex">
63+
<img src="{{ env.baseUrl }}img/assets/circle-purple.svg" alt="Bullet Icon" class="w-4 h-4 mr-2 mt-2">
64+
<span>After successful job submission, each job will undergo a verification process by the PyCon India 2025 team to ensure there are no spam postings.</span>
65+
</li>
66+
<li class="flex">
67+
<img src="{{ env.baseUrl }}img/assets/circle-purple.svg" alt="Bullet Icon" class="w-4 h-4 mr-2 mt-2">
68+
<span>Job seekers and companies are encouraged to communicate directly with each other for job-related inquiries, applications, and hiring decisions.</span>
69+
</li>
70+
</ul>
71+
</div>
72+
73+
<div class="pt-8">
74+
<p class="text-2xl font-bold flex items-center"><span><img src="{{ env.baseUrl }}img/assets/square-lime.svg" alt="Bullet Icon" class="w-5 mr-2"></span>Content Moderation:</p>
75+
<ul class="list-none pt-4 space-y-4">
76+
<li class="flex">
77+
<img src="{{ env.baseUrl }}img/assets/circle-purple.svg" alt="Bullet Icon" class="w-4 h-4 mr-2 mt-2">
78+
<span>PyCon India 2025 reserves the right to moderate and remove job posts that violate submission guidelines or community standards.</span>
79+
</li>
80+
<li class="flex">
81+
<img src="{{ env.baseUrl }}img/assets/circle-purple.svg" alt="Bullet Icon" class="w-4 h-4 mr-2 mt-2">
82+
<span>Users are encouraged to report any inappropriate content or issues with job posts for review to our team at <a href="mailto:[email protected]" target="_blank" rel="noopener noreferrer" class="underline">[email protected]</a>.</span>
83+
</li>
84+
</ul>
85+
</div>
86+
87+
<div class="pt-8">
88+
<p class="text-2xl font-bold flex items-center"><span><img src="{{ env.baseUrl }}img/assets/square-lime.svg" alt="Bullet Icon" class="w-5 mr-2"></span>Respect and Inclusivity:</p>
89+
<ul class="list-none pt-4 space-y-4">
90+
<li class="flex">
91+
<img src="{{ env.baseUrl }}img/assets/circle-purple.svg" alt="Bullet Icon" class="w-4 h-4 mr-2 mt-2">
92+
<span>Users are expected to maintain a respectful and inclusive environment when interacting with job listings or other users on the platform.</span>
93+
</li>
94+
<li class="flex">
95+
<img src="{{ env.baseUrl }}img/assets/circle-purple.svg" alt="Bullet Icon" class="w-4 h-4 mr-2 mt-2">
96+
<span>Any kind of disrespectful, discriminatory, or offensive behavior against any party will not be tolerated.</span>
97+
</li>
98+
<li class="flex">
99+
<img src="{{ env.baseUrl }}img/assets/circle-purple.svg" alt="Bullet Icon" class="w-4 h-4 mr-2 mt-2">
100+
<span>Please make sure to follow PyCon India's <a href="{{ env.baseUrl }}coc/guidelines" class="underline text-pycon-blue">Code of Conduct</a>.</span>
101+
</li>
102+
<li class="flex">
103+
<img src="{{ env.baseUrl }}img/assets/circle-purple.svg" alt="Bullet Icon" class="w-4 h-4 mr-2 mt-2">
104+
<span>If you feel unsafe during any of the interactions, or feel like someone is violating the rules, please <a href="{{ env.baseUrl }}coc/reporting" class="underline text-pycon-blue">report the incident to the CoC Workgroup</a>.</span>
105+
</li>
106+
</ul>
107+
</div>
108+
</div>
109+
</div>
110+
</div>

src/attend/jobs.njk

Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
---
2+
title: Job Board - Pycon India 2025
3+
description: PyCon India 2025 Job Board
4+
layout: base.njk
5+
---
6+
7+
{% from "components/flat-card.njk" import flatCard %}
8+
{% from "components/button.njk" import button %}
9+
10+
{% set job_postings = jobData %}
11+
12+
<div class="w-full h-auto bg-pycon-blue px-[6%] pb-32 flex flex-col md:flex-row">
13+
<div class="pt-32 pb-8 md:pb-32 w-full lg:w-[70%]">
14+
<div class="black-han-sans-regular font-normal text-4xl md:text-5xl md:text-center text-[#FFFFFF] text-center lg:text-left">
15+
Job Board
16+
</div>
17+
<div class="pt-10 font-light text-lg md:text-2xl md:text-center text-white text-center lg:text-left">
18+
<p class="mb-0">Submit your job posting <a href="https://docs.google.com/forms/d/e/1FAIpQLSeFiiwkmM1qesa3Ex33K2Tz9qofvZKuG-ZR6PeDHgCK7RzMrg/viewform" target="_blank" rel="noopener noreferrer" class="underline">here</a></p>
19+
<p>Check out the <a href="{{ env.baseUrl }}attend/job-board-guidelines/" class="underline">rules and guidelines</a> </p>
20+
</div>
21+
</div>
22+
<div class="lg:w-[30%] w-[80%] lg:mt-40 flex items-center justify-center mx-auto">
23+
<img src="/img/assets/abstract-obj.svg" alt="Guide" class="w-[40%] lg:w-[60%] transition-transform duration-100" style="animation: floating 2s ease-in-out infinite;">
24+
<img src="/img/assets/star-lime-vector.svg" alt="Guide" class="w-[10%] lg:w-[10%] transition-transform duration-100" style="animation: floating 2s ease-in-out infinite;">
25+
</div>
26+
</div>
27+
28+
29+
<div class="job-container bg-lavender w-full h-auto -pt-20 px-[6%] pb-72 md:pb-40 relative">
30+
<div class="flex flex-wrap -mt-24 -mx-4">
31+
<!-- Column 1 -->
32+
<div class="w-full lg:w-1/3 px-4 flex flex-col gap-8">
33+
{% for job_post in job_postings %}
34+
{% if loop.index0 % 3 == 0 %}
35+
{% set bg_color = 'purple' if loop.index0 // 3 % 2 == 0 else 'lime' %}
36+
{% call flatCard(bg=bg_color) -%}
37+
<div class="p-4">
38+
<div class="text-3xl font-semibold">{{ job_post.title }}</div>
39+
<div class="pt-4">
40+
<span class="text-2xl">
41+
<a href="{{ job_post.company_website }}" class="underline">
42+
{{ job_post.company }}
43+
</a>
44+
</span>
45+
<p class="pt-8 flex items-center gap-x-2 mb-0">
46+
<i class="fa-solid fa-briefcase text-xl text-[#475569]"></i>
47+
<span>{{ job_post.job_type }}</span>
48+
<i class="fa-solid fa-location-dot text-xl text-[#475569]"></i>
49+
<span>{{ job_post.location }}</span>
50+
</p>
51+
</div>
52+
<div class="pt-2 text-gray-700">
53+
<p class="text-justify">
54+
{{ job_post.description }}
55+
</p>
56+
</div>
57+
<div class="pt-4">
58+
{{ button(text="Apply", url=job_post.link_to_apply, lime_bg=(bg_color == "purple"), env=env) }}
59+
</div>
60+
</div>
61+
{%- endcall %}
62+
{% endif %}
63+
{% endfor %}
64+
</div>
65+
66+
<!-- Column 2 -->
67+
<div class="w-full pt-8 lg:pt-16 lg:w-1/3 px-4 flex flex-col gap-8">
68+
{% for job_post in job_postings %}
69+
{% if loop.index0 % 3 == 1 %}
70+
{% set bg_color = 'purple' if loop.index0 // 3 % 2 == 1 else 'lime' %}
71+
{% call flatCard(bg=bg_color) -%}
72+
<div class="p-4">
73+
<div class="text-3xl font-semibold">{{ job_post.title }}</div>
74+
<div class="pt-4">
75+
<span class="text-2xl">
76+
<a href="{{ job_post.company_website }}" class="underline">
77+
{{ job_post.company }}
78+
</a>
79+
</span>
80+
<p class="pt-8 flex items-center gap-x-2 mb-0">
81+
<i class="fa-solid fa-briefcase text-xl text-[#475569]"></i>
82+
<span>{{ job_post.job_type }}</span>
83+
<i class="fa-solid fa-location-dot text-xl text-[#475569]"></i>
84+
<span>{{ job_post.location }}</span>
85+
</p>
86+
</div>
87+
<div class="pt-2 text-gray-700">
88+
<p class="text-justify">
89+
{{ job_post.description }}
90+
</p>
91+
</div>
92+
<div class="pt-4">
93+
{{ button(text="Apply", url=job_post.link_to_apply, lime_bg=(bg_color == "purple"), env=env) }}
94+
</div>
95+
</div>
96+
{%- endcall %}
97+
{% endif %}
98+
{% endfor %}
99+
</div>
100+
101+
<!-- Column 3 -->
102+
<div class="w-full pt-8 lg:pt-0 lg:w-1/3 px-4 flex flex-col gap-8">
103+
{% for job_post in job_postings %}
104+
{% if loop.index0 % 3 == 2 %}
105+
{% set bg_color = 'purple' if loop.index0 // 3 % 2 == 0 else 'lime' %}
106+
{% call flatCard(bg=bg_color) -%}
107+
<div class="p-4">
108+
<div class="text-3xl font-semibold">{{ job_post.title }}</div>
109+
<div class="pt-4">
110+
<span class="text-2xl">
111+
<a href="{{ job_post.company_website }}" class="underline">
112+
{{ job_post.company }}
113+
</a>
114+
</span>
115+
<p class="pt-8 flex items-center gap-x-2 mb-0">
116+
<i class="fa-solid fa-briefcase text-xl text-[#475569]"></i>
117+
<span>{{ job_post.job_type }}</span>
118+
<i class="fa-solid fa-location-dot text-xl text-[#475569]"></i>
119+
<span>{{ job_post.location }}</span>
120+
</p>
121+
</div>
122+
<div class="pt-2 text-gray-700">
123+
<p class="text-justify">
124+
{{ job_post.description }}
125+
</p>
126+
</div>
127+
<div class="pt-4">
128+
{{ button(text="Apply", url=job_post.link_to_apply, lime_bg=(bg_color == "purple"), env=env) }}
129+
</div>
130+
</div>
131+
{%- endcall %}
132+
{% endif %}
133+
{% endfor %}
134+
</div>
135+
</div>
136+
</div>
Lines changed: 15 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)