Skip to content

Commit f8af539

Browse files
Mohit Khandelwalfarhaanbukhsh
authored andcommitted
refactor: use listCard to render cfp categories
Issue: #169
1 parent 3cf4ff2 commit f8af539

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

0 commit comments

Comments
 (0)