Skip to content

Commit 2e3d623

Browse files
committed
refactor: merchandise catalog with dynamic items dictionary
1 parent 049cc34 commit 2e3d623

File tree

3 files changed

+175
-241
lines changed

3 files changed

+175
-241
lines changed

app/home/templates/internal/pages/merchandise.html

Lines changed: 35 additions & 231 deletions
Original file line numberDiff line numberDiff line change
@@ -1,260 +1,64 @@
11
{% load static %}
22

3+
<div class="fixed bottom-8 right-8 z-50 flex flex-col items-center gap-2">
4+
<a
5+
href="https://forms.gle/RRdGLFGUV6sbJtey5"
6+
target="_blank"
7+
rel="noopener noreferrer"
8+
class="bg-orange-2 text-white font-bold font-bantayog px-4 py-2 rounded-full hover:opacity-90 transition-opacity shadow-lg text-sm"
9+
>
10+
Reserve
11+
</a>
12+
<p class="font-nunito text-brown-2 text-xs">or scan</p>
13+
<img
14+
src="{% static 'img/merchandise/order-form-qr.png' %}"
15+
alt="QR code for merchandise order form"
16+
class="w-20 h-20 rounded-lg shadow-md bg-white p-0.5"
17+
>
18+
</div>
19+
320
<div class="max-w-6xl mx-auto px-[4%] pt-40 pb-18">
421
<h2 class="text-3xl sm:text-5xl my-10 font-bold font-td_pinoy text-orange-2">
5-
Merchandise
22+
Merchandise Catalog
623
</h2>
724

825
<div class="font-nunito text-brown-2 text-base sm:text-lg mb-12 space-y-4">
926
<p>
10-
Thank you for your interest in PythonAsia 2026 merchandise! Browse our exclusive collection
11-
below — from apparel and accessories to Filipino-inspired keepsakes.
27+
Thank you for your interest in PythonAsia 2026 merchandise. Browse our exclusive collection below — from apparel and accessories to Filipino-inspired keepsakes.
1228
</p>
1329
<p>
14-
This order form is <strong>exclusive to confirmed attendees</strong> of PythonAsia 2026.
15-
Fill it out to reserve your items. Our organizing team will contact you to confirm
16-
your order and provide payment instructions.
30+
This page serves as a catalog for confirmed attendees of PythonAsia 2026. You may explore the available items here. Instructions on how to reserve or purchase merchandise will be provided separately by the organizing team.
1731
</p>
18-
<div class="flex flex-col items-center gap-4 pt-2">
19-
<a
20-
href="https://forms.gle/RRdGLFGUV6sbJtey5"
21-
target="_blank"
22-
rel="noopener noreferrer"
23-
class="inline-block bg-orange-2 text-white font-bold font-bantayog px-8 py-3 rounded-xl hover:opacity-90 transition-opacity"
24-
>
25-
Reserve Your Merch
26-
</a>
27-
<div class="flex flex-col items-center gap-2 pt-2">
28-
<p class="font-nunito text-brown-2 text-sm">or scan to reserve</p>
29-
<img
30-
src="{% static 'img/merchandise/order-form-qr.png' %}"
31-
alt="QR code for merchandise order form"
32-
class="w-28 h-28 rounded-lg shadow-sm"
33-
>
34-
</div>
32+
33+
<div class="border-l-4 border-orange-2 bg-white rounded-lg p-6 sm:p-8 my-12 shadow-sm">
34+
<p class="font-bantayog font-bold text-brown-1 text-lg sm:text-xl mb-3">Note</p>
35+
<p class="font-nunito text-brown-2 text-base leading-relaxed">
36+
Reserving an item does <strong>not guarantee merchandise</strong>. Distribution is <strong>first-come, first-served, while supplies last</strong>. The swags team will contact you if your reservation is accommodated.
37+
</p>
3538
</div>
3639
</div>
3740

3841
<div class="grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-3 sm:gap-4">
3942

