Skip to content

Commit 4b6d9e3

Browse files
author
Mohit Khandelwal
committed
refactor: use listCard to render cfp categories
Issue: #169:
1 parent 210c498 commit 4b6d9e3

File tree

4 files changed

+111
-155
lines changed

4 files changed

+111
-155
lines changed

src/_data/cfp.json

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
[
2+
{
3+
"category": "Python Core & Performance",
4+
"description": [
5+
"Fundamental Python concepts like language runtime, AST, standard library, etc.",
6+
"Deep dive into Python internals and memory management",
7+
"Performance improvements using Cython, PyPy, etc."
8+
]
9+
},
10+
{
11+
"category": "AI, ML & Data Science",
12+
"description": [
13+
"Generative AI, LLMs, multimodal AI, and reinforcement learning",
14+
"ETL, Real-time analytics, and business intelligence",
15+
"Applications of AI in automation, NLP, and computer vision"
16+
]
17+
},
18+
{
19+
"category": "Python for Cloud, DevOps & Infrastructure",
20+
"description": [
21+
"Cloud native applications with AWS, GCP, and Azure",
22+
"Kubernetes, Terraform, and Infrastructure as Code (IaC)",
23+
"CI/CD automation and serverless computing"
24+
]
25+
},
26+
{
27+
"category": "Web, Desktop & Full-Stack Development",
28+
"description": [
29+
"Building APIs & web applications using gRPC, FastAPI, Django, etc.",
30+
"Desktop App Development – GUI frameworks like PyQt, Tkinter, etc."
31+
]
32+
},
33+
{
34+
"category": "Python for Hardware, Edge Computing & IoT",
35+
"description": [
36+
"MicroPython, CircuitPython, and real-time embedded systems",
37+
"Robotics, automation, and IoT applications"
38+
]
39+
},
40+
{
41+
"category": "Python in Research & Education",
42+
"description": [
43+
"High-performance computing in physics, chemistry, and climate modeling",
44+
"Python in medical research and educational applications"
45+
]
46+
},
47+
{
48+
"category": "Community",
49+
"description": [
50+
"Cultural aspects & societal influence of Python",
51+
"Ethical considerations in technology",
52+
"Career growth, mentorship & developer well-being"
53+
]
54+
},
55+
{
56+
"category": "Others",
57+
"description": [
58+
"Emerging tech – quantum computing, blockchain, etc.",
59+
"Python's role in sustainability & green computing",
60+
"Python in FinTech & algorithmic trading and more"
61+
]
62+
}
63+
]

src/_includes/components/list.njk

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{% macro list(items=[], bulletColor="lime") %}
2+
{% if bulletColor == "purple" %}
3+
{% set imgSrc = "../img/assets/circle-purple.svg" %}
4+
{% else %}
5+
{% set imgSrc = "../img/assets/circle-lime.svg" %}
6+
{% endif %}
7+
8+
<ul class="list-none space-y-2">
9+
{% for item in items %}
10+
<li class="flex">
11+
<img src={{imgSrc}} alt="Bullet Icon" class="w-4 h-4 mr-2 mt-1 lg:mt-1.5">
12+
<span>{{ item }}</span>
13+
</li>
14+
{% endfor %}
15+
</ul>
16+
{% endmacro %}

src/_includes/components/listCard.njk

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{% from "components/flat-card.njk" import flatCard %}
2+
{% from "components/list.njk" import list %}
3+
4+
{% macro listCard(title="", items=[], bgColor="", bulletColor="") %}
5+
{% call flatCard(bg=bgColor) -%}
6+
<div class="p-4">
7+
{% if title %}
8+
<p class="text-xl font-bold">{{ title }}</p>
9+
{% endif %}
10+
{% call list(bulletColor=bulletColor, items=items) -%}
11+
{%- endcall %}
12+
</div>
13+
{%- endcall %}
14+
{% endmacro %}

src/cfp/index.njk

Lines changed: 18 additions & 155 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@ layout: base.njk
66

77
{% from "components/button.njk" import button %}
88
{% from "components/flat-card.njk" import flatCard %}
9+
{% from "components/list.njk" import list %}
10+
{% from "components/listCard.njk" import listCard %}
11+
12+
13+
{% set callForProposals = cfp %}
14+
15+
916

