From 50fcae814340fd55c45cf9229eec3241e4feff63 Mon Sep 17 00:00:00 2001 From: Min Su Date: Wed, 5 Aug 2020 15:37:48 +0900 Subject: [PATCH] =?UTF-8?q?=ED=98=95=ED=83=9C=EB=A7=8C=20=EC=9E=A1?= =?UTF-8?q?=EC=9D=8C=20=EC=88=98=EC=A0=95=ED=95=98=EC=9E=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.js | 2 +- src/End.css | 30 ++++++++++++++++----- src/End.js | 73 ++++++++++++++++++++++++++++++++++++++-------------- src/Home.js | 3 ++- src/index.js | 1 + 5 files changed, 82 insertions(+), 27 deletions(-) diff --git a/src/App.js b/src/App.js index dfc338b..1cdd224 100644 --- a/src/App.js +++ b/src/App.js @@ -11,7 +11,7 @@ function App() {
- +

diff --git a/src/End.css b/src/End.css index 15fbaf9..58c0e08 100644 --- a/src/End.css +++ b/src/End.css @@ -1,11 +1,29 @@ -.card { - font-size:'30px'; - text-align:"center"; - } +/* .The-End { + display: flex; +} -.Box-text-center { +.card { display:flex; justify-content: center; - margin-top:'100px'; + width: auto; + margin-top: 5%; + /* text-align:"center"; + } + +.card-body { + width: 18em; + text-align: center; + border: solid 1px; +} + +.card-body2 { + width: 18em; + text-align: center; + } +.card-title2 { + width: 18em; + text-align: center; + border: solid 1px; +} */ diff --git a/src/End.js b/src/End.js index 27f709b..7660d1f 100644 --- a/src/End.js +++ b/src/End.js @@ -1,7 +1,7 @@ import React from 'react' -import tr from './End-Image01.jpg'; +// import tr from './End-Image01.jpg'; import './End.css' - +import 'bootstrap' // import { Link } from 'react-router-dom'; @@ -9,42 +9,77 @@ function End() { let a = [] for (let i = 0; i < 3; i++) { - if (localStorage.getItem('답'+(i+1)) === localStorage.getItem('정답'+(i+1))) { + if (localStorage.getItem('답' + (i + 1)) === localStorage.getItem('정답' + (i + 1))) { + + a[i] = 1 - a[i] =1 - - localStorage.setItem('채점'+(i+1),'O') + localStorage.setItem('채점' + (i + 1), 'O') } else { - a[i] =0 - - localStorage.setItem('채점'+(i+1),'X') + a[i] = 0 + + localStorage.setItem('채점' + (i + 1), 'X') } } return ( <> -
-
- -채점표- + +
+

채점표

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
이름 여기
문제1 여기문제1 답 여기
문제2 여기문제2 답 여기
문제3 여기문제3 답 여기
총점총점 및 결과??
+
+ + {/*
-

이름 : {localStorage.getItem('name')}

- +

-채점표-

+

이름 : {localStorage.getItem('name')}

Quiz 1 : {localStorage.getItem('채점1')}

Quiz 2 : {localStorage.getItem('채점2')}

Quiz 3 : {localStorage.getItem('채점3')}

Total Score : {a[0] + a[1] + a[2]}

-
- 수고 +
+
+

결과

+

합격인지 아닌지 써주자

+
+
*/} + + {/*
+ 수고 -
-
-
+
*/} ) diff --git a/src/Home.js b/src/Home.js index fb49141..8c2f2f4 100644 --- a/src/Home.js +++ b/src/Home.js @@ -2,6 +2,7 @@ import React, { useState } from 'react' import { Redirect } from 'react-router-dom'; import './Home.css' + function Home() { const [name, setName] = useState('') const [done, setDone] = useState(false) @@ -30,7 +31,7 @@ function Home() {
이름을 입력하세요 - +
diff --git a/src/index.js b/src/index.js index b2dae02..e0aca1d 100644 --- a/src/index.js +++ b/src/index.js @@ -4,6 +4,7 @@ import './index.css'; import App from './App'; // import Quiz from './Quiz'; import * as serviceWorker from './serviceWorker'; +import 'bootstrap/dist/css/bootstrap.css'; ReactDOM.render( -- GitLab