diff --git a/src/App.tsx b/src/App.tsx index a21d6bb..b347800 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,5 +1,6 @@ import { Home } from "./components/home/Home"; -import { Categories } from './components/categories/Categories' +import { Categories } from './components/categories/Categories'; +import { Revise } from './components/revise/Revise'; import { Tabs } from "./components/tabs/Tabs"; import { BrowserRouter, Route, Redirect, Switch } from "react-router-dom"; @@ -9,6 +10,7 @@ function App() { + diff --git a/src/assets/icons/check.svg b/src/assets/icons/check.svg index 9da2320..e991d09 100644 --- a/src/assets/icons/check.svg +++ b/src/assets/icons/check.svg @@ -1,5 +1,5 @@ - + diff --git a/src/assets/icons/timer.svg b/src/assets/icons/timer.svg index 283b027..977b6af 100644 --- a/src/assets/icons/timer.svg +++ b/src/assets/icons/timer.svg @@ -1,7 +1,7 @@ - - - + + + diff --git a/src/components/revise/Revise.module.scss b/src/components/revise/Revise.module.scss new file mode 100644 index 0000000..0460a37 --- /dev/null +++ b/src/components/revise/Revise.module.scss @@ -0,0 +1,21 @@ +.revisePage { + width: 100vw; + height: 100vh; + background-color: white; + position: relative; + z-index: 2; +} + +.finishButton { + width: 10rem; + font-size: 1.2rem; + font-weight: 700; + color: white; + background-color: var(--teal); + margin: 0 auto; + display: block; + border: none; + border-radius: 3rem; + height: 3rem; + cursor: pointer; +} \ No newline at end of file diff --git a/src/components/revise/Revise.tsx b/src/components/revise/Revise.tsx new file mode 100644 index 0000000..a377426 --- /dev/null +++ b/src/components/revise/Revise.tsx @@ -0,0 +1,31 @@ +import React, { useState } from "react"; +import { NavLink } from "react-router-dom"; +import styles from './Revise.module.scss'; + +import { Question } from "./question/Question"; +import { Summary } from "./summary/Summary"; + +export const Revise: React.FC = () => { + const [progressState, setProgressState] = useState<'INTRO' | 'QUESTION' | 'END'>('QUESTION'); + + return
+ { progressState === 'QUESTION' &&
+ + + +
} + + + { progressState === 'END' &&
+ + + + + +
} +
+} \ No newline at end of file diff --git a/src/components/revise/options/Options.module.scss b/src/components/revise/options/Options.module.scss new file mode 100644 index 0000000..8f6ebc0 --- /dev/null +++ b/src/components/revise/options/Options.module.scss @@ -0,0 +1,52 @@ +.optionsHolder { + list-style: none; + + li { + display: flex; + width: 100%; + border: 0.1rem solid var(--lighter-grey); + padding: 0 0.9rem 0 1.5rem; + border-radius: 3rem; + height: 3.5rem; + align-items: center; + justify-content: space-between; + margin-bottom: 1rem; + cursor: pointer; + + &.active { + border-color: var(--teal); + + p { + color: var(--teal); + } + + .checkmark { + border-color: var(--teal); + background-color: var(--teal); + + svg { + fill: white; + } + } + } + + p { + font-size: 1.2rem; + font-weight: 500; + color: var(--black); + } + + .checkmark { + width: 1.8rem; + height: 1.8rem; + border: 1px solid var(--lighter-grey); + border-radius: 50%; + + svg { + width: 100%; + height: 100%; + transform: scale(0.7); + } + } + } +} \ No newline at end of file diff --git a/src/components/revise/options/Options.tsx b/src/components/revise/options/Options.tsx new file mode 100644 index 0000000..893a4fc --- /dev/null +++ b/src/components/revise/options/Options.tsx @@ -0,0 +1,43 @@ +import React from "react"; +import styles from './Options.module.scss'; +import { ReactComponent as CheckCircleIcon } from '../../../assets/icons/check.svg'; + +export const Options: React.FC = () => { + return ; +} \ No newline at end of file diff --git a/src/components/revise/question/Question.module.scss b/src/components/revise/question/Question.module.scss new file mode 100644 index 0000000..dd409ad --- /dev/null +++ b/src/components/revise/question/Question.module.scss @@ -0,0 +1,79 @@ +$common-width: calc(100% - 4rem); + +.questionHolder { + height: calc(100vh - 8rem); + padding-top: 2rem; + overflow: auto; +} + +.progressBarHolder { + position: sticky; + position: -webkit-sticky; + top: 0; + z-index: 1; + width: calc(100% - 5rem); + border: 2px solid var(--lighter-grey); + margin: 0 auto 2rem; + border-radius: 3rem; + height: 3rem; + padding: 0.2rem; + display: flex; + align-items: center; + justify-content: flex-start; + + .progressBar { + width: 100%; + height: 100%; + background: linear-gradient(90deg, var(--red), var(--blue)); + border-radius: inherit; + } + + .text { + position: absolute; + left: 0; + top: 0; + width: 100%; + color: white; + height: 100%; + display: flex; + align-items: center; + justify-content: center; + font-size: 1.4rem; + } + + svg { + position: absolute; + right: 0.4rem; + top: 0.4rem; + width: 1.8rem; + height: 1.8rem; + fill: var(--light-grey); + } +} + +.questionCount { + color: var(--light-grey); + font-size: 1.6rem; + width: #{$common-width}; + margin: 0 auto; + padding-bottom: 1.5rem; + margin-bottom: 2rem; + border-bottom: 0.2rem dashed var(--lighter-grey); + + span { + font-weight: 300; + font-size: 1.4rem; + } +} + +.question { + width: #{$common-width}; + margin: 0 auto 2rem; + font-size: 1.6rem; + color: var(--black); +} + +.answerTypes { + width: #{$common-width}; + margin: 0 auto 2rem; +} \ No newline at end of file diff --git a/src/components/revise/question/Question.tsx b/src/components/revise/question/Question.tsx new file mode 100644 index 0000000..a4a8ec4 --- /dev/null +++ b/src/components/revise/question/Question.tsx @@ -0,0 +1,22 @@ +import React from "react"; +import styles from './Question.module.scss'; +import { ReactComponent as TimeIcon } from '../../../assets/icons/timer.svg'; +import { Options } from "../options/Options"; + +export const Question: React.FC = () => { + return
+
+ + 30 + +
+ +

Question 10/10

+ +

Who won Copa America 2021 and who was the Captian?

+ +
+ +
+
+} \ No newline at end of file diff --git a/src/components/revise/summary/Summary.module.scss b/src/components/revise/summary/Summary.module.scss new file mode 100644 index 0000000..456b343 --- /dev/null +++ b/src/components/revise/summary/Summary.module.scss @@ -0,0 +1,34 @@ +.upfold { + width: 100vw; + height: 30rem; + margin-bottom: 17rem; + position: relative; + background-color: transparent; + + &::before { + content: ''; + position: absolute; + left: calc(50% - 15rem); + top: 0; + width: 30rem; + height: 30rem; + background-color: var(--dark-blue); + border-radius: 10rem; + transform: scale(1.8)translateY(-6rem); + } + + h4 { + color: white; + font-size: 1.6rem; + text-align: center; + } + + .medalHolder { + width: 30rem; + height: 30rem; + background-color: var(--dark-blue); + border-radius: 50%; + margin: 0 auto; + margin-top: 12rem; + } +} \ No newline at end of file diff --git a/src/components/revise/summary/Summary.tsx b/src/components/revise/summary/Summary.tsx new file mode 100644 index 0000000..59578fe --- /dev/null +++ b/src/components/revise/summary/Summary.tsx @@ -0,0 +1,14 @@ +import React from "react"; +import styles from './Summary.module.scss'; + +export const Summary: React.FC = () => { + return
+
+

Revision Completed

+ +
+ +
+
+
+} \ No newline at end of file diff --git a/src/components/tabs/Tabs.module.scss b/src/components/tabs/Tabs.module.scss index b49c789..7fa6c16 100644 --- a/src/components/tabs/Tabs.module.scss +++ b/src/components/tabs/Tabs.module.scss @@ -12,6 +12,7 @@ $tab-width: 95vw; height: 5rem; align-items: center; justify-content: center; + z-index: 1; button, a { width: calc(#{$tab-width} / 5); diff --git a/src/components/tabs/Tabs.tsx b/src/components/tabs/Tabs.tsx index ca264c2..7492770 100644 --- a/src/components/tabs/Tabs.tsx +++ b/src/components/tabs/Tabs.tsx @@ -9,18 +9,18 @@ import { ReactComponent as MoreIcon } from '../../assets/icons/more-vertical.svg import { NavLink } from "react-router-dom"; export const Tabs: React.FC = () => { - return
+ return
-
+ -
+ diff --git a/src/index.css b/src/index.css index f04b91c..c7c3303 100644 --- a/src/index.css +++ b/src/index.css @@ -13,11 +13,13 @@ --orange: #f1be83; --red: #d47077; --blue: #668fe1; + --dark-blue: #11253d; --teal: #4e9096; --black: #11253d; --brownish-black: #472020; --grey: #586471; --light-grey: #84919e; + --lighter-grey: #d5e0ec; --creamy-white: #fef8ec; font-size: 62.5%; }