Skip to content

Commit 8a23a12

Browse files
committed
Merge branch 'main' of github.com:NOC-OI/breakingtheice
2 parents a59290c + b703f78 commit 8a23a12

3 files changed

Lines changed: 44 additions & 31 deletions

File tree

README.md

Lines changed: 28 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Breaking the Ice is an interactive science exhibit designed for pupils, teachers
77

88
The stand is designed for touch interaction (tablets, iPads, or touchscreen laptops), supported by a pull-up banner and live facilitators.
99

10-
**Live demo:** [https://breakingtheice.space](https://breakingtheice.space)
10+
**Live demo:** [https://noc-oi.github.io/breakingtheice](https://noc-oi.github.io/breakingtheice)
1111

1212
### Learning Goals
1313

@@ -141,27 +141,41 @@ Each question object should include:
141141
2. title: displayed heading
142142
3. scenario: explanatory paragraph
143143
4. question: the actual prompt
144-
5. options: array of 3 option objects
145-
6. correctIndex: zero-based index of the correct option
146-
7. bg: stage background color (hex)
147-
8. media: optional array of one or two image paths
144+
5. imageSource: Image source
145+
6. options: array of 3 option objects (See Option Object Description below)
146+
7. correctIndex: zero-based index of the correct option
147+
8. bg: stage background color (hex)
148+
9. media: optional array of one or two image paths (See Media Object Description below)
149+
148150

149151
Each option object currently supports:
150152

151-
1. text: option label shown on the card
152-
2. explanation: feedback text for learning context
153-
3. image: optional image path
153+
1. image: optional image path
154+
2. text: option label shown on the card
155+
3. explanation: feedback text for learning context
156+
4. width: width of the image
157+
5. height: height of the image
158+
159+
Each media object currently supports:
160+
1. image: optional image path
161+
2. position: position of the image (front or back)
162+
3. transform: rotation of the image
163+
4. width: width of the image
164+
5. height: height of the image
154165

155-
### Adding or changing question images
166+
### Adding or changing question option images
156167

157-
1. Add new image files into public/
168+
1. Add new image files or modify existing ones in the public folder
158169
2. Reference them in app/data/questions.json using paths like /my_image.png
159-
3. For media pairs, place them in the media array in the order you want them layered
170+
3. Update the width and height of the option image in the options array accordingly
160171

161-
The question stage layout alternates media composition by question number:
172+
### Adding or changing question media images
173+
174+
1. Add new image files or modify existing ones in the public folder
175+
2. Reference them in app/data/questions.json using paths like /my_image.png
176+
3. For media pairs, place them in the media array in the order you want them layered
177+
4. Update the width and height of the image in the media array accordingly
162178

163-
1. Odd-numbered questions use the default image stack layout
164-
2. Even-numbered questions use the alternate position layout
165179

166180
### Quick validation after updating questions
167181

app/components/QuestionsStage.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,8 @@ export function QuestionsStage({
110110
alt={option.text}
111111
width={option.width}
112112
height={option.height}
113-
className={`object-contain transition ${
114-
isWrongSelected ? 'grayscale opacity-60' : ''
115-
}`}
113+
className={`object-contain transition ${isWrongSelected ? 'grayscale opacity-60' : ''
114+
}`}
116115
/>
117116
</div>
118117
) : null}
@@ -170,7 +169,7 @@ export function QuestionsStage({
170169
aria-hidden
171170
>
172171
<div
173-
className={`absolute ${firstMedia?.position === 'top' ? 'z-10' : 'z-0'} overflow-hidden rounded-[15px] shadow-[0_4px_4px_rgba(0,0,0,0.25)] right-8 xl:right-15 top-0`}
172+
className={`absolute ${firstMedia?.position === 'front' ? 'z-10' : 'z-0'} overflow-hidden rounded-[15px] shadow-[0_4px_4px_rgba(0,0,0,0.25)] right-8 xl:right-15 top-0`}
174173
style={{
175174
width: firstMedia?.width ? `${firstMedia.width * 4}px` : '280px',
176175
height: firstMedia?.height ? `${firstMedia.height * 4}px` : '360px',
@@ -191,7 +190,7 @@ export function QuestionsStage({
191190
</div>
192191

193192
<div
194-
className={`absolute ${secondMedia?.position === 'top' ? 'z-10' : 'z-0'} overflow-hidden rounded-[15px] shadow-[0_4px_4px_rgba(0,0,0,0.25)] left-35 xl:lef-40 top-60 xl:top-70`}
193+
className={`absolute ${secondMedia?.position === 'front' ? 'z-10' : 'z-0'} overflow-hidden rounded-[15px] shadow-[0_4px_4px_rgba(0,0,0,0.25)] left-35 xl:lef-40 top-60 xl:top-70`}
195194
style={{
196195
width: secondMedia?.width ? `${secondMedia.width * 4}px` : '320px',
197196
height: secondMedia?.height ? `${secondMedia.height * 4}px` : '300px',

app/data/questions.json

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,14 @@
3333
"media": [
3434
{
3535
"image": "/q1_media_1.jpg",
36-
"position": "top",
36+
"position": "front",
3737
"transform": "0deg",
3838
"width": 68,
3939
"height": 85
4040
},
4141
{
4242
"image": "/q1_media_2.jpg",
43-
"position": "bottom",
43+
"position": "back",
4444
"transform": "8.55deg",
4545
"width": 80,
4646
"height": 80
@@ -51,7 +51,7 @@
5151
"id": "q2",
5252
"title": "Critical Data Question 2",
5353
"scenario": "The Arctic and Antarctic are both cold polar regions, but they are not the same kind of place.",
54-
"question": "What makes the the Arctic different?",
54+
"question": "What makes the Arctic different?",
5555
"imageSource": "Image source - Sergey Torbik & The Shuttervision (Pexels)",
5656
"options": [
5757
{
@@ -81,14 +81,14 @@
8181
"media": [
8282
{
8383
"image": "/q2_media_1.jpg",
84-
"position": "bottom",
84+
"position": "back",
8585
"transform": "0deg",
8686
"width": 80,
8787
"height": 80
8888
},
8989
{
9090
"image": "/q2_media_2.jpg",
91-
"position": "top",
91+
"position": "front",
9292
"transform": "8.55deg",
9393
"width": 80,
9494
"height": 80
@@ -129,14 +129,14 @@
129129
"media": [
130130
{
131131
"image": "/q3_media_1.jpg",
132-
"position": "top",
132+
"position": "front",
133133
"transform": "351.45deg",
134134
"width": 75,
135135
"height": 85
136136
},
137137
{
138138
"image": "/q3_media_2.jpg",
139-
"position": "bottom",
139+
"position": "back",
140140
"transform": "0deg",
141141
"width": 90,
142142
"height": 90
@@ -177,14 +177,14 @@
177177
"media": [
178178
{
179179
"image": "/q4_media_1.jpg",
180-
"position": "top",
180+
"position": "front",
181181
"transform": "351.45deg",
182182
"width": 84,
183183
"height": 84
184184
},
185185
{
186186
"image": "/q4_media_2.jpg",
187-
"position": "bottom",
187+
"position": "back",
188188
"transform": "0deg",
189189
"width": 75,
190190
"height": 80
@@ -225,18 +225,18 @@
225225
"media": [
226226
{
227227
"image": "/q5_media_1.jpg",
228-
"position": "top",
228+
"position": "front",
229229
"transform": "0deg",
230230
"width": 70,
231231
"height": 100
232232
},
233233
{
234234
"image": "/q5_media_2.jpg",
235-
"position": "bottom",
235+
"position": "back",
236236
"transform": "8.55deg",
237237
"width": 78,
238238
"height": 82
239239
}
240240
]
241241
}
242-
]
242+
]

0 commit comments

Comments
 (0)