diff --git a/src/_data/env.js b/src/_data/env.js index 0550157..e588b13 100644 --- a/src/_data/env.js +++ b/src/_data/env.js @@ -1,7 +1,6 @@ -const isDev = process.env.ELEVENTY_ENV === 'dev' +const isDev = process.env.ELEVENTY_ENV === "dev"; module.exports = { - baseUrl: isDev - ? '/' - : '/2025/' -} \ No newline at end of file + baseUrl: isDev ? "/" : "/2025/", + spreadsheetURL: "https://docs.google.com/spreadsheets/d/1gIGszJWFngjaP4GuEqudAuYg95LGRLm-xO6re-DIKMA/gviz/tq?tqx=out:json" +}; diff --git a/src/_data/jobData.js b/src/_data/jobData.js new file mode 100644 index 0000000..5f7d9ea --- /dev/null +++ b/src/_data/jobData.js @@ -0,0 +1,47 @@ +const env = require("./env"); + +async function fetchJobPostings(URL) { + try { + const response = await fetch(URL); + const text = await response.text(); + + const jsonString = text.substring(47).slice(0, -2); + const json = JSON.parse(jsonString); + const rows = json.table.rows; + + const ensureHttps = (url) => { + if (!/^https?:\/\//.test(url)) { + return `https://${url}`; + } + return url; + }; + + const isValidUrl = (url) => { + const pattern = /^(https?:\/\/)?([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}(:\d+)?(\/.*)?$/; + return pattern.test(url); + }; + + const jobPostings = rows.map((row) => ({ + title: row.c[5]?.v || "No title", + company: row.c[2]?.v || "Unknown", + company_website: ensureHttps(row.c[4]?.v) || "#", + job_type: row.c[6]?.v || "N/A", + location: row.c[8]?.v || "Unknown", + description: row.c[7]?.v || "No description available", + link_to_apply: ensureHttps(row.c[9]?.v) || "#", + })) + .filter((job_post) => + isValidUrl(job_post.company_website) && + isValidUrl(job_post.link_to_apply) + ); + + return jobPostings; + } catch (error) { + console.error("Error fetching or processing job postings:", error); + return []; + } +} + +module.exports = async function () { + return await fetchJobPostings(env.spreadsheetURL); +}; \ No newline at end of file diff --git a/src/_data/menuItems.json b/src/_data/menuItems.json index 291f855..e3a7700 100644 --- a/src/_data/menuItems.json +++ b/src/_data/menuItems.json @@ -19,6 +19,10 @@ "name": "Health and Safety", "link": "attend/health-and-safety" }, + { + "name": "Job Board", + "link": "attend/jobs" + }, { "name": "FAQ's", "link": "attend/faqs" diff --git a/src/_includes/components/button.njk b/src/_includes/components/button.njk index fa4a006..9819727 100644 --- a/src/_includes/components/button.njk +++ b/src/_includes/components/button.njk @@ -3,8 +3,8 @@ {% set bg_class = "bg-pycon-lime hover:bg-pycon-lime/90" %} {% set text_class = "text-black" %} {% else %} - {% set bg_class = "bg-transparent border-pycon-lime" %} - {% set text_class = "text-pycon-lime" %} + {% set bg_class = "bg-pycon-purple hover:bg-pycon-purple/90" %} + {% set text_class = "text-black" %} {% endif %} +
+
+ Job Board - Rules and Guidelines +
+
+
+ Guide + Guide +
+ + + +
+
+
+
+

Bullet IconJob Submission & Approval:

+
    +
  • + Bullet Icon + We do not impose any restrictions on the industry/technology of the submitted jobs. Any jobs that are helpful to the community are welcome. +
  • +
  • + Bullet Icon + After successful job submission, each job will undergo a verification process by the PyCon India 2025 team to ensure there are no spam postings. +
  • +
  • + Bullet Icon + The approval process may take approximately 2-3 hours. +
  • +
  • + Bullet Icon + Approved jobs will be made visible on the job board once they pass the verification process. +
  • +
  • + Bullet Icon + Submissions that do not meet the guidelines may be rejected. +
  • +
+
+ +
+

Bullet IconJob Posts Order:

+
    +
  • + Bullet Icon + 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. +
  • +
+
+ +
+

Bullet IconTransparency:

+
    +
  • + Bullet Icon + After successful job submission, each job will undergo a verification process by the PyCon India 2025 team to ensure there are no spam postings. +
  • +
  • + Bullet Icon + Job seekers and companies are encouraged to communicate directly with each other for job-related inquiries, applications, and hiring decisions. +
  • +
+
+ +
+ +
+

Bullet IconRespect and Inclusivity:

+
    +
  • + Bullet Icon + Users are expected to maintain a respectful and inclusive environment when interacting with job listings or other users on the platform. +
  • +
  • + Bullet Icon + Any kind of disrespectful, discriminatory, or offensive behavior against any party will not be tolerated. +
  • +
  • + Bullet Icon + Please make sure to follow PyCon India's Code of Conduct. +
  • +
  • + Bullet Icon + If you feel unsafe during any of the interactions, or feel like someone is violating the rules, please report the incident to the CoC Workgroup. +
  • +
+
+
+
+
diff --git a/src/attend/jobs.njk b/src/attend/jobs.njk new file mode 100644 index 0000000..e10c3b0 --- /dev/null +++ b/src/attend/jobs.njk @@ -0,0 +1,136 @@ +--- +title: Job Board - Pycon India 2025 +description: PyCon India 2025 Job Board +layout: base.njk +--- + +{% from "components/flat-card.njk" import flatCard %} +{% from "components/button.njk" import button %} + +{% set job_postings = jobData %} + +
+
+
+ Job Board +
+
+

Submit your job posting here

+

Check out the rules and guidelines

+
+
+
+ Guide + Guide +
+
+ + +
+
+ +
+ {% for job_post in job_postings %} + {% if loop.index0 % 3 == 0 %} + {% set bg_color = 'purple' if loop.index0 // 3 % 2 == 0 else 'lime' %} + {% call flatCard(bg=bg_color) -%} +
+
{{ job_post.title }}
+
+ + + {{ job_post.company }} + + +

+ + {{ job_post.job_type }} + + {{ job_post.location }} +

+
+
+

+ {{ job_post.description }} +

+
+
+ {{ button(text="Apply", url=job_post.link_to_apply, lime_bg=(bg_color == "purple"), env=env) }} +
+
+ {%- endcall %} + {% endif %} + {% endfor %} +
+ + +
+ {% for job_post in job_postings %} + {% if loop.index0 % 3 == 1 %} + {% set bg_color = 'purple' if loop.index0 // 3 % 2 == 1 else 'lime' %} + {% call flatCard(bg=bg_color) -%} +
+
{{ job_post.title }}
+
+ + + {{ job_post.company }} + + +

+ + {{ job_post.job_type }} + + {{ job_post.location }} +

+
+
+

+ {{ job_post.description }} +

+
+
+ {{ button(text="Apply", url=job_post.link_to_apply, lime_bg=(bg_color == "purple"), env=env) }} +
+
+ {%- endcall %} + {% endif %} + {% endfor %} +
+ + +
+ {% for job_post in job_postings %} + {% if loop.index0 % 3 == 2 %} + {% set bg_color = 'purple' if loop.index0 // 3 % 2 == 0 else 'lime' %} + {% call flatCard(bg=bg_color) -%} +
+
{{ job_post.title }}
+
+ + + {{ job_post.company }} + + +

+ + {{ job_post.job_type }} + + {{ job_post.location }} +

+
+
+

+ {{ job_post.description }} +

+
+
+ {{ button(text="Apply", url=job_post.link_to_apply, lime_bg=(bg_color == "purple"), env=env) }} +
+
+ {%- endcall %} + {% endif %} + {% endfor %} +
+
+
diff --git a/src/static/img/assets/abstract-obj.svg b/src/static/img/assets/abstract-obj.svg new file mode 100644 index 0000000..318e9e2 --- /dev/null +++ b/src/static/img/assets/abstract-obj.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + +