From 2a9215c3659d65ad3ad7da7282d2d7c9b75f031b Mon Sep 17 00:00:00 2001 From: mattyl006 Date: Tue, 15 Nov 2022 17:55:07 +0100 Subject: [PATCH] new components structure --- src/App.js | 6 +-- .../{elements => auth}/AuthHeader.js | 0 .../{elements => auth}/AuthInput.js | 0 .../{elements => auth}/AuthOption.js | 0 .../{sections => challenges_list}/FilterBy.js | 2 +- .../FiltersMenu/FiltersMenu.js | 4 +- .../FiltersMenu/filterOptions.js | 0 .../FiltersMenu/index.js | 0 .../MiniChallenge.js | 2 +- .../Commercial.js | 2 +- .../{sections => content_sections}/Csi.js | 0 .../{sections => content_sections}/Footer.js | 0 .../{sections => content_sections}/Hero.js | 2 +- .../Motivation.js | 0 .../Partnerships.js | 2 +- .../{elements => generic}/Button.js | 0 .../{elements => generic}/ButtonLink.js | 0 .../{elements => generic}/CircleNumber.js | 0 .../{elements => generic}/CodeShell.js | 0 .../{elements => generic}/Filter.js | 0 .../{elements => generic}/IconLabel.js | 0 .../{elements => generic}/InfoItem.js | 0 .../{elements => generic}/InfoList.js | 0 .../{elements => generic}/Loading.js | 0 src/components/{elements => generic}/Logo.js | 0 src/components/{elements => generic}/Pager.js | 0 .../{elements => generic}/Placeholder.js | 0 .../{elements => generic}/Search.js | 0 .../{elements => generic}/SubmitInput.js | 0 .../{elements => navigation}/LoggedBar.js | 0 .../{elements => navigation}/MobileNavMenu.js | 0 .../{elements => navigation}/NavBar/NavBar.js | 2 +- .../NavBar/NavBarStyle.js | 0 .../{elements => navigation}/NavBar/index.js | 0 .../ColumnFilterIcon.js | 0 .../DesktopChallengeMenu.js | 0 .../{sections => specific_challenge}/HowTo.js | 40 +++++++++---------- .../Leaderboard/Leaderboard.js | 8 ++-- .../Leaderboard/_tableSearchQueryHandler.js | 0 .../Leaderboard/index.js | 0 .../Leaderboard/sortOptions.js | 0 .../MobileChallengeMenu.js | 0 .../MyEntries.js | 6 +-- .../Readme.js | 6 +-- .../Submit.js | 4 +- .../{elements => specific_challenge}/Table.js | 0 src/normalize.css | 4 +- src/pages/Challanges/Challenges.js | 8 ++-- src/pages/Challanges/_renderChallenges.js | 2 +- src/pages/Challenge.js | 16 ++++---- src/pages/LandingPage.js | 10 ++--- src/pages/auth/Login.js | 4 +- src/pages/auth/LoginWithEmail.js | 6 +-- src/pages/auth/Register.js | 4 +- src/pages/auth/RegisterWithEmail.js | 6 +-- 55 files changed, 73 insertions(+), 73 deletions(-) rename src/components/{elements => auth}/AuthHeader.js (100%) rename src/components/{elements => auth}/AuthInput.js (100%) rename src/components/{elements => auth}/AuthOption.js (100%) rename src/components/{sections => challenges_list}/FilterBy.js (97%) rename src/components/{elements => challenges_list}/FiltersMenu/FiltersMenu.js (97%) rename src/components/{elements => challenges_list}/FiltersMenu/filterOptions.js (100%) rename src/components/{elements => challenges_list}/FiltersMenu/index.js (100%) rename src/components/{sections => challenges_list}/MiniChallenge.js (97%) rename src/components/{sections => content_sections}/Commercial.js (98%) rename src/components/{sections => content_sections}/Csi.js (100%) rename src/components/{sections => content_sections}/Footer.js (100%) rename src/components/{sections => content_sections}/Hero.js (97%) rename src/components/{sections => content_sections}/Motivation.js (100%) rename src/components/{sections => content_sections}/Partnerships.js (93%) rename src/components/{elements => generic}/Button.js (100%) rename src/components/{elements => generic}/ButtonLink.js (100%) rename src/components/{elements => generic}/CircleNumber.js (100%) rename src/components/{elements => generic}/CodeShell.js (100%) rename src/components/{elements => generic}/Filter.js (100%) rename src/components/{elements => generic}/IconLabel.js (100%) rename src/components/{elements => generic}/InfoItem.js (100%) rename src/components/{elements => generic}/InfoList.js (100%) rename src/components/{elements => generic}/Loading.js (100%) rename src/components/{elements => generic}/Logo.js (100%) rename src/components/{elements => generic}/Pager.js (100%) rename src/components/{elements => generic}/Placeholder.js (100%) rename src/components/{elements => generic}/Search.js (100%) rename src/components/{elements => generic}/SubmitInput.js (100%) rename src/components/{elements => navigation}/LoggedBar.js (100%) rename src/components/{elements => navigation}/MobileNavMenu.js (100%) rename src/components/{elements => navigation}/NavBar/NavBar.js (98%) rename src/components/{elements => navigation}/NavBar/NavBarStyle.js (100%) rename src/components/{elements => navigation}/NavBar/index.js (100%) rename src/components/{elements => specific_challenge}/ColumnFilterIcon.js (100%) rename src/components/{elements => specific_challenge}/DesktopChallengeMenu.js (100%) rename src/components/{sections => specific_challenge}/HowTo.js (88%) rename src/components/{sections => specific_challenge}/Leaderboard/Leaderboard.js (97%) rename src/components/{sections => specific_challenge}/Leaderboard/_tableSearchQueryHandler.js (100%) rename src/components/{sections => specific_challenge}/Leaderboard/index.js (100%) rename src/components/{sections => specific_challenge}/Leaderboard/sortOptions.js (100%) rename src/components/{elements => specific_challenge}/MobileChallengeMenu.js (100%) rename src/components/{sections => specific_challenge}/MyEntries.js (97%) rename src/components/{sections => specific_challenge}/Readme.js (97%) rename src/components/{sections => specific_challenge}/Submit.js (93%) rename src/components/{elements => specific_challenge}/Table.js (100%) diff --git a/src/App.js b/src/App.js index 8d3d647..c951bf3 100644 --- a/src/App.js +++ b/src/App.js @@ -3,7 +3,7 @@ import theme from './utils/theme'; import LandingPage from './pages/LandingPage'; import Challenges from './pages/Challanges/Challenges'; import {BrowserRouter, Route, Routes} from 'react-router-dom'; -import NavBar from './components/elements/NavBar'; +import NavBar from './components/navigation/NavBar'; import {CHALLENGE_PAGE, CHALLENGES_PAGE, IS_MOBILE} from './utils/globals'; import Challenge from './pages/Challenge'; import Register from './pages/auth/Register'; @@ -12,9 +12,9 @@ import LoginWithEmail from './pages/auth/LoginWithEmail'; import RegisterWithEmail from './pages/auth/RegisterWithEmail'; import KeyCloakService from './services/KeyCloakService'; import React from 'react'; -import LoggedBar from './components/elements/LoggedBar'; +import LoggedBar from './components/navigation/LoggedBar'; import addUser from './api/addUser'; -import Loading from './components/elements/Loading'; +import Loading from './components/generic/Loading'; import {FlexColumn} from './utils/containers'; const App = () => { diff --git a/src/components/elements/AuthHeader.js b/src/components/auth/AuthHeader.js similarity index 100% rename from src/components/elements/AuthHeader.js rename to src/components/auth/AuthHeader.js diff --git a/src/components/elements/AuthInput.js b/src/components/auth/AuthInput.js similarity index 100% rename from src/components/elements/AuthInput.js rename to src/components/auth/AuthInput.js diff --git a/src/components/elements/AuthOption.js b/src/components/auth/AuthOption.js similarity index 100% rename from src/components/elements/AuthOption.js rename to src/components/auth/AuthOption.js diff --git a/src/components/sections/FilterBy.js b/src/components/challenges_list/FilterBy.js similarity index 97% rename from src/components/sections/FilterBy.js rename to src/components/challenges_list/FilterBy.js index 2b5b374..899dd50 100644 --- a/src/components/sections/FilterBy.js +++ b/src/components/challenges_list/FilterBy.js @@ -1,6 +1,6 @@ import React from 'react'; import {FlexColumn, Grid, Svg} from '../../utils/containers'; -import Filter from '../elements/Filter'; +import Filter from '../generic/Filter'; import {Body, H3, Medium} from '../../utils/fonts'; import arrow from '../../assets/arrow.svg'; import Media from 'react-media'; diff --git a/src/components/elements/FiltersMenu/FiltersMenu.js b/src/components/challenges_list/FiltersMenu/FiltersMenu.js similarity index 97% rename from src/components/elements/FiltersMenu/FiltersMenu.js rename to src/components/challenges_list/FiltersMenu/FiltersMenu.js index feaa502..3a1906d 100644 --- a/src/components/elements/FiltersMenu/FiltersMenu.js +++ b/src/components/challenges_list/FiltersMenu/FiltersMenu.js @@ -1,9 +1,9 @@ import React from 'react'; import {FlexColumn, FlexRow, TransBack} from '../../../utils/containers'; -import Button from '../Button'; +import Button from '../../generic/Button'; import theme from '../../../utils/theme'; import styled from 'styled-components'; -import FilterBy from '../../sections/FilterBy'; +import FilterBy from '../FilterBy'; import filterOptions from './filterOptions'; import Media from 'react-media'; import PropsTypes from 'prop-types'; diff --git a/src/components/elements/FiltersMenu/filterOptions.js b/src/components/challenges_list/FiltersMenu/filterOptions.js similarity index 100% rename from src/components/elements/FiltersMenu/filterOptions.js rename to src/components/challenges_list/FiltersMenu/filterOptions.js diff --git a/src/components/elements/FiltersMenu/index.js b/src/components/challenges_list/FiltersMenu/index.js similarity index 100% rename from src/components/elements/FiltersMenu/index.js rename to src/components/challenges_list/FiltersMenu/index.js diff --git a/src/components/sections/MiniChallenge.js b/src/components/challenges_list/MiniChallenge.js similarity index 97% rename from src/components/sections/MiniChallenge.js rename to src/components/challenges_list/MiniChallenge.js index 810810f..d50b34d 100644 --- a/src/components/sections/MiniChallenge.js +++ b/src/components/challenges_list/MiniChallenge.js @@ -2,7 +2,7 @@ import React from 'react'; import {Container, FlexColumn, FlexRow, Grid} from '../../utils/containers'; import {Body, H3} from '../../utils/fonts'; import styled from 'styled-components'; -import IconLabel from '../elements/IconLabel'; +import IconLabel from '../generic/IconLabel'; import {Link} from 'react-router-dom'; import {CHALLENGE_PAGE, MINI_DESCRIPTION_RENDER} from '../../utils/globals'; import theme from '../../utils/theme'; diff --git a/src/components/sections/Commercial.js b/src/components/content_sections/Commercial.js similarity index 98% rename from src/components/sections/Commercial.js rename to src/components/content_sections/Commercial.js index a55ee24..8ffe7a5 100644 --- a/src/components/sections/Commercial.js +++ b/src/components/content_sections/Commercial.js @@ -1,7 +1,7 @@ import React from 'react'; import {FlexColumn, FlexRow, ImageBackground} from '../../utils/containers'; import {Body, H2, Medium} from '../../utils/fonts'; -import CircleNumber from '../elements/CircleNumber'; +import CircleNumber from '../generic/CircleNumber'; import Media from 'react-media'; import theme from '../../utils/theme'; import commercialImage from '../../assets/commercial-image.svg'; diff --git a/src/components/sections/Csi.js b/src/components/content_sections/Csi.js similarity index 100% rename from src/components/sections/Csi.js rename to src/components/content_sections/Csi.js diff --git a/src/components/sections/Footer.js b/src/components/content_sections/Footer.js similarity index 100% rename from src/components/sections/Footer.js rename to src/components/content_sections/Footer.js diff --git a/src/components/sections/Hero.js b/src/components/content_sections/Hero.js similarity index 97% rename from src/components/sections/Hero.js rename to src/components/content_sections/Hero.js index 92abb7f..5cb1fac 100644 --- a/src/components/sections/Hero.js +++ b/src/components/content_sections/Hero.js @@ -2,7 +2,7 @@ import React from 'react'; import {Body, H1, Medium} from '../../utils/fonts'; import {Container, FlexColumn, FlexRow, Svg} from '../../utils/containers'; import theme from '../../utils/theme'; -import ButtonLink from '../elements/ButtonLink'; +import ButtonLink from '../generic/ButtonLink'; import Media from 'react-media'; import codepenIco from '../../assets/codepen_ico.svg'; import styled from 'styled-components'; diff --git a/src/components/sections/Motivation.js b/src/components/content_sections/Motivation.js similarity index 100% rename from src/components/sections/Motivation.js rename to src/components/content_sections/Motivation.js diff --git a/src/components/sections/Partnerships.js b/src/components/content_sections/Partnerships.js similarity index 93% rename from src/components/sections/Partnerships.js rename to src/components/content_sections/Partnerships.js index bd069a6..a676323 100644 --- a/src/components/sections/Partnerships.js +++ b/src/components/content_sections/Partnerships.js @@ -1,7 +1,7 @@ import React from 'react'; import {FlexColumn, Grid} from '../../utils/containers'; import {H2} from '../../utils/fonts'; -import Placeholder from '../elements/Placeholder'; +import Placeholder from '../generic/Placeholder'; import styled from 'styled-components'; const PartnershipsStyle = styled(FlexColumn)` diff --git a/src/components/elements/Button.js b/src/components/generic/Button.js similarity index 100% rename from src/components/elements/Button.js rename to src/components/generic/Button.js diff --git a/src/components/elements/ButtonLink.js b/src/components/generic/ButtonLink.js similarity index 100% rename from src/components/elements/ButtonLink.js rename to src/components/generic/ButtonLink.js diff --git a/src/components/elements/CircleNumber.js b/src/components/generic/CircleNumber.js similarity index 100% rename from src/components/elements/CircleNumber.js rename to src/components/generic/CircleNumber.js diff --git a/src/components/elements/CodeShell.js b/src/components/generic/CodeShell.js similarity index 100% rename from src/components/elements/CodeShell.js rename to src/components/generic/CodeShell.js diff --git a/src/components/elements/Filter.js b/src/components/generic/Filter.js similarity index 100% rename from src/components/elements/Filter.js rename to src/components/generic/Filter.js diff --git a/src/components/elements/IconLabel.js b/src/components/generic/IconLabel.js similarity index 100% rename from src/components/elements/IconLabel.js rename to src/components/generic/IconLabel.js diff --git a/src/components/elements/InfoItem.js b/src/components/generic/InfoItem.js similarity index 100% rename from src/components/elements/InfoItem.js rename to src/components/generic/InfoItem.js diff --git a/src/components/elements/InfoList.js b/src/components/generic/InfoList.js similarity index 100% rename from src/components/elements/InfoList.js rename to src/components/generic/InfoList.js diff --git a/src/components/elements/Loading.js b/src/components/generic/Loading.js similarity index 100% rename from src/components/elements/Loading.js rename to src/components/generic/Loading.js diff --git a/src/components/elements/Logo.js b/src/components/generic/Logo.js similarity index 100% rename from src/components/elements/Logo.js rename to src/components/generic/Logo.js diff --git a/src/components/elements/Pager.js b/src/components/generic/Pager.js similarity index 100% rename from src/components/elements/Pager.js rename to src/components/generic/Pager.js diff --git a/src/components/elements/Placeholder.js b/src/components/generic/Placeholder.js similarity index 100% rename from src/components/elements/Placeholder.js rename to src/components/generic/Placeholder.js diff --git a/src/components/elements/Search.js b/src/components/generic/Search.js similarity index 100% rename from src/components/elements/Search.js rename to src/components/generic/Search.js diff --git a/src/components/elements/SubmitInput.js b/src/components/generic/SubmitInput.js similarity index 100% rename from src/components/elements/SubmitInput.js rename to src/components/generic/SubmitInput.js diff --git a/src/components/elements/LoggedBar.js b/src/components/navigation/LoggedBar.js similarity index 100% rename from src/components/elements/LoggedBar.js rename to src/components/navigation/LoggedBar.js diff --git a/src/components/elements/MobileNavMenu.js b/src/components/navigation/MobileNavMenu.js similarity index 100% rename from src/components/elements/MobileNavMenu.js rename to src/components/navigation/MobileNavMenu.js diff --git a/src/components/elements/NavBar/NavBar.js b/src/components/navigation/NavBar/NavBar.js similarity index 98% rename from src/components/elements/NavBar/NavBar.js rename to src/components/navigation/NavBar/NavBar.js index 3206341..e48af6c 100644 --- a/src/components/elements/NavBar/NavBar.js +++ b/src/components/navigation/NavBar/NavBar.js @@ -1,6 +1,6 @@ import React from 'react'; import {Container, FlexRow, Svg} from '../../../utils/containers'; -import Logo from '../Logo'; +import Logo from '../../generic/Logo'; import styled from 'styled-components'; import menuButtonIcon from '../../../assets/menu-button.svg'; import MobileNavMenu from '../MobileNavMenu'; diff --git a/src/components/elements/NavBar/NavBarStyle.js b/src/components/navigation/NavBar/NavBarStyle.js similarity index 100% rename from src/components/elements/NavBar/NavBarStyle.js rename to src/components/navigation/NavBar/NavBarStyle.js diff --git a/src/components/elements/NavBar/index.js b/src/components/navigation/NavBar/index.js similarity index 100% rename from src/components/elements/NavBar/index.js rename to src/components/navigation/NavBar/index.js diff --git a/src/components/elements/ColumnFilterIcon.js b/src/components/specific_challenge/ColumnFilterIcon.js similarity index 100% rename from src/components/elements/ColumnFilterIcon.js rename to src/components/specific_challenge/ColumnFilterIcon.js diff --git a/src/components/elements/DesktopChallengeMenu.js b/src/components/specific_challenge/DesktopChallengeMenu.js similarity index 100% rename from src/components/elements/DesktopChallengeMenu.js rename to src/components/specific_challenge/DesktopChallengeMenu.js diff --git a/src/components/sections/HowTo.js b/src/components/specific_challenge/HowTo.js similarity index 88% rename from src/components/sections/HowTo.js rename to src/components/specific_challenge/HowTo.js index 5d644cf..e81f75a 100644 --- a/src/components/sections/HowTo.js +++ b/src/components/specific_challenge/HowTo.js @@ -1,8 +1,8 @@ import React from 'react'; import {FlexColumn, FlexRow, Grid, Svg} from '../../utils/containers'; import {Body, H2, H3, Medium} from '../../utils/fonts'; -import CircleNumber from '../elements/CircleNumber'; -import CodeShell from '../elements/CodeShell'; +import CircleNumber from '../generic/CircleNumber'; +import CodeShell from '../generic/CodeShell'; import cubeIcon from '../../assets/cube_ico.svg'; import theme from '../../utils/theme'; import {IS_MOBILE} from '../../utils/globals'; @@ -67,17 +67,17 @@ const HowTo = () => { source codes along with out.tsv files. - + + /* eslint-disable */ + `git commit -m 'my brilliant solution'`, + 'git push origin my-brilliant-branch']}/>

@@ -211,16 +211,16 @@ const HowTo = () => { that you can also add links to external resources using the `links` section): - + 'tags:', '\t- neutral-network', '\t- left-to-right', + 'params:', '\tepochs: 10', '\tlearning-rate: 0.01', + 'unwanted-params:', '\t- model-file', '\t- vocab-file', + 'param-files:', '\t- “*.yaml”*', '\t- config/*.yaml*/', + 'links:', '\t- title: "Some external link"', + '\t\s\surl: "https://example.org/xyz"', '\t- title: "Yet another link"', + '\t\s\shttps://example.com/foo-bar-baz-123"', + '\t- url: "https://example.net/bare-link-without-text']}/> It might seem a little bit complicated, but you could simply use the method which is the most convenient for you. diff --git a/src/components/sections/Leaderboard/Leaderboard.js b/src/components/specific_challenge/Leaderboard/Leaderboard.js similarity index 97% rename from src/components/sections/Leaderboard/Leaderboard.js rename to src/components/specific_challenge/Leaderboard/Leaderboard.js index 67d610d..581555d 100644 --- a/src/components/sections/Leaderboard/Leaderboard.js +++ b/src/components/specific_challenge/Leaderboard/Leaderboard.js @@ -3,14 +3,14 @@ import Media from 'react-media'; import theme from '../../../utils/theme'; import {FlexColumn} from '../../../utils/containers'; import {H2} from '../../../utils/fonts'; -import Table from '../../elements/Table'; +import Table from '../Table'; import PropsTypes from 'prop-types'; import getChallengeLeaderboard from '../../../api/getChallengeLeaderboard'; import _tableSearchQueryHandler from './_tableSearchQueryHandler'; import {CALC_PAGES, EVALUATIONS_FORMAT, RENDER_WHEN} from '../../../utils/globals'; -import Search from '../../elements/Search'; -import Pager from '../../elements/Pager'; -import Loading from '../../elements/Loading'; +import Search from '../../generic/Search'; +import Pager from '../../generic/Pager'; +import Loading from '../../generic/Loading'; const Leaderboard = (props) => { const [entriesFromApi, setEntriesFromApi] = React.useState([]); diff --git a/src/components/sections/Leaderboard/_tableSearchQueryHandler.js b/src/components/specific_challenge/Leaderboard/_tableSearchQueryHandler.js similarity index 100% rename from src/components/sections/Leaderboard/_tableSearchQueryHandler.js rename to src/components/specific_challenge/Leaderboard/_tableSearchQueryHandler.js diff --git a/src/components/sections/Leaderboard/index.js b/src/components/specific_challenge/Leaderboard/index.js similarity index 100% rename from src/components/sections/Leaderboard/index.js rename to src/components/specific_challenge/Leaderboard/index.js diff --git a/src/components/sections/Leaderboard/sortOptions.js b/src/components/specific_challenge/Leaderboard/sortOptions.js similarity index 100% rename from src/components/sections/Leaderboard/sortOptions.js rename to src/components/specific_challenge/Leaderboard/sortOptions.js diff --git a/src/components/elements/MobileChallengeMenu.js b/src/components/specific_challenge/MobileChallengeMenu.js similarity index 100% rename from src/components/elements/MobileChallengeMenu.js rename to src/components/specific_challenge/MobileChallengeMenu.js diff --git a/src/components/sections/MyEntries.js b/src/components/specific_challenge/MyEntries.js similarity index 97% rename from src/components/sections/MyEntries.js rename to src/components/specific_challenge/MyEntries.js index e2242c3..c584ee5 100644 --- a/src/components/sections/MyEntries.js +++ b/src/components/specific_challenge/MyEntries.js @@ -2,13 +2,13 @@ import React from 'react'; import {FlexColumn} from '../../utils/containers'; import {H2} from '../../utils/fonts'; import getMyEntries from '../../api/getMyEntries'; -import Pager from '../elements/Pager'; +import Pager from '../generic/Pager'; import {CALC_PAGES, EVALUATIONS_FORMAT, RENDER_WHEN} from '../../utils/globals'; import Media from 'react-media'; import theme from '../../utils/theme'; import _tableSearchQueryHandler from './Leaderboard/_tableSearchQueryHandler'; -import Loading from '../elements/Loading'; -import Table from '../elements/Table'; +import Loading from '../generic/Loading'; +import Table from './Table'; const MyEntries = (props) => { const [myEntriesFromAPI, setMyEntriesFromAPI] = React.useState({}); diff --git a/src/components/sections/Readme.js b/src/components/specific_challenge/Readme.js similarity index 97% rename from src/components/sections/Readme.js rename to src/components/specific_challenge/Readme.js index 1aaa4b3..7d77191 100644 --- a/src/components/sections/Readme.js +++ b/src/components/specific_challenge/Readme.js @@ -6,10 +6,10 @@ import theme from '../../utils/theme'; import getChallengeFullDescription from '../../api/getChallengeFullDescription'; import {markdown} from 'markdown'; import styled from 'styled-components'; -import InfoList from '../elements/InfoList'; -import Loading from '../elements/Loading'; +import InfoList from '../generic/InfoList'; +import Loading from '../generic/Loading'; import PropsTypes from 'prop-types'; -import MiniChallenge from './MiniChallenge'; +import MiniChallenge from '../challenges_list/MiniChallenge'; const ReadmeStyle = styled(Body)` h3 { diff --git a/src/components/sections/Submit.js b/src/components/specific_challenge/Submit.js similarity index 93% rename from src/components/sections/Submit.js rename to src/components/specific_challenge/Submit.js index f56c9c1..4179fb4 100644 --- a/src/components/sections/Submit.js +++ b/src/components/specific_challenge/Submit.js @@ -1,8 +1,8 @@ import React from 'react'; import {FlexColumn} from '../../utils/containers'; import {H2, Menu} from '../../utils/fonts'; -import SubmitInput from '../elements/SubmitInput'; -import Button from '../elements/Button'; +import SubmitInput from '../generic/SubmitInput'; +import Button from '../generic/Button'; import theme from '../../utils/theme'; import challengeSubmission from '../../api/challengeSubmissionPost'; diff --git a/src/components/elements/Table.js b/src/components/specific_challenge/Table.js similarity index 100% rename from src/components/elements/Table.js rename to src/components/specific_challenge/Table.js diff --git a/src/normalize.css b/src/normalize.css index 3630694..25377dd 100644 --- a/src/normalize.css +++ b/src/normalize.css @@ -42,7 +42,7 @@ h1 { margin: 0.67em 0; } -/* Grouping content +/* Grouping content_sections ========================================================================== */ /** @@ -138,7 +138,7 @@ sup { top: -0.5em; } -/* Embedded content +/* Embedded content_sections ========================================================================== */ /** diff --git a/src/pages/Challanges/Challenges.js b/src/pages/Challanges/Challenges.js index 78eb89c..4d9c352 100644 --- a/src/pages/Challanges/Challenges.js +++ b/src/pages/Challanges/Challenges.js @@ -1,9 +1,9 @@ import React from 'react'; import {Body, H1} from '../../utils/fonts'; import {FlexColumn, FlexRow, Svg} from '../../utils/containers'; -import Search from '../../components/elements/Search'; -import Pager from '../../components/elements/Pager'; -import FiltersMenu from '../../components/elements/FiltersMenu'; +import Search from '../../components/generic/Search'; +import Pager from '../../components/generic/Pager'; +import FiltersMenu from '../../components/challenges_list/FiltersMenu'; import _searchQueryHandler from './_searchQueryHandler'; import _renderChallenges from './_renderChallenges'; import Media from 'react-media'; @@ -11,7 +11,7 @@ import theme from '../../utils/theme'; import cupIco from '../../assets/cup_ico.svg'; import getChallenges from '../../api/getChallenges'; import {CALC_PAGES} from '../../utils/globals'; -import Loading from '../../components/elements/Loading'; +import Loading from '../../components/generic/Loading'; const Challenges = () => { const [pageNr, setPageNr] = React.useState(1); diff --git a/src/pages/Challanges/_renderChallenges.js b/src/pages/Challanges/_renderChallenges.js index 2271ba3..5984e6b 100644 --- a/src/pages/Challanges/_renderChallenges.js +++ b/src/pages/Challanges/_renderChallenges.js @@ -1,5 +1,5 @@ import {ELEMENTS_PER_PAGE} from '../../utils/globals'; -import MiniChallenge from '../../components/sections/MiniChallenge'; +import MiniChallenge from '../../components/challenges_list/MiniChallenge'; import {Grid} from '../../utils/containers'; import styled from 'styled-components'; diff --git a/src/pages/Challenge.js b/src/pages/Challenge.js index 5e0a7de..a3c5eee 100644 --- a/src/pages/Challenge.js +++ b/src/pages/Challenge.js @@ -3,18 +3,18 @@ import {Container, FlexColumn, FlexRow, Svg} from '../utils/containers'; import {useParams} from 'react-router-dom'; import {H1, Medium} from '../utils/fonts'; import theme from '../utils/theme'; -import MobileChallengeMenu from '../components/elements/MobileChallengeMenu'; -import Leaderboard from '../components/sections/Leaderboard/Leaderboard'; -import Readme from '../components/sections/Readme'; -import HowTo from '../components/sections/HowTo'; -import MyEntries from '../components/sections/MyEntries'; -import Submit from '../components/sections/Submit'; +import MobileChallengeMenu from '../components/specific_challenge/MobileChallengeMenu'; +import Leaderboard from '../components/specific_challenge/Leaderboard/Leaderboard'; +import Readme from '../components/specific_challenge/Readme'; +import HowTo from '../components/specific_challenge/HowTo'; +import MyEntries from '../components/specific_challenge/MyEntries'; +import Submit from '../components/specific_challenge/Submit'; import Media from 'react-media'; -import DesktopChallengeMenu from '../components/elements/DesktopChallengeMenu'; +import DesktopChallengeMenu from '../components/specific_challenge/DesktopChallengeMenu'; import {RENDER_ICO} from '../utils/globals'; import textIco from '../assets/text_ico.svg'; import getChallengeInfo from '../api/getChallengeInfo'; -import Loading from '../components/elements/Loading'; +import Loading from '../components/generic/Loading'; const Challenge = () => { const challengeName = useParams().challengeId; diff --git a/src/pages/LandingPage.js b/src/pages/LandingPage.js index b3161b3..066cb26 100644 --- a/src/pages/LandingPage.js +++ b/src/pages/LandingPage.js @@ -1,10 +1,10 @@ import React from 'react'; import {FlexColumn} from '../utils/containers'; -import Motivation from '../components/sections/Motivation'; -import Csi from '../components/sections/Csi'; -import Commercial from '../components/sections/Commercial'; -import Hero from '../components/sections/Hero'; -import Partnerships from '../components/sections/Partnerships'; +import Motivation from '../components/content_sections/Motivation'; +import Csi from '../components/content_sections/Csi'; +import Commercial from '../components/content_sections/Commercial'; +import Hero from '../components/content_sections/Hero'; +import Partnerships from '../components/content_sections/Partnerships'; import styled from 'styled-components'; const LandingPageStyle = styled(FlexColumn)` diff --git a/src/pages/auth/Login.js b/src/pages/auth/Login.js index 0114ad4..3a18ed5 100644 --- a/src/pages/auth/Login.js +++ b/src/pages/auth/Login.js @@ -1,9 +1,9 @@ import React from 'react'; import {FlexColumn} from '../../utils/containers'; -import AuthHeader from '../../components/elements/AuthHeader'; +import AuthHeader from '../../components/auth/AuthHeader'; import {Body, Medium} from '../../utils/fonts'; import {Link} from 'react-router-dom'; -import AuthOption from '../../components/elements/AuthOption'; +import AuthOption from '../../components/auth/AuthOption'; import githubIco from '../../assets/github_ico.svg'; import emailIco from '../../assets/email_ico.svg'; import googleIco from '../../assets/google_ico.svg'; diff --git a/src/pages/auth/LoginWithEmail.js b/src/pages/auth/LoginWithEmail.js index a9c1567..da9a044 100644 --- a/src/pages/auth/LoginWithEmail.js +++ b/src/pages/auth/LoginWithEmail.js @@ -1,9 +1,9 @@ import React from 'react'; -import AuthHeader from '../../components/elements/AuthHeader'; +import AuthHeader from '../../components/auth/AuthHeader'; import OptionsContainerStyle from './styles/OptionsContainerStyle'; import MainContainerStyle from './styles/MainContainerStyle'; -import AuthInput from '../../components/elements/AuthInput'; -import Button from '../../components/elements/Button'; +import AuthInput from '../../components/auth/AuthInput'; +import Button from '../../components/generic/Button'; import {FlexRow} from '../../utils/containers'; import LinkStyle from './styles/LinkStyle'; import {Link} from 'react-router-dom'; diff --git a/src/pages/auth/Register.js b/src/pages/auth/Register.js index a516c05..27949b6 100644 --- a/src/pages/auth/Register.js +++ b/src/pages/auth/Register.js @@ -1,9 +1,9 @@ import React from 'react'; import {FlexColumn} from '../../utils/containers'; -import AuthHeader from '../../components/elements/AuthHeader'; +import AuthHeader from '../../components/auth/AuthHeader'; import {Body, Medium} from '../../utils/fonts'; import {Link} from 'react-router-dom'; -import AuthOption from '../../components/elements/AuthOption'; +import AuthOption from '../../components/auth/AuthOption'; import githubIco from '../../assets/github_ico.svg'; import emailIco from '../../assets/email_ico.svg'; import googleIco from '../../assets/google_ico.svg'; diff --git a/src/pages/auth/RegisterWithEmail.js b/src/pages/auth/RegisterWithEmail.js index 2f9ec0e..db47248 100644 --- a/src/pages/auth/RegisterWithEmail.js +++ b/src/pages/auth/RegisterWithEmail.js @@ -1,11 +1,11 @@ import React from 'react'; -import AuthHeader from '../../components/elements/AuthHeader'; +import AuthHeader from '../../components/auth/AuthHeader'; import OptionsContainerStyle from './styles/OptionsContainerStyle'; -import AuthInput from '../../components/elements/AuthInput'; +import AuthInput from '../../components/auth/AuthInput'; import Media from 'react-media'; import theme from '../../utils/theme'; import {FlexRow} from '../../utils/containers'; -import Button from '../../components/elements/Button'; +import Button from '../../components/generic/Button'; import MainContainerStyle from './styles/MainContainerStyle'; const RegisterWithEmail = () => {