From 2e61721acebe25693aec2a2bd6d5e88c8808d6cd Mon Sep 17 00:00:00 2001 From: 23clarej <23clarej@students.harker.org> Date: Tue, 6 Feb 2024 17:04:55 -0800 Subject: [PATCH 1/3] stylized KhanCard like FinishCode, FinishCode body minwidth --- src/styles/global.scss | 7 +++++-- yarn.lock | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/styles/global.scss b/src/styles/global.scss index a955eed..4ca2b82 100644 --- a/src/styles/global.scss +++ b/src/styles/global.scss @@ -96,8 +96,10 @@ body { .khan-card-container { background-color: white; - border: 2px solid black; - margin: 20px; // subject to change + border-radius: 1em; + box-shadow: 1em 1em 1em 1em rgba(192, 192, 192, 0.5); + flex-direction: column; + margin: 2em 3em 4em; padding: 35px; } @@ -242,6 +244,7 @@ body { font-size: 14px; line-height: 1.42857143; margin-left: 2em; + min-width: 45%; padding: 6px 12px; transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; } diff --git a/yarn.lock b/yarn.lock index ea74ea9..a50df19 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8808,9 +8808,9 @@ webpack-nano@^1.1.1: rechoir "^0.7.0" yargs-parser "^20.2.1" -webpack-pwa-manifest@^4.3.0: +webpack-pwa-manifest@^4.0.0: version "4.3.0" - resolved "https://registry.npmjs.org/webpack-pwa-manifest/-/webpack-pwa-manifest-4.3.0.tgz" + resolved "https://registry.yarnpkg.com/webpack-pwa-manifest/-/webpack-pwa-manifest-4.3.0.tgz#a9382f3e280ba4f74b6e855c529bcb550461ab5e" integrity sha512-3hK8Qg58SyLCUIz4PBYnfUPM6iJ5K88h8Uhc3MxmlJcVtDF/11aBBdUTdQkqc9bo6Cb8Q1v2xdsB2XO6pzTbiA== dependencies: css-color-names "1.0.1" From 9cd7cd516da5bb905a3575b1f31322ef3ca91a5a Mon Sep 17 00:00:00 2001 From: 23clarej <23clarej@students.harker.org> Date: Tue, 13 Feb 2024 18:40:39 -0800 Subject: [PATCH 2/3] remove extraneous button --- src/pages/Problem2.scss | 40 ---------------------------------------- 1 file changed, 40 deletions(-) diff --git a/src/pages/Problem2.scss b/src/pages/Problem2.scss index 4fa13dd..7703304 100644 --- a/src/pages/Problem2.scss +++ b/src/pages/Problem2.scss @@ -85,43 +85,3 @@ .output-divider-2 { animation: popIn 0.5s ease-out; } - -.buttons { - background-color: grey; - border: 1px solid transparent; - border-radius: 0.25rem; - color: #fff; - cursor: pointer; - display: inline-block; - font-size: 1rem; - font-weight: 400; - line-height: 1.5; - margin: 5px; - margin-right: 10px; - padding: 0.375rem 0.75rem; - text-align: center; - transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, - border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; - vertical-align: middle; -} - -.buttons:hover { - background-color: #0069d9; - border-color: #0062cc; - color: #fff; -} - -.buttons:active { - background-color: grey; - border-color: #0056b3; - color: #fff; -} - -.buttons:focus { - box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.5); - outline: 0; -} - -.buttons:last-child { - margin-right: 0; /* remove right margin from the last button */ -} From 225dd76b54bcc0049ecabcd5a8ceb010262331ee Mon Sep 17 00:00:00 2001 From: 23clarej <23clarej@students.harker.org> Date: Tue, 20 Feb 2024 18:35:44 -0800 Subject: [PATCH 3/3] strip white space from KhanInput --- src/components/shared/KhanInput.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/shared/KhanInput.tsx b/src/components/shared/KhanInput.tsx index 2442e2d..01caf44 100644 --- a/src/components/shared/KhanInput.tsx +++ b/src/components/shared/KhanInput.tsx @@ -12,7 +12,8 @@ interface KhanInputProps { function KhanInput(props: KhanInputProps): JSX.Element { const [value, setValue] = useLocalStorage(props.name + '-input', ''); const handleChange = (e: React.ChangeEvent) => { - const lowerCaseAnswer = e.target.value.toLowerCase(); + const strippedAnswer = e.target.value.replace(/\s/g, ''); + const lowerCaseAnswer = strippedAnswer.toLowerCase(); const newArray = props.correct_answer.map((val, i) => { if (i == props.index) {