File tree Expand file tree Collapse file tree 5 files changed +44
-16
lines changed
Expand file tree Collapse file tree 5 files changed +44
-16
lines changed Original file line number Diff line number Diff line change 22layout : merch
33title : TeX Plushies
44slug : plushies
5- purchase-url : https://www.guildofstudents.com/shop/product/10317460/
6- options :
7- - name : Plushie
8- quantity : 1
9- price : 13.99
10- note : Limited to members only
5+ purchase-options :
6+ - url : https://www.guildofstudents.com/shop/product/10317460/
7+ type : guild
8+ text : Buy on Guild website
9+ icon : fa-arrow-up-right-from-square
10+ options :
11+ - name : Plushie
12+ quantity : 1
13+ price : 13.99
14+ note : Limited to members only
15+ - url : /assets/tex-pattern.pdf
16+ type : download
17+ text : Download
18+ icon : fa-download
19+ options :
20+ - name : Pattern
21+ price : 0
22+ note : For if you want to make one yourself!
1123gallery :
1224 - url : /assets/images/tex-plushie/20250426_0008_lowres.jpg
1325 alt : TeX reading a book
Original file line number Diff line number Diff line change @@ -32,7 +32,8 @@ <h2>Gallery</h2>
3232 {% endif %}
3333 < div class ="purchase fadein ">
3434 < h2 > Purchase options</ h2 >
35- {% for option in page.options %}
35+ {% for group in page.purchase-options %}
36+ {% for option in group.options %}
3637 < div class ="purchase-option ">
3738 {% if option.quantity %}
3839 < div class ="option-label with-quantity ">
@@ -45,14 +46,19 @@ <h2>Purchase options</h2>
4546 < span class ="note "> {{ option.note }}</ span >
4647 {% endif %}
4748 </ div >
48- < span class ="price "> £{{ option.price }}</ span >
49+ {% if option.price > 0 %}
50+ < span class ="price "> £{{ option.price }}</ span >
51+ {% else %}
52+ < span class ="price "> Free</ span >
53+ {% endif %}
4954 </ div >
55+ {% endfor %}
56+ {% if group.url %}
57+ < a href ="{{ group.url }} " target ="_blank " class ="button {{ group.type }}-button "> < i class ="fas {{ group.icon }} "> </ i > {{ group.text }}</ a >
58+ {% else %}
59+ < a href ="# " class ="button unavailable-button "> < i class ="fas fa-ban "> </ i > Currently unavailable</ a >
60+ {% endif %}
5061 {% endfor %}
51- {% if page.purchase-url %}
52- < a href ="{{ page.purchase-url }} " target ="_blank " class ="button guild-button "> Buy on Guild website < i class ="fas fa-arrow-right "> </ i > </ a >
53- {% else %}
54- < a href ="# " class ="button unavailable-button "> < i class ="fas fa-ban "> </ i > Currently unavailable</ a >
55- {% endif %}
5662 </ div >
5763 </ div >
5864 </ main >
Original file line number Diff line number Diff line change 144144 background-color : #5bbaa2 ;
145145}
146146
147+ .download-button {
148+ background-color : lightgray ;
149+ color : black ;
150+
151+ i {
152+ color : black ;
153+ }
154+ }
155+
147156.unavailable-button {
148157 background-color : gray ;
149158 cursor : not-allowed ;
180189
181190 .purchase {
182191 width : 100% ;
183- top : -60 px ;
192+ position : static ;
184193 }
185194
186195 .merch-description {
Original file line number Diff line number Diff line change @@ -25,10 +25,11 @@ <h2 class="merch-title">{{ merch.title }}</h2>
2525 < div class ="merch-excerpt ">
2626 < p > {{ merch.excerpt | strip_html }}</ p >
2727 </ div >
28- {% if merch.options %}
28+ <!-- todo: figure out something better to put here -->
29+ <!-- {% if merch.options %}
2930 {% assign options = merch.options | sort: 'price' %}
3031 <p class="merch-price">from £{{ options[0]['price'] }}</h2>
31- {% endif %}
32+ {% endif %} -->
3233 </ div >
3334 </ a >
3435 {% endfor %}
You can’t perform that action at this time.
0 commit comments