diff --git a/src/components/AllQuestions/AllQuestions.css b/src/components/AllQuestions/AllQuestions.css deleted file mode 100644 index 39f7301..0000000 --- a/src/components/AllQuestions/AllQuestions.css +++ /dev/null @@ -1,30 +0,0 @@ -.subjectSelector { - overflow: scroll; - height: 200px; - margin: 10px; -} - -.subjItem { - font-size: 18px; - padding: 3px; - cursor: pointer; -} - -.activeSubjItem { - background-color: var(--text-color); - color: black; -} - -.searchBar { - margin: 10px; - width: 100%; - color: white; - background-color: #212127; - border: none; - font-size: 18px; -} - -.subjItem:hover:not(.activeSubjItem) { - background-color: #555; - color: white; -} diff --git a/src/components/AllQuestions/AllQuestions.js b/src/components/AllQuestions/AllQuestions.js index 8e93526..1d87a0a 100644 --- a/src/components/AllQuestions/AllQuestions.js +++ b/src/components/AllQuestions/AllQuestions.js @@ -4,7 +4,6 @@ import LoadingIndicator from '../LoadingIndicator' import Subject from '../../components/Subject' import constants from '../../constants.json' -import './AllQuestions.css' class AllQuestions extends PureComponent { constructor (props) { diff --git a/src/components/Feedback/Feedback.css b/src/components/Feedback/Feedback.css deleted file mode 100644 index e69de29..0000000 diff --git a/src/components/Feedback/Feedback.js b/src/components/Feedback/Feedback.js index 03f8c33..31da9cd 100644 --- a/src/components/Feedback/Feedback.js +++ b/src/components/Feedback/Feedback.js @@ -1,5 +1,4 @@ import React, { PureComponent } from 'react' -import './Feedback.css' class Feedback extends PureComponent { render () { diff --git a/src/components/HomeTab/HomeTab.css b/src/components/HomeTab/HomeTab.css deleted file mode 100644 index 8de4852..0000000 --- a/src/components/HomeTab/HomeTab.css +++ /dev/null @@ -1,3 +0,0 @@ -.link { - margin: 10px; -} diff --git a/src/components/HomeTab/HomeTab.js b/src/components/HomeTab/HomeTab.js index 1e2d0de..37290ef 100644 --- a/src/components/HomeTab/HomeTab.js +++ b/src/components/HomeTab/HomeTab.js @@ -1,5 +1,4 @@ import React, { PureComponent } from 'react' -import './HomeTab.css' import links from './links.json' diff --git a/src/components/LoadingIndicator/LoadingIndicator.css b/src/components/LoadingIndicator/LoadingIndicator.css deleted file mode 100644 index 4effd49..0000000 --- a/src/components/LoadingIndicator/LoadingIndicator.css +++ /dev/null @@ -1,10 +0,0 @@ -.loadingindicator { - position: fixed; - top: 50%; - left: 50%; - -webkit-transform: translate(-50%, -50%); - transform: translate(-50%, -50%); - - color: #fff; - font-size: 30px; -} diff --git a/src/components/LoadingIndicator/LoadingIndicator.js b/src/components/LoadingIndicator/LoadingIndicator.js index a0fd2b2..1212c1c 100644 --- a/src/components/LoadingIndicator/LoadingIndicator.js +++ b/src/components/LoadingIndicator/LoadingIndicator.js @@ -1,5 +1,4 @@ import React, { PureComponent } from 'react' -import './LoadingIndicator.css' class LoadingIndicator extends PureComponent { render () { diff --git a/src/components/Manual/Manual.css b/src/components/Manual/Manual.css deleted file mode 100644 index e69de29..0000000 diff --git a/src/components/Manual/Manual.js b/src/components/Manual/Manual.js index d1e6290..10a74fc 100644 --- a/src/components/Manual/Manual.js +++ b/src/components/Manual/Manual.js @@ -3,7 +3,6 @@ import React, { PureComponent } from 'react' import LoadingIndicator from '../LoadingIndicator' import constants from '../../constants.json' -import './Manual.css' class Manual extends PureComponent { constructor (props) { diff --git a/src/components/Question/Question.css b/src/components/Question/Question.css deleted file mode 100644 index e6a891a..0000000 --- a/src/components/Question/Question.css +++ /dev/null @@ -1,22 +0,0 @@ -.questionContainer { - margin: 10px; -} - -.questionContainer:hover { - background-color: var(--hoover-color); -} - -.question { - font-weight: bold; - font-size: 17px; - color: #ffffff; -} - -.answer { - font-size: 15px; -} - -.data { - font-size: 13px; - color: #a1a1a1; -} diff --git a/src/components/Question/Question.js b/src/components/Question/Question.js index b6538f7..549d512 100644 --- a/src/components/Question/Question.js +++ b/src/components/Question/Question.js @@ -1,5 +1,4 @@ import React, { PureComponent } from 'react' -import './Question.css' class Question extends PureComponent { render () { diff --git a/src/components/Subject/Subject.css b/src/components/Subject/Subject.css deleted file mode 100644 index e69de29..0000000 diff --git a/src/components/Subject/Subject.js b/src/components/Subject/Subject.js index 6773e6b..4ce990d 100644 --- a/src/components/Subject/Subject.js +++ b/src/components/Subject/Subject.js @@ -1,7 +1,6 @@ import React, { PureComponent } from 'react' import Question from '../Question' -import './Subject.css' class Subject extends PureComponent { render () { diff --git a/src/components/UserQuestions/UserQuestions.css b/src/components/UserQuestions/UserQuestions.css deleted file mode 100644 index 718e479..0000000 --- a/src/components/UserQuestions/UserQuestions.css +++ /dev/null @@ -1,28 +0,0 @@ -.uquestioncontainer { - margin: 5px; -} - -.uquestioncontainer:hover { - background-color: var(--hoover-color); -} - -.uquestionscontainer { - margin: 10px; -} - -.uquestion { - font-weight: 'bold'; - font-size: 16px; - color: #fff; - margin: 5px; -} - -.uanswer { - margin: 5px; -} - -.uquestionnumber { - color: #fff; - margin: 5px; - font-size: 20px; -} diff --git a/src/components/UserQuestions/UserQuestions.js b/src/components/UserQuestions/UserQuestions.js index 4e4c157..d56c3be 100644 --- a/src/components/UserQuestions/UserQuestions.js +++ b/src/components/UserQuestions/UserQuestions.js @@ -3,7 +3,6 @@ import React, { PureComponent } from 'react' import LoadingIndicator from '../LoadingIndicator' import constants from '../../constants.json' -import './UserQuestions.css' class UserQuestions extends PureComponent { constructor (props) { diff --git a/src/pages/Home.css b/src/pages/Home.css deleted file mode 100644 index f1bfda0..0000000 --- a/src/pages/Home.css +++ /dev/null @@ -1,118 +0,0 @@ -body { - font: normal 14px Verdana; - color: #999999; -} - -.link { - margin: 20px; - font-size: 20px; -} - -.sidebarLink { - color: var(--text-color); - text-decoration: none; -} - -.sidebar { - margin: 0; - padding: 0; - width: 200px; - background-color: #212127; - position: fixed; - height: 100%; - overflow: auto; -} - -.sidebar a { - display: block; - color: black; - padding: 16px; - text-decoration: none; - color: var(--bright-color); -} - -.sidebar a.active { - background-color: var(--text-color); - color: black; -} - -.sidebar a:hover:not(.active) { - background-color: #555; - color: white; -} - -div.content { - margin-left: 200px; - padding: 1px 16px; -} - -.menuicon div { - height: 5px; - background-color: var(--bright-color); - margin: 0px 0; - display: none; - width: 30px; -} - -.sidebarheader { - font-size: 40px; - color: var(--bright-color); - display: flex; - text-align: center; -} - -.headercontainer { - display: flex; - flex-direction: row; - align-items: center; - flex-wrap: nowrap; - position: relative; - margin: 10px; -} - -@media screen and (max-width: 700px) { - .sidebar { - width: 100%; - height: auto; - position: relative; - } - .sidebar a {float: left;} - div.content {margin-left: 0;} -} - -@media screen and (max-width: 700px) { - .menuicon div { - display: block; - margin: 6px 0; - } - - .sidebar a { - text-align: center; - float: none; - } - - .menuicon { - display: inline; - } - - .sidebaritemsconainer { - display: inline; - } - - .sidebarheader { - position: absolute; - left: 50%; - top: 50%; - transform: translateX(-50%) translateY(-50%); - } - - .codecontainer { - margin-left: 0px; - margin-right: 0px; - } - - .sitedescription { - width: 100%; - margin: 0 auto; - } -} diff --git a/src/pages/Home.js b/src/pages/Home.js deleted file mode 100644 index 74d1b84..0000000 --- a/src/pages/Home.js +++ /dev/null @@ -1,127 +0,0 @@ -import React, { PureComponent } from 'react' - -import AllQuestions from '../../components/AllQuestions' -import Manual from '../../components/Manual' -import HomeTab from '../../components/HomeTab' -import UserQuestions from '../../components/UserQuestions' -import Feedback from '../../components/Feedback' - -import constants from '../../constants.json' -import './Home.css' - -// TODO: css remove unnecesarry stuff -// TODO: home to separate component -// TODO: resizing test -// TODO: fetch data only once? - -const tabs = { - home: { - text: 'Home', - component: HomeTab - }, - allq: { - text: 'All questions', - component: AllQuestions - }, - manual: { - text: 'Manual', - component: Manual - }, - userq: { - text: 'User Questions', - component: UserQuestions - }, - feedback: { - text: 'Feedback', - component: Feedback - } -} - -class Home extends PureComponent { - constructor (props) { - super(props) - - this.state = { - menuShowing: window.innerWidth > constants.mobileWindowWidth, - currentTab: 'home' - } - } - - closeMenu () { - this.setState((oldState) => { - return { - menuShowing: !oldState.menuShowing - } - }) - } - - setActiveTab (name) { - this.setState({ - currentTab: name - }) - - if (window.innerWidth < constants.mobileWindowWidth) { - this.setState({ - menuShowing: false - }) - } - } - - renderSideBar () { - const { currentTab, menuShowing } = this.state - - return ( -