Skip to content

Commit aa92750

Browse files
committed
Add unavailable status, update nav, and fix hamburger menu
1 parent be827bc commit aa92750

6 files changed

Lines changed: 29 additions & 14 deletions

File tree

_collections/_merch/plushies.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
layout: merch
33
title: TeX Plushies
44
slug: plushies
5-
purchase-url: https://www.guildofstudents.com/
5+
# purchase-url: https://www.guildofstudents.com/
66
options:
77
- name: Plushie
88
quantity: 1

_config.yml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,13 @@ social:
1212
- https://twitter.com/CSSBham
1313
- https://github.com/CSSUoB
1414
menu:
15+
- name: News
16+
link: /newsletter
17+
- name: Events
18+
link: /events
19+
children:
20+
- name: Calendar
21+
link: /calendar
1522
- name: Ball
1623
link: /ball
1724
children:
@@ -27,21 +34,15 @@ menu:
2734
link: /ball/2021
2835
- name: 2020
2936
link: /ball/2020
30-
- name: Events
31-
link: /events
32-
- name: Newsletter
33-
link: /newsletter
37+
- name: Merch
38+
link: /merch
3439
- name: Committee
3540
link: /committee
36-
- name: Calendar
37-
link: /calendar
3841
- name: Sponsor
3942
link: /sponsor
4043
- name: About
4144
link: /about
4245
children:
43-
- name: About Us
44-
link: /about
4546
- name: Membership
4647
link: /membership
4748
- name: Links

_includes/header.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
{% if item.children %}
3232
<a onclick="toggleShow({{ forloop.index }})">{{ item.name }}</a>
3333
<div class="dropdown" style="display: none" id="hbdd_{{ forloop.index }}">
34+
<a href="{{ item.link | relative_url }}">- {{ item.name }}</a><br/>
3435
{% for sub in item.children %}
3536
<a href="{{ sub.link | relative_url }}">- {{ sub.name }}</a><br/>
3637
{% endfor %}

_layouts/merch.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,9 @@ <h2>Purchase options</h2>
4949
</div>
5050
{% endfor %}
5151
{% if page.purchase-url %}
52-
<a href="{{ page.purchase-url }}" class="button guild-button">Buy on Guild website <i class="fas fa-arrow-right"></i></a>
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>
5355
{% endif %}
5456
</div>
5557
</div>

css/merch.scss

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,24 +120,35 @@
120120
}
121121
}
122122

123-
.guild-button {
123+
.button {
124124
display: inline-block;
125125
padding: 10px;
126126
font-weight: bold;
127127
border-radius: 10px;
128-
text-align: center;
129128
text-decoration: none;
130129
font-family: "Roboto", sans-serif;
131130
width: 100%;
132131
box-sizing: border-box;
133-
background-color: #5bbaa2;
134132
color: white;
133+
display: flex;
134+
gap: 0.5rem;
135+
justify-content: center;
136+
align-items: center;
135137

136138
i {
137139
color: white;
138140
}
139141
}
140142

143+
.guild-button {
144+
background-color: #5bbaa2;
145+
}
146+
147+
.unavailable-button {
148+
background-color: gray;
149+
cursor: not-allowed;
150+
}
151+
141152
.gallery img,
142153
.merch-description img {
143154
border-radius: 10px;

js/hamburger.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ document.addEventListener("DOMContentLoaded", () => {
1313
});
1414
});
1515

16-
export function toggleShow(id) {
16+
window.toggleShow = function (id) {
1717
let x = document.getElementById("hbdd_" + id);
1818
if (x.style.display === "none") {
1919
x.style.display = "block";

0 commit comments

Comments
 (0)