commit 6f5042ccfc6f4d88749b6734715314e280164ff1
parent b4bb46a367d64c50d9b5e15d6cf9970cba845613
Author: hrryt <harry@mayesfield.uk>
Date: Thu, 30 Jul 2026 16:19:39 +0100
Improve scale and spacing
Diffstat:
4 files changed, 29 insertions(+), 10 deletions(-)
diff --git a/src/components/QuestionList.jsx b/src/components/QuestionList.jsx
@@ -1,5 +1,5 @@
import * as React from 'react';
export default function QuestionList({ children }) {
- return <ol>{children}</ol>;
+ return <ol className="question-list">{children}</ol>;
}
diff --git a/src/components/QuestionWindow.jsx b/src/components/QuestionWindow.jsx
@@ -18,7 +18,7 @@ function chooseQuestionComponent(type) {
function renderQuestion(seed, showAnswer) {
return (question, i) => {
const QuestionComponent = chooseQuestionComponent(question.type);
- return <QuestionComponent key={i} seed={seed+i} showAnswer={showAnswer} parameters={question.parameters || {}} />;
+ return <QuestionComponent key={i} seed={seed+i} showAnswer={showAnswer} parameters={question.lockedParameters || {}} />;
};
}
@@ -69,7 +69,7 @@ export default function QuestionWindow({ data }) {
</fieldset>
</form>
<br />
- <div className="field-border kern">
+ <div className="field-border question-field kern">
{questions}
</div>
</Window>
diff --git a/src/data/test-question-window.js b/src/data/test-question-window.js
@@ -11,9 +11,19 @@ export const questionWindow = {
questions: [{
type: 'quadratic-equation',
controlledParameters: { a: 'a' },
- lockedParameters: { factorise: false },
- }, {
+ }]
+ }, {
+ id: 1,
+ n: 5,
+ questions: [{
type: 'adding-fractions',
}]
+ }, {
+ id: 2,
+ n: 5,
+ questions: [{
+ type: 'quadratic-equation',
+ lockedParameters: { a: 1, factorise: false },
+ }]
}]
}
diff --git a/src/styles/main.css b/src/styles/main.css
@@ -1,10 +1,19 @@
body {
- transform: scale(2);
- transform-origin: 0 0;
- width: 50vw;
- margin: 0;
+ background-color: #008080;
}
.window {
- max-width: 400px;
+ width: min-content;
+}
+
+.question-list {
+ margin-right: 15px;
+}
+
+.field-border {
+ font-size: 1.25rem;
+}
+
+.question-field {
+ display: flex;
}