Skip to content

Commit e9cfcef

Browse files
Merge pull request #949 from carrythebanner/merch-sale-config
Make merch sale display conditional based on a param in site config
2 parents eeec8d7 + 13fde41 commit e9cfcef

File tree

5 files changed

+6
-5
lines changed

5 files changed

+6
-5
lines changed

site/config/_default/hugo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ disableKinds = ["taxonomy", "term"]
109109
[params.festival]
110110
name = "Bike Summer"
111111
active = true # set to true when festival is happening soon or now
112+
merchSaleActive = false # set to true when merch sales are open
112113
donationsURL = "https://www.paypal.com/donate/?cmd=_s-xclick&hosted_button_id=NQAUFEUSM49ZJ"
113114

114115
# Main page image carousel

site/themes/s2b_hugo_theme/layouts/calevents/single.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
<div>
55
<!-- when PP is coming soon or happening now, display smaller banner that links to PP cal page -->
6-
{{ if eq (.Param "festival.active") true }}
6+
{{ if .Site.Params.festival.active }}
77
{{ partial "cal/pp-promo-banner.html" . }}
88
{{ end }}
99

site/themes/s2b_hugo_theme/layouts/calgrid/single.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
</div>
77

88
<!-- only display when PP is coming soon or happening now -->
9-
{{ if eq (.Param "festival.active") true }}
9+
{{ if .Site.Params.festival.active }}
1010
{{ partial "cal/pp-promo-banner.html" . }}
1111
{{ end }}
1212

site/themes/s2b_hugo_theme/layouts/partials/cal/pp-header.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
{{ if eq (now.Year) (.Param "year") }}
1717
<p>{{ .Param "festival.name" }} is <strong>three whole months</strong> of fun on two wheels.
1818

19-
{{ if eq (.Param "festival.active") true }}<a href="/addevent/"><strong>Add your events for June, July, and August {{ .Param "year" }} now!</strong></a> Seeking inspiration? {{ end }}
19+
{{ if .Site.Params.festival.active }}<a href="/addevent/"><strong>Add your events for June, July, and August {{ .Param "year" }} now!</strong></a> Seeking inspiration? {{ end }}
2020

2121
View the <a href="/archive/pedal-palooza-archives/">archives</a> of past festivals. If you need help creating or editing an event, check out the <a href="/pages/calendar-faq/">calendar FAQ</a> or <a href="mailto:bikecal@shift2bikes.org">contact the calendar crew</a>.</p>
2222

@@ -33,7 +33,7 @@
3333
</p>
3434
</div>
3535

36-
{{ partial "cal/pp-merch.html" . }}
36+
{{ if .Site.Params.festival.merchSaleActive }}{{ partial "cal/pp-merch.html" . }}{{ end }}
3737

3838
{{ end }}
3939

site/themes/s2b_hugo_theme/layouts/partials/cal/pp-promo-banner.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@
77
</div>
88
</div>
99

10-
{{ partial "cal/pp-merch.html" . }}
10+
{{ if .Site.Params.festival.merchSaleActive }}{{ partial "cal/pp-merch.html" . }}{{ end }}
1111
</div>

0 commit comments

Comments
 (0)