1017
<div class="w-full h-auto bg-pycon-blue -mb-24 px-[6%] flex flex-col md:flex-row">
1118
<div class="pt-32 pb-8 md:pb-32 w-full lg:w-[70%]">
@@ -199,162 +206,18 @@ layout: base.njk
199206
</div>
200207
<div class="pt-8">
201208
<div class="grid grid-cols-1 md:grid-cols-2 gap-8">
202-
<div>
203-
{% call flatCard(bg="lime") -%}
204-
<div class="p-4">
205-
<p class="text-xl font-bold">Python Core & Performance</p>
206-
<ul class="list-none pt-4 space-y-2">
207-
<li class="flex">
208-
<img src="{{ env.baseUrl }}img/assets/circle-purple.svg" alt="Bullet Icon" class="w-4 h-4 mr-2 mt-1">
209-
<span>Fundamental Python concepts like language runtime, AST, standard library, etc.</span>
210-
</li>
211-
<li class="flex">
212-
<img src="{{ env.baseUrl }}img/assets/circle-purple.svg" alt="Bullet Icon" class="w-4 h-4 mr-2 mt-1">
213-
<span>Deep dive into Python internals and memory management</span>
214-
</li>
215-
<li class="flex">
216-
<img src="{{ env.baseUrl }}img/assets/circle-purple.svg" alt="Bullet Icon" class="w-4 h-4 mr-2 mt-1">
217-
<span>Performance improvements using Cython, PyPy, etc.</span>
218-
</li>
219-
</ul>
220-
</div>
221-
{%- endcall %}
222-
</div>
223-
<div>
224-
{% call flatCard(bg="purple") -%}
225-
<div class="p-4">
226-
<p class="text-xl font-bold">AI, ML & Data Science</p>
227-
<ul class="list-none pt-4 space-y-2">
228-
<li class="flex">
229-
<img src="{{ env.baseUrl }}img/assets/circle-lime.svg" alt="Bullet Icon" class="w-4 h-4 mr-2 mt-1">
230-
<span>Generative AI, LLMs, multimodal AI, and reinforcement learning</span>
231-
</li>
232-
<li class="flex">
233-
<img src="{{ env.baseUrl }}img/assets/circle-lime.svg" alt="Bullet Icon" class="w-4 h-4 mr-2 mt-1">
234-
<span>ETL, Real-time analytics, and business intelligence</span>
235-
</li>
236-
<li class="flex">
237-
<img src="{{ env.baseUrl }}img/assets/circle-lime.svg" alt="Bullet Icon" class="w-4 h-4 mr-2 mt-1">
238-
<span>Applications of AI in automation, NLP, and computer vision</span>
239-
</li>
240-
</ul>
241-
</div>
242-
{%- endcall %}
243-
</div>
244-
<div>
245-
{% call flatCard(bg="purple") -%}
246-
<div class="p-4">
247-
<p class="text-xl font-bold">Python for Cloud, DevOps & Infrastructure</p>
248-
<ul class="list-none pt-4 space-y-2">
249-
<li class="flex">
250-
<img src="{{ env.baseUrl }}img/assets/circle-lime.svg" alt="Bullet Icon" class="w-4 h-4 mr-2 mt-1">
251-
<span>Cloud native applications with AWS, GCP, and Azure</span>
252-
</li>
253-
<li class="flex">
254-
<img src="{{ env.baseUrl }}img/assets/circle-lime.svg" alt="Bullet Icon" class="w-4 h-4 mr-2 mt-1">
255-
<span>Kubernetes, Terraform, and Infrastructure as Code (IaC)</span>
256-
</li>
257-
<li class="flex">
258-
<img src="{{ env.baseUrl }}img/assets/circle-lime.svg" alt="Bullet Icon" class="w-4 h-4 mr-2 mt-1">
259-
<span>CI/CD automation and serverless computing</span>
260-
</li>
261-
</ul>
262-
</div>
263-
{%- endcall %}
264-
</div>
265-
<div>
266-
{% call flatCard(bg="lime") -%}
267-
<div class="p-4">
268-
<p class="text-xl font-bold">Web, Desktop & Full-Stack Development</p>
269-
<ul class="list-none pt-4 space-y-2">
270-
<li class="flex">
271-
<img src="{{ env.baseUrl }}img/assets/circle-purple.svg" alt="Bullet Icon" class="w-4 h-4 mr-2 mt-1">
272-
<span>Building APIs & web applications using gRPC, FastAPI, Django, etc.</span>
273-
</li>
274-
<li class="flex">
275-
<img src="{{ env.baseUrl }}img/assets/circle-purple.svg" alt="Bullet Icon" class="w-4 h-4 mr-2 mt-1">
276-
<span>Desktop App Development – GUI frameworks like PyQt, Tkinter, etc.</span>
277-
</li>
278-
</ul>
279-
</div>
280-
{%- endcall %}
281-
</div>
282-
<div>
283-
{% call flatCard(bg="lime") -%}
284-
<div class="p-4">
285-
<p class="text-xl font-bold">Python for Hardware, Edge Computing & IoT</p>
286-
<ul class="list-none pt-4 space-y-2">
287-
<li class="flex">
288-
<img src="{{ env.baseUrl }}img/assets/circle-purple.svg" alt="Bullet Icon" class="w-4 h-4 mr-2 mt-1">
289-
<span>MicroPython, CircuitPython, and real-time embedded systems</span>
290-
</li>
291-
<li class="flex">
292-
<img src="{{ env.baseUrl }}img/assets/circle-purple.svg" alt="Bullet Icon" class="w-4 h-4 mr-2 mt-1">
293-
<span>Robotics, automation, and IoT applications</span>
294-
</li>
295-
</ul>
296-
</div>
297-
{%- endcall %}
298-
</div>
299-
<div>
300-
{% call flatCard(bg="purple") -%}
301-
<div class="p-4">
302-
<p class="text-xl font-bold">Python in Research & Education</p>
303-
<ul class="list-none pt-4 space-y-2">
304-
<li class="flex">
305-
<img src="{{ env.baseUrl }}img/assets/circle-lime.svg" alt="Bullet Icon" class="w-4 h-4 mr-2 mt-1">
306-
<span>High-performance computing in physics, chemistry, and climate modeling</span>
307-
</li>
308-
<li class="flex">
309-
<img src="{{ env.baseUrl }}img/assets/circle-lime.svg" alt="Bullet Icon" class="w-4 h-4 mr-2 mt-1">
310-
<span>Python in medical research and educational applications</span>
311-
</li>
312-
</ul>
313-
</div>
314-
{%- endcall %}
315-
</div>
316-
<div>
317-
{% call flatCard(bg="purple") -%}
318-
<div class="p-4">
319-
<p class="text-xl font-bold">Community</p>
320-
<ul class="list-none pt-4 space-y-2">
321-
<li class="flex">
322-
<img src="{{ env.baseUrl }}img/assets/circle-lime.svg" alt="Bullet Icon" class="w-4 h-4 mr-2 mt-1">
323-
<span>Cultural aspects & societal influence of Python</span>
324-
</li>
325-
<li class="flex">
326-
<img src="{{ env.baseUrl }}img/assets/circle-lime.svg" alt="Bullet Icon" class="w-4 h-4 mr-2 mt-1">
327-
<span>Ethical considerations in technology</span>
328-
</li>
329-
<li class="flex">
330-
<img src="{{ env.baseUrl }}img/assets/circle-lime.svg" alt="Bullet Icon" class="w-4 h-4 mr-2 mt-1">
331-
<span>Career growth, mentorship & developer well-being</span>
332-
</li>
333-
</ul>
334-
</div>
335-
{%- endcall %}
336-
</div>
337-
<div>
338-
{% call flatCard(bg="lime") -%}
339-
<div class="p-4">
340-
<p class="text-xl font-bold">Others</p>
341-
<ul class="list-none pt-4 space-y-2">
342-
<li class="flex">
343-
<img src="{{ env.baseUrl }}img/assets/circle-purple.svg" alt="Bullet Icon" class="w-4 h-4 mr-2 mt-1">
344-
<span>Emerging tech – quantum computing, blockchain, etc.</span>
345-
</li>
346-
<li class="flex">
347-
<img src="{{ env.baseUrl }}img/assets/circle-purple.svg" alt="Bullet Icon" class="w-4 h-4 mr-2 mt-1">
348-
<span>Python's role in sustainability & green computing</span>
349-
</li>
350-
<li class="flex">
351-
<img src="{{ env.baseUrl }}img/assets/circle-purple.svg" alt="Bullet Icon" class="w-4 h-4 mr-2 mt-1">
352-
<span>Python in FinTech & algorithmic trading and more</span>
353-
</li>
354-
</ul>
355-
</div>
209+
{% set bgLimeIndex = [0, 3, 4, 7, 8] %}
210+
{% for proposal in callForProposals %}
211+
{% if loop.index0 in bgLimeIndex %}
212+
{% set bgColor = "lime" %}
213+
{% set bulletColor = "purple" %}
214+
{% else %}
215+
{% set bgColor = "purple" %}
216+
{% set bulletColor = "lime" %}
217+
{% endif %}
218+
{% call listCard(title=proposal.category, items=proposal.description, bgColor=bgColor, bulletColor=bulletColor) -%}
356219
{%- endcall %}
357-
</div>
220+
{% endfor %}
358221
</div>
359222
</div>
360223
</div>

0 commit comments

Comments
 (0)