43+
{% for item in merchandise_items %}
4044
<div class="bg-offwhite-2 rounded-2xl overflow-hidden shadow-sm flex flex-col">
4145
<div class="aspect-square bg-cream-1 flex items-center justify-center p-4">
4246
<img
43-
src="{% static 'img/merchandise/tshirt-kalinga-maroon.png' %}"
44-
alt="Kalinga T-Shirt (Maroon)"
45-
class="w-full h-full object-contain"
46-
loading="lazy"
47-
>
48-
</div>
49-
<div class="p-3 sm:p-4 flex flex-col flex-1">
50-
<h3 class="font-bantayog font-bold text-brown-1 text-sm sm:text-base leading-snug">Kalinga T-Shirt</h3>
51-
<p class="font-nunito text-brown-2 text-sm mt-1">Maroon · XS–2XL</p>
52-
<p class="font-nunito font-bold text-orange-2 text-sm sm:text-base mt-auto pt-3">₱500.00</p>
53-
</div>
54-
</div>
55-
56-
<div class="bg-offwhite-2 rounded-2xl overflow-hidden shadow-sm flex flex-col">
57-
<div class="aspect-square bg-cream-1 flex items-center justify-center p-4">
58-
<img
59-
src="{% static 'img/merchandise/tshirt-pythonasia-2026-white-generic.png' %}"
60-
alt="PythonAsia 2026 T-Shirt (White)"
61-
class="w-full h-full object-contain"
62-
loading="lazy"
63-
>
64-
</div>
65-
<div class="p-3 sm:p-4 flex flex-col flex-1">
66-
<h3 class="font-bantayog font-bold text-brown-1 text-sm sm:text-base leading-snug">PythonAsia 2026 T-Shirt</h3>
67-
<p class="font-nunito text-brown-2 text-sm mt-1">Conference Type · White · XS–2XL</p>
68-
<p class="font-nunito font-bold text-orange-2 text-sm sm:text-base mt-auto pt-3">₱500.00</p>
69-
</div>
70-
</div>
71-
72-
<div class="bg-offwhite-2 rounded-2xl overflow-hidden shadow-sm flex flex-col">
73-
<div class="aspect-square bg-cream-1 flex items-center justify-center p-4">
74-
<img
75-
src="{% static 'img/merchandise/leather-tray.png' %}"
76-
alt="Leather Tray"
77-
class="w-full h-full object-contain"
78-
loading="lazy"
79-
>
80-
</div>
81-
<div class="p-3 sm:p-4 flex flex-col flex-1">
82-
<h3 class="font-bantayog font-bold text-brown-1 text-sm sm:text-base leading-snug">Leather Tray</h3>
83-
<p class="font-nunito font-bold text-orange-2 text-sm sm:text-base mt-auto pt-3">₱450.00</p>
84-
</div>
85-
</div>
86-
87-
<div class="bg-offwhite-2 rounded-2xl overflow-hidden shadow-sm flex flex-col">
88-
<div class="aspect-square bg-cream-1 flex items-center justify-center p-4">
89-
<img
90-
src="{% static 'img/merchandise/notepad-large.png' %}"
91-
alt="Notepad (80 Sheets, 4×4)"
92-
class="w-full h-full object-contain"
93-
loading="lazy"
94-
>
95-
</div>
96-
<div class="p-3 sm:p-4 flex flex-col flex-1">
97-
<h3 class="font-bantayog font-bold text-brown-1 text-sm sm:text-base leading-snug">Notepad</h3>
98-
<p class="font-nunito text-brown-2 text-sm mt-1">80 Sheets · 4×4</p>
99-
<p class="font-nunito font-bold text-orange-2 text-sm sm:text-base mt-auto pt-3">₱100.00</p>
100-
</div>
101-
</div>
102-
103-
<div class="bg-offwhite-2 rounded-2xl overflow-hidden shadow-sm flex flex-col">
104-
<div class="aspect-square bg-cream-1 flex items-center justify-center p-4">
105-
<img
106-
src="{% static 'img/merchandise/notepad-design1-small.png' %}"
107-
alt="Notepad Design 1 (40 Sheets, 3×3)"
108-
class="w-full h-full object-contain"
109-
loading="lazy"
110-
>
111-
</div>
112-
<div class="p-3 sm:p-4 flex flex-col flex-1">
113-
<h3 class="font-bantayog font-bold text-brown-1 text-sm sm:text-base leading-snug">Notepad Design 1</h3>
114-
<p class="font-nunito text-brown-2 text-sm mt-1">40 Sheets · 3×3</p>
115-
<p class="font-nunito font-bold text-orange-2 text-sm sm:text-base mt-auto pt-3">₱80.00</p>
116-
</div>
117-
</div>
118-
119-
<div class="bg-offwhite-2 rounded-2xl overflow-hidden shadow-sm flex flex-col">
120-
<div class="aspect-square bg-cream-1 flex items-center justify-center p-4">
121-
<img
122-
src="{% static 'img/merchandise/notepad-design2-small.png' %}"
123-
alt="Notepad Design 2 (40 Sheets, 3×3)"
124-
class="w-full h-full object-contain"
125-
loading="lazy"
126-
>
127-
</div>
128-
<div class="p-3 sm:p-4 flex flex-col flex-1">
129-
<h3 class="font-bantayog font-bold text-brown-1 text-sm sm:text-base leading-snug">Notepad Design 2</h3>
130-
<p class="font-nunito text-brown-2 text-sm mt-1">40 Sheets · 3×3</p>
131-
<p class="font-nunito font-bold text-orange-2 text-sm sm:text-base mt-auto pt-3">₱80.00</p>
132-
</div>
133-
</div>
134-
135-
<div class="bg-offwhite-2 rounded-2xl overflow-hidden shadow-sm flex flex-col">
136-
<div class="aspect-square bg-cream-1 flex items-center justify-center p-4">
137-
<img
138-
src="{% static 'img/merchandise/pythonasia-2026-acrylic.png' %}"
139-
alt="Acrylic Keychain PythonAsia 2026"
140-
class="w-full h-full object-contain"
141-
loading="lazy"
142-
>
143-
</div>
144-
<div class="p-3 sm:p-4 flex flex-col flex-1">
145-
<h3 class="font-bantayog font-bold text-brown-1 text-sm sm:text-base leading-snug">Acrylic Keychain PythonAsia 2026</h3>
146-
<p class="font-nunito font-bold text-orange-2 text-sm sm:text-base mt-auto pt-3">₱100.00</p>
147-
</div>
148-
</div>
149-
150-
<div class="bg-offwhite-2 rounded-2xl overflow-hidden shadow-sm flex flex-col">
151-
<div class="aspect-square bg-cream-1 flex items-center justify-center p-4">
152-
<img
153-
src="{% static 'img/merchandise/palayok-acrylic.png' %}"
154-
alt="Acrylic Keychain Palayok"
155-
class="w-full h-full object-contain"
156-
loading="lazy"
157-
>
158-
</div>
159-
<div class="p-3 sm:p-4 flex flex-col flex-1">
160-
<h3 class="font-bantayog font-bold text-brown-1 text-sm sm:text-base leading-snug">Acrylic Keychain Palayok</h3>
161-
<p class="font-nunito font-bold text-orange-2 text-sm sm:text-base mt-auto pt-3">₱100.00</p>
162-
</div>
163-
</div>
164-
165-
<div class="bg-offwhite-2 rounded-2xl overflow-hidden shadow-sm flex flex-col">
166-
<div class="aspect-square bg-cream-1 flex items-center justify-center p-4">
167-
<img
168-
src="{% static 'img/merchandise/fridge-magnet.jpg' %}"
169-
alt="Refrigerator Magnet"
170-
class="w-full h-full object-contain"
171-
loading="lazy"
172-
>
173-
</div>
174-
<div class="p-3 sm:p-4 flex flex-col flex-1">
175-
<h3 class="font-bantayog font-bold text-brown-1 text-sm sm:text-base leading-snug">Refrigerator Magnet</h3>
176-
<p class="font-nunito font-bold text-orange-2 text-sm sm:text-base mt-auto pt-3">₱150.00</p>
177-
</div>
178-
</div>
179-
180-
<div class="bg-offwhite-2 rounded-2xl overflow-hidden shadow-sm flex flex-col">
181-
<div class="aspect-square bg-cream-1 flex items-center justify-center p-4">
182-
<img
183-
src="{% static 'img/merchandise/pythonph-fidget.jpg' %}"
184-
alt="3D PythonPH Clicker Fidget"
185-
class="w-full h-full object-contain"
186-
loading="lazy"
187-
>
188-
</div>
189-
<div class="p-3 sm:p-4 flex flex-col flex-1">
190-
<h3 class="font-bantayog font-bold text-brown-1 text-sm sm:text-base leading-snug">3D PythonPH Clicker Fidget</h3>
191-
<p class="font-nunito font-bold text-orange-2 text-sm sm:text-base mt-auto pt-3">₱250.00</p>
192-
</div>
193-
</div>
194-
195-
<div class="bg-offwhite-2 rounded-2xl overflow-hidden shadow-sm flex flex-col">
196-
<div class="aspect-square bg-cream-1 flex items-center justify-center p-4">
197-
<img
198-
src="{% static 'img/merchandise/palayok-clicker.png' %}"
199-
alt="3D Palayok Clicker Fidget (Large)"
200-
class="w-full h-full object-contain"
201-
loading="lazy"
202-
>
203-
</div>
204-
<div class="p-3 sm:p-4 flex flex-col flex-1">
205-
<h3 class="font-bantayog font-bold text-brown-1 text-sm sm:text-base leading-snug">3D Palayok Clicker Fidget</h3>
206-
<p class="font-nunito text-brown-2 text-sm mt-1">Large</p>
207-
<p class="font-nunito font-bold text-orange-2 text-sm sm:text-base mt-auto pt-3">₱350.00</p>
208-
</div>
209-
</div>
210-
211-
<div class="bg-offwhite-2 rounded-2xl overflow-hidden shadow-sm flex flex-col">
212-
<div class="aspect-square bg-cream-1 flex items-center justify-center p-4">
213-
<img
214-
src="{% static 'img/merchandise/palayok-clicker.png' %}"
215-
alt="3D Palayok Clicker Fidget (Small)"
216-
class="w-full h-full object-contain"
217-
loading="lazy"
218-
>
219-
</div>
220-
<div class="p-3 sm:p-4 flex flex-col flex-1">
221-
<h3 class="font-bantayog font-bold text-brown-1 text-sm sm:text-base leading-snug">3D Palayok Clicker Fidget</h3>
222-
<p class="font-nunito text-brown-2 text-sm mt-1">Small</p>
223-
<p class="font-nunito font-bold text-orange-2 text-sm sm:text-base mt-auto pt-3">₱300.00</p>
224-
</div>
225-
</div>
226-
227-
<div class="bg-offwhite-2 rounded-2xl overflow-hidden shadow-sm flex flex-col">
228-
<div class="aspect-square bg-cream-1 flex items-center justify-center p-4">
229-
<img
230-
src="{% static 'img/merchandise/pythonasia-2026-socks.png' %}"
231-
alt="PythonAsia Pattern Style Customized Socks (Beige)"
232-
class="w-full h-full object-contain"
233-
loading="lazy"
234-
>
235-
</div>
236-
<div class="p-3 sm:p-4 flex flex-col flex-1">
237-
<h3 class="font-bantayog font-bold text-brown-1 text-sm sm:text-base leading-snug">PythonAsia Pattern Style Customized Socks</h3>
238-
<p class="font-nunito text-brown-2 text-sm mt-1">Beige</p>
239-
<p class="font-nunito font-bold text-orange-2 text-sm sm:text-base mt-auto pt-3">₱350.00</p>
240-
</div>
241-
</div>
242-
243-
<div class="bg-offwhite-2 rounded-2xl overflow-hidden shadow-sm flex flex-col">
244-
<div class="aspect-square bg-cream-1 flex items-center justify-center p-4">
245-
<img
246-
src="{% static 'img/merchandise/socks-pattern-pythonph.png' %}"
247-
alt="PythonPH Logo Pattern Style Customized Socks (Black)"
47+
src="{% static item.image %}"
48+
alt="{{ item.name }}{% if item.description %} ({{ item.description }}){% endif %}"
24849
class="w-full h-full object-contain"
24950
loading="lazy"
25051
>
25152
</div>
25253
<div class="p-3 sm:p-4 flex flex-col flex-1">
253-
<h3 class="font-bantayog font-bold text-brown-1 text-sm sm:text-base leading-snug">PythonPH Logo Pattern Style Customized Socks</h3>
254-
<p class="font-nunito text-brown-2 text-sm mt-1">Black</p>
255-
<p class="font-nunito font-bold text-orange-2 text-sm sm:text-base mt-auto pt-3">₱320.00</p>
54+
<h3 class="font-bantayog font-bold text-brown-1 text-sm sm:text-base leading-snug">{{ item.name }}</h3>
55+
{% if item.description %}
56+
<p class="font-nunito text-brown-2 text-sm mt-1">{{ item.description }}</p>
57+
{% endif %}
58+
<p class="font-nunito font-bold text-orange-2 text-sm sm:text-base mt-auto pt-3">{{ item.price }}</p>
25659
</div>
25760
</div>
61+
{% endfor %}
25862

