Skip to content

Commit d055375

Browse files
committed
Update Cores Selection with options to disable the slider and show a message instead.
1 parent 60013bf commit d055375

File tree

4 files changed

+30
-13
lines changed

4 files changed

+30
-13
lines changed

content/plans-purchase/_index.md

+10-4
Original file line numberDiff line numberDiff line change
@@ -74,18 +74,24 @@ product:
7474
- name: "4"
7575
priceModifier: 60.00
7676

77+
disabled: false
78+
disabledText: "AMD CPUs aren't currently available, but they will be back in stock soon!"
79+
7780
- name: "ARM CPU Cores"
7881
type: "dropdown"
7982
value: "0"
8083
options:
8184
- name: "0"
8285
priceModifier: 0.00
8386

84-
- name: "1"
85-
priceModifier: 5.00
87+
#- name: "1"
88+
# priceModifier: 5.00
8689

87-
- name: "2"
88-
priceModifier: 10.00
90+
#- name: "2"
91+
# priceModifier: 10.00
92+
93+
disabled: true
94+
disabledText: "ARM CPUs aren't currently available, but they will be back in stock soon!"
8995

9096
- name: "Extra: Minecraft Servers"
9197
type: "dropdown"

themes/mc-server-theme-amp/assets/scss/_utilities.scss

+1
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@
151151
.color-aqua { color: #00EAFF; }
152152
.color-whisper { color: #EDEDED; }
153153
.color-pastel-green { color: #66D677; }
154+
.color-amaranth { color: #dc3545; }
154155

155156
.background-color-swamp { background-color: #2A2B2B; }
156157
.background-color-dodger-blue { background-color: #0068FF; }

themes/mc-server-theme-amp/layouts/partials/section/plans-custom-purchase.html

+18-8
Original file line numberDiff line numberDiff line change
@@ -100,18 +100,23 @@ <h3 class="font-size-20 font-weight-bold text-align-center padding-y-64">Select
100100
<div class="slider-container padding-32">
101101
<div class="display-flex align-items-center justify-content-center padding-bottom-16">
102102
<p class="font-size-20 font-weight-bold text-align-center">AMD CPU</p>
103-
<!-- <input type="checkbox" name="" id=""> -->
104103
</div>
105104
{{ range where $data.Params.product.customFields ".name" "AMD CPU Cores" }}
106105
{{ $index := 0 }}
107106
{{ $value := .value }}
108107
{{ range $i, $e := .options }} {{ if (eq $e.name $value) }}{{ $index = $i }}{{ end }} {{ end }}
108+
{{ if .disabled }}
109+
<div class="text-align-center color-amaranth">
110+
{{ .disabledText }}
111+
</div>
112+
{{ else }}
109113
<input id="amdRange" type="range" min="0" max="{{ sub (len .options) 1 }}" value="{{ $index }}" step='1' class="slider styled-slider slider-progress" list='amd-tickmarks'>
110114
<div class="tickmarks" id="amd-tickmarks">
111115
{{ range .options }}
112116
<p>{{ .name }}</p>
113117
{{ end }}
114118
</div>
119+
{{ end }}
115120
{{ end }}
116121
</div>
117122
</div>
@@ -121,18 +126,23 @@ <h3 class="font-size-20 font-weight-bold text-align-center padding-y-64">Select
121126
<div class="slider-container padding-32">
122127
<div class="display-flex align-items-center justify-content-center padding-bottom-16">
123128
<p class="font-size-20 font-weight-bold text-align-center">ARM CPU</p>
124-
<!-- <input type="checkbox" name="" id=""> -->
125129
</div>
126130
{{ range where $data.Params.product.customFields ".name" "ARM CPU Cores" }}
127131
{{ $index := 0 }}
128132
{{ $value := .value }}
129133
{{ range $i, $e := .options }} {{ if (eq $e.name $value) }}{{ $index = $i }}{{ end }} {{ end }}
130-
<input id="armRange" type="range" min="0" max="{{ sub (len .options) 1 }}" value="{{ $index }}" step='1' class="slider styled-slider slider-progress" list='arm-tickmarks'>
131-
<div class="tickmarks" id="arm-tickmarks">
132-
{{ range .options }}
133-
<p>{{ .name }}</p>
134-
{{ end }}
135-
</div>
134+
{{ if .disabled }}
135+
<div class="text-align-center color-amaranth">
136+
{{ .disabledText }}
137+
</div>
138+
{{ else }}
139+
<input id="armRange" type="range" min="0" max="{{ sub (len .options) 1 }}" value="{{ $index }}" step='1' class="slider styled-slider slider-progress" list='arm-tickmarks'>
140+
<div class="tickmarks" id="arm-tickmarks">
141+
{{ range .options }}
142+
<p>{{ .name }}</p>
143+
{{ end }}
144+
</div>
145+
{{ end }}
136146
{{ end }}
137147
</div>
138148
</div>

themes/mc-server-theme-amp/layouts/partials/stylesheet.html

+1-1
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)