25963
</div>
26064

app/home/views.py

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,3 +102,95 @@ class VolunteersView(InternalPageView):
102102
class MerchandiseView(InternalPageView):
103103
build_path = "merchandise/index.html"
104104
page_template = "internal/pages/merchandise.html"
105+
106+
ITEMS = [
107+
{
108+
"image": "img/merchandise/tshirt-kalinga-maroon.png",
109+
"name": "Kalinga T-Shirt",
110+
"description": "Red · XS–2XL",
111+
"price": "₱500.00",
112+
},
113+
{
114+
"image": "img/merchandise/tshirt-pythonasia-2026-white-generic.png",
115+
"name": "PythonAsia 2026 T-Shirt",
116+
"description": "Conference Type · White · XS–2XL",
117+
"price": "₱500.00",
118+
},
119+
{
120+
"image": "img/merchandise/leather-tray.png",
121+
"name": "Leather Tray",
122+
"description": "",
123+
"price": "₱450.00",
124+
},
125+
{
126+
"image": "img/merchandise/notepad-large.png",
127+
"name": "Notepad",
128+
"description": "80 Sheets · 4×4",
129+
"price": "₱100.00",
130+
},
131+
{
132+
"image": "img/merchandise/notepad-design1-small.png",
133+
"name": "Notepad Design 1",
134+
"description": "40 Sheets · 3×3",
135+
"price": "₱80.00",
136+
},
137+
{
138+
"image": "img/merchandise/notepad-design2-small.png",
139+
"name": "Notepad Design 2",
140+
"description": "40 Sheets · 3×3",
141+
"price": "₱80.00",
142+
},
143+
{
144+
"image": "img/merchandise/pythonasia-2026-acrylic.png",
145+
"name": "Acrylic Keychain PythonAsia 2026",
146+
"description": "",
147+
"price": "₱100.00",
148+
},
149+
{
150+
"image": "img/merchandise/palayok-acrylic.png",
151+
"name": "Acrylic Keychain Palayok",
152+
"description": "",
153+
"price": "₱100.00",
154+
},
155+
{
156+
"image": "img/merchandise/fridge-magnet.jpg",
157+
"name": "Refrigerator Magnet",
158+
"description": "",
159+
"price": "₱150.00",
160+
},
161+
{
162+
"image": "img/merchandise/pythonph-fidget.jpg",
163+
"name": "3D PythonPH Clicker Fidget",
164+
"description": "",
165+
"price": "₱250.00",
166+
},
167+
{
168+
"image": "img/merchandise/palayok-clicker.png",
169+
"name": "3D Palayok Clicker Fidget",
170+
"description": "Large",
171+
"price": "₱350.00",
172+
},
173+
{
174+
"image": "img/merchandise/palayok-clicker.png",
175+
"name": "3D Palayok Clicker Fidget",
176+
"description": "Small",
177+
"price": "₱300.00",
178+
},
179+
{
180+
"image": "img/merchandise/pythonasia-2026-socks.png",
181+
"name": "PythonAsia Pattern Style Customized Socks",
182+
"description": "Beige",
183+
"price": "₱450.00",
184+
},
185+
{
186+
"image": "img/merchandise/socks-pattern-pythonph.png",
187+
"name": "PythonPH Logo Pattern Style Customized Socks",
188+
"description": "Black",
189+
"price": "₱320.00",
190+
},
191+
]
192+
193+
def get_context_data(self, **kwargs):
194+
context = super().get_context_data(**kwargs)
195+
context["merchandise_items"] = self.ITEMS
196+
return context

0 commit comments

Comments
 (0)