new components structure
This commit is contained in:
parent
77870ab1a1
commit
2a9215c365
@ -3,7 +3,7 @@ import theme from './utils/theme';
|
|||||||
import LandingPage from './pages/LandingPage';
|
import LandingPage from './pages/LandingPage';
|
||||||
import Challenges from './pages/Challanges/Challenges';
|
import Challenges from './pages/Challanges/Challenges';
|
||||||
import {BrowserRouter, Route, Routes} from 'react-router-dom';
|
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_PAGE, CHALLENGES_PAGE, IS_MOBILE} from './utils/globals';
|
||||||
import Challenge from './pages/Challenge';
|
import Challenge from './pages/Challenge';
|
||||||
import Register from './pages/auth/Register';
|
import Register from './pages/auth/Register';
|
||||||
@ -12,9 +12,9 @@ import LoginWithEmail from './pages/auth/LoginWithEmail';
|
|||||||
import RegisterWithEmail from './pages/auth/RegisterWithEmail';
|
import RegisterWithEmail from './pages/auth/RegisterWithEmail';
|
||||||
import KeyCloakService from './services/KeyCloakService';
|
import KeyCloakService from './services/KeyCloakService';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import LoggedBar from './components/elements/LoggedBar';
|
import LoggedBar from './components/navigation/LoggedBar';
|
||||||
import addUser from './api/addUser';
|
import addUser from './api/addUser';
|
||||||
import Loading from './components/elements/Loading';
|
import Loading from './components/generic/Loading';
|
||||||
import {FlexColumn} from './utils/containers';
|
import {FlexColumn} from './utils/containers';
|
||||||
|
|
||||||
const App = () => {
|
const App = () => {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import {FlexColumn, Grid, Svg} from '../../utils/containers';
|
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 {Body, H3, Medium} from '../../utils/fonts';
|
||||||
import arrow from '../../assets/arrow.svg';
|
import arrow from '../../assets/arrow.svg';
|
||||||
import Media from 'react-media';
|
import Media from 'react-media';
|
@ -1,9 +1,9 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import {FlexColumn, FlexRow, TransBack} from '../../../utils/containers';
|
import {FlexColumn, FlexRow, TransBack} from '../../../utils/containers';
|
||||||
import Button from '../Button';
|
import Button from '../../generic/Button';
|
||||||
import theme from '../../../utils/theme';
|
import theme from '../../../utils/theme';
|
||||||
import styled from 'styled-components';
|
import styled from 'styled-components';
|
||||||
import FilterBy from '../../sections/FilterBy';
|
import FilterBy from '../FilterBy';
|
||||||
import filterOptions from './filterOptions';
|
import filterOptions from './filterOptions';
|
||||||
import Media from 'react-media';
|
import Media from 'react-media';
|
||||||
import PropsTypes from 'prop-types';
|
import PropsTypes from 'prop-types';
|
@ -2,7 +2,7 @@ import React from 'react';
|
|||||||
import {Container, FlexColumn, FlexRow, Grid} from '../../utils/containers';
|
import {Container, FlexColumn, FlexRow, Grid} from '../../utils/containers';
|
||||||
import {Body, H3} from '../../utils/fonts';
|
import {Body, H3} from '../../utils/fonts';
|
||||||
import styled from 'styled-components';
|
import styled from 'styled-components';
|
||||||
import IconLabel from '../elements/IconLabel';
|
import IconLabel from '../generic/IconLabel';
|
||||||
import {Link} from 'react-router-dom';
|
import {Link} from 'react-router-dom';
|
||||||
import {CHALLENGE_PAGE, MINI_DESCRIPTION_RENDER} from '../../utils/globals';
|
import {CHALLENGE_PAGE, MINI_DESCRIPTION_RENDER} from '../../utils/globals';
|
||||||
import theme from '../../utils/theme';
|
import theme from '../../utils/theme';
|
@ -1,7 +1,7 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import {FlexColumn, FlexRow, ImageBackground} from '../../utils/containers';
|
import {FlexColumn, FlexRow, ImageBackground} from '../../utils/containers';
|
||||||
import {Body, H2, Medium} from '../../utils/fonts';
|
import {Body, H2, Medium} from '../../utils/fonts';
|
||||||
import CircleNumber from '../elements/CircleNumber';
|
import CircleNumber from '../generic/CircleNumber';
|
||||||
import Media from 'react-media';
|
import Media from 'react-media';
|
||||||
import theme from '../../utils/theme';
|
import theme from '../../utils/theme';
|
||||||
import commercialImage from '../../assets/commercial-image.svg';
|
import commercialImage from '../../assets/commercial-image.svg';
|
@ -2,7 +2,7 @@ import React from 'react';
|
|||||||
import {Body, H1, Medium} from '../../utils/fonts';
|
import {Body, H1, Medium} from '../../utils/fonts';
|
||||||
import {Container, FlexColumn, FlexRow, Svg} from '../../utils/containers';
|
import {Container, FlexColumn, FlexRow, Svg} from '../../utils/containers';
|
||||||
import theme from '../../utils/theme';
|
import theme from '../../utils/theme';
|
||||||
import ButtonLink from '../elements/ButtonLink';
|
import ButtonLink from '../generic/ButtonLink';
|
||||||
import Media from 'react-media';
|
import Media from 'react-media';
|
||||||
import codepenIco from '../../assets/codepen_ico.svg';
|
import codepenIco from '../../assets/codepen_ico.svg';
|
||||||
import styled from 'styled-components';
|
import styled from 'styled-components';
|
@ -1,7 +1,7 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import {FlexColumn, Grid} from '../../utils/containers';
|
import {FlexColumn, Grid} from '../../utils/containers';
|
||||||
import {H2} from '../../utils/fonts';
|
import {H2} from '../../utils/fonts';
|
||||||
import Placeholder from '../elements/Placeholder';
|
import Placeholder from '../generic/Placeholder';
|
||||||
import styled from 'styled-components';
|
import styled from 'styled-components';
|
||||||
|
|
||||||
const PartnershipsStyle = styled(FlexColumn)`
|
const PartnershipsStyle = styled(FlexColumn)`
|
@ -1,6 +1,6 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import {Container, FlexRow, Svg} from '../../../utils/containers';
|
import {Container, FlexRow, Svg} from '../../../utils/containers';
|
||||||
import Logo from '../Logo';
|
import Logo from '../../generic/Logo';
|
||||||
import styled from 'styled-components';
|
import styled from 'styled-components';
|
||||||
import menuButtonIcon from '../../../assets/menu-button.svg';
|
import menuButtonIcon from '../../../assets/menu-button.svg';
|
||||||
import MobileNavMenu from '../MobileNavMenu';
|
import MobileNavMenu from '../MobileNavMenu';
|
@ -1,8 +1,8 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import {FlexColumn, FlexRow, Grid, Svg} from '../../utils/containers';
|
import {FlexColumn, FlexRow, Grid, Svg} from '../../utils/containers';
|
||||||
import {Body, H2, H3, Medium} from '../../utils/fonts';
|
import {Body, H2, H3, Medium} from '../../utils/fonts';
|
||||||
import CircleNumber from '../elements/CircleNumber';
|
import CircleNumber from '../generic/CircleNumber';
|
||||||
import CodeShell from '../elements/CodeShell';
|
import CodeShell from '../generic/CodeShell';
|
||||||
import cubeIcon from '../../assets/cube_ico.svg';
|
import cubeIcon from '../../assets/cube_ico.svg';
|
||||||
import theme from '../../utils/theme';
|
import theme from '../../utils/theme';
|
||||||
import {IS_MOBILE} from '../../utils/globals';
|
import {IS_MOBILE} from '../../utils/globals';
|
@ -3,14 +3,14 @@ import Media from 'react-media';
|
|||||||
import theme from '../../../utils/theme';
|
import theme from '../../../utils/theme';
|
||||||
import {FlexColumn} from '../../../utils/containers';
|
import {FlexColumn} from '../../../utils/containers';
|
||||||
import {H2} from '../../../utils/fonts';
|
import {H2} from '../../../utils/fonts';
|
||||||
import Table from '../../elements/Table';
|
import Table from '../Table';
|
||||||
import PropsTypes from 'prop-types';
|
import PropsTypes from 'prop-types';
|
||||||
import getChallengeLeaderboard from '../../../api/getChallengeLeaderboard';
|
import getChallengeLeaderboard from '../../../api/getChallengeLeaderboard';
|
||||||
import _tableSearchQueryHandler from './_tableSearchQueryHandler';
|
import _tableSearchQueryHandler from './_tableSearchQueryHandler';
|
||||||
import {CALC_PAGES, EVALUATIONS_FORMAT, RENDER_WHEN} from '../../../utils/globals';
|
import {CALC_PAGES, EVALUATIONS_FORMAT, RENDER_WHEN} from '../../../utils/globals';
|
||||||
import Search from '../../elements/Search';
|
import Search from '../../generic/Search';
|
||||||
import Pager from '../../elements/Pager';
|
import Pager from '../../generic/Pager';
|
||||||
import Loading from '../../elements/Loading';
|
import Loading from '../../generic/Loading';
|
||||||
|
|
||||||
const Leaderboard = (props) => {
|
const Leaderboard = (props) => {
|
||||||
const [entriesFromApi, setEntriesFromApi] = React.useState([]);
|
const [entriesFromApi, setEntriesFromApi] = React.useState([]);
|
@ -2,13 +2,13 @@ import React from 'react';
|
|||||||
import {FlexColumn} from '../../utils/containers';
|
import {FlexColumn} from '../../utils/containers';
|
||||||
import {H2} from '../../utils/fonts';
|
import {H2} from '../../utils/fonts';
|
||||||
import getMyEntries from '../../api/getMyEntries';
|
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 {CALC_PAGES, EVALUATIONS_FORMAT, RENDER_WHEN} from '../../utils/globals';
|
||||||
import Media from 'react-media';
|
import Media from 'react-media';
|
||||||
import theme from '../../utils/theme';
|
import theme from '../../utils/theme';
|
||||||
import _tableSearchQueryHandler from './Leaderboard/_tableSearchQueryHandler';
|
import _tableSearchQueryHandler from './Leaderboard/_tableSearchQueryHandler';
|
||||||
import Loading from '../elements/Loading';
|
import Loading from '../generic/Loading';
|
||||||
import Table from '../elements/Table';
|
import Table from './Table';
|
||||||
|
|
||||||
const MyEntries = (props) => {
|
const MyEntries = (props) => {
|
||||||
const [myEntriesFromAPI, setMyEntriesFromAPI] = React.useState({});
|
const [myEntriesFromAPI, setMyEntriesFromAPI] = React.useState({});
|
@ -6,10 +6,10 @@ import theme from '../../utils/theme';
|
|||||||
import getChallengeFullDescription from '../../api/getChallengeFullDescription';
|
import getChallengeFullDescription from '../../api/getChallengeFullDescription';
|
||||||
import {markdown} from 'markdown';
|
import {markdown} from 'markdown';
|
||||||
import styled from 'styled-components';
|
import styled from 'styled-components';
|
||||||
import InfoList from '../elements/InfoList';
|
import InfoList from '../generic/InfoList';
|
||||||
import Loading from '../elements/Loading';
|
import Loading from '../generic/Loading';
|
||||||
import PropsTypes from 'prop-types';
|
import PropsTypes from 'prop-types';
|
||||||
import MiniChallenge from './MiniChallenge';
|
import MiniChallenge from '../challenges_list/MiniChallenge';
|
||||||
|
|
||||||
const ReadmeStyle = styled(Body)`
|
const ReadmeStyle = styled(Body)`
|
||||||
h3 {
|
h3 {
|
@ -1,8 +1,8 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import {FlexColumn} from '../../utils/containers';
|
import {FlexColumn} from '../../utils/containers';
|
||||||
import {H2, Menu} from '../../utils/fonts';
|
import {H2, Menu} from '../../utils/fonts';
|
||||||
import SubmitInput from '../elements/SubmitInput';
|
import SubmitInput from '../generic/SubmitInput';
|
||||||
import Button from '../elements/Button';
|
import Button from '../generic/Button';
|
||||||
import theme from '../../utils/theme';
|
import theme from '../../utils/theme';
|
||||||
import challengeSubmission from '../../api/challengeSubmissionPost';
|
import challengeSubmission from '../../api/challengeSubmissionPost';
|
||||||
|
|
4
src/normalize.css
vendored
4
src/normalize.css
vendored
@ -42,7 +42,7 @@ h1 {
|
|||||||
margin: 0.67em 0;
|
margin: 0.67em 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Grouping content
|
/* Grouping content_sections
|
||||||
========================================================================== */
|
========================================================================== */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -138,7 +138,7 @@ sup {
|
|||||||
top: -0.5em;
|
top: -0.5em;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Embedded content
|
/* Embedded content_sections
|
||||||
========================================================================== */
|
========================================================================== */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import {Body, H1} from '../../utils/fonts';
|
import {Body, H1} from '../../utils/fonts';
|
||||||
import {FlexColumn, FlexRow, Svg} from '../../utils/containers';
|
import {FlexColumn, FlexRow, Svg} from '../../utils/containers';
|
||||||
import Search from '../../components/elements/Search';
|
import Search from '../../components/generic/Search';
|
||||||
import Pager from '../../components/elements/Pager';
|
import Pager from '../../components/generic/Pager';
|
||||||
import FiltersMenu from '../../components/elements/FiltersMenu';
|
import FiltersMenu from '../../components/challenges_list/FiltersMenu';
|
||||||
import _searchQueryHandler from './_searchQueryHandler';
|
import _searchQueryHandler from './_searchQueryHandler';
|
||||||
import _renderChallenges from './_renderChallenges';
|
import _renderChallenges from './_renderChallenges';
|
||||||
import Media from 'react-media';
|
import Media from 'react-media';
|
||||||
@ -11,7 +11,7 @@ import theme from '../../utils/theme';
|
|||||||
import cupIco from '../../assets/cup_ico.svg';
|
import cupIco from '../../assets/cup_ico.svg';
|
||||||
import getChallenges from '../../api/getChallenges';
|
import getChallenges from '../../api/getChallenges';
|
||||||
import {CALC_PAGES} from '../../utils/globals';
|
import {CALC_PAGES} from '../../utils/globals';
|
||||||
import Loading from '../../components/elements/Loading';
|
import Loading from '../../components/generic/Loading';
|
||||||
|
|
||||||
const Challenges = () => {
|
const Challenges = () => {
|
||||||
const [pageNr, setPageNr] = React.useState(1);
|
const [pageNr, setPageNr] = React.useState(1);
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import {ELEMENTS_PER_PAGE} from '../../utils/globals';
|
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 {Grid} from '../../utils/containers';
|
||||||
import styled from 'styled-components';
|
import styled from 'styled-components';
|
||||||
|
|
||||||
|
@ -3,18 +3,18 @@ import {Container, FlexColumn, FlexRow, Svg} from '../utils/containers';
|
|||||||
import {useParams} from 'react-router-dom';
|
import {useParams} from 'react-router-dom';
|
||||||
import {H1, Medium} from '../utils/fonts';
|
import {H1, Medium} from '../utils/fonts';
|
||||||
import theme from '../utils/theme';
|
import theme from '../utils/theme';
|
||||||
import MobileChallengeMenu from '../components/elements/MobileChallengeMenu';
|
import MobileChallengeMenu from '../components/specific_challenge/MobileChallengeMenu';
|
||||||
import Leaderboard from '../components/sections/Leaderboard/Leaderboard';
|
import Leaderboard from '../components/specific_challenge/Leaderboard/Leaderboard';
|
||||||
import Readme from '../components/sections/Readme';
|
import Readme from '../components/specific_challenge/Readme';
|
||||||
import HowTo from '../components/sections/HowTo';
|
import HowTo from '../components/specific_challenge/HowTo';
|
||||||
import MyEntries from '../components/sections/MyEntries';
|
import MyEntries from '../components/specific_challenge/MyEntries';
|
||||||
import Submit from '../components/sections/Submit';
|
import Submit from '../components/specific_challenge/Submit';
|
||||||
import Media from 'react-media';
|
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 {RENDER_ICO} from '../utils/globals';
|
||||||
import textIco from '../assets/text_ico.svg';
|
import textIco from '../assets/text_ico.svg';
|
||||||
import getChallengeInfo from '../api/getChallengeInfo';
|
import getChallengeInfo from '../api/getChallengeInfo';
|
||||||
import Loading from '../components/elements/Loading';
|
import Loading from '../components/generic/Loading';
|
||||||
|
|
||||||
const Challenge = () => {
|
const Challenge = () => {
|
||||||
const challengeName = useParams().challengeId;
|
const challengeName = useParams().challengeId;
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import {FlexColumn} from '../utils/containers';
|
import {FlexColumn} from '../utils/containers';
|
||||||
import Motivation from '../components/sections/Motivation';
|
import Motivation from '../components/content_sections/Motivation';
|
||||||
import Csi from '../components/sections/Csi';
|
import Csi from '../components/content_sections/Csi';
|
||||||
import Commercial from '../components/sections/Commercial';
|
import Commercial from '../components/content_sections/Commercial';
|
||||||
import Hero from '../components/sections/Hero';
|
import Hero from '../components/content_sections/Hero';
|
||||||
import Partnerships from '../components/sections/Partnerships';
|
import Partnerships from '../components/content_sections/Partnerships';
|
||||||
import styled from 'styled-components';
|
import styled from 'styled-components';
|
||||||
|
|
||||||
const LandingPageStyle = styled(FlexColumn)`
|
const LandingPageStyle = styled(FlexColumn)`
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import {FlexColumn} from '../../utils/containers';
|
import {FlexColumn} from '../../utils/containers';
|
||||||
import AuthHeader from '../../components/elements/AuthHeader';
|
import AuthHeader from '../../components/auth/AuthHeader';
|
||||||
import {Body, Medium} from '../../utils/fonts';
|
import {Body, Medium} from '../../utils/fonts';
|
||||||
import {Link} from 'react-router-dom';
|
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 githubIco from '../../assets/github_ico.svg';
|
||||||
import emailIco from '../../assets/email_ico.svg';
|
import emailIco from '../../assets/email_ico.svg';
|
||||||
import googleIco from '../../assets/google_ico.svg';
|
import googleIco from '../../assets/google_ico.svg';
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import AuthHeader from '../../components/elements/AuthHeader';
|
import AuthHeader from '../../components/auth/AuthHeader';
|
||||||
import OptionsContainerStyle from './styles/OptionsContainerStyle';
|
import OptionsContainerStyle from './styles/OptionsContainerStyle';
|
||||||
import MainContainerStyle from './styles/MainContainerStyle';
|
import MainContainerStyle from './styles/MainContainerStyle';
|
||||||
import AuthInput from '../../components/elements/AuthInput';
|
import AuthInput from '../../components/auth/AuthInput';
|
||||||
import Button from '../../components/elements/Button';
|
import Button from '../../components/generic/Button';
|
||||||
import {FlexRow} from '../../utils/containers';
|
import {FlexRow} from '../../utils/containers';
|
||||||
import LinkStyle from './styles/LinkStyle';
|
import LinkStyle from './styles/LinkStyle';
|
||||||
import {Link} from 'react-router-dom';
|
import {Link} from 'react-router-dom';
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import {FlexColumn} from '../../utils/containers';
|
import {FlexColumn} from '../../utils/containers';
|
||||||
import AuthHeader from '../../components/elements/AuthHeader';
|
import AuthHeader from '../../components/auth/AuthHeader';
|
||||||
import {Body, Medium} from '../../utils/fonts';
|
import {Body, Medium} from '../../utils/fonts';
|
||||||
import {Link} from 'react-router-dom';
|
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 githubIco from '../../assets/github_ico.svg';
|
||||||
import emailIco from '../../assets/email_ico.svg';
|
import emailIco from '../../assets/email_ico.svg';
|
||||||
import googleIco from '../../assets/google_ico.svg';
|
import googleIco from '../../assets/google_ico.svg';
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import AuthHeader from '../../components/elements/AuthHeader';
|
import AuthHeader from '../../components/auth/AuthHeader';
|
||||||
import OptionsContainerStyle from './styles/OptionsContainerStyle';
|
import OptionsContainerStyle from './styles/OptionsContainerStyle';
|
||||||
import AuthInput from '../../components/elements/AuthInput';
|
import AuthInput from '../../components/auth/AuthInput';
|
||||||
import Media from 'react-media';
|
import Media from 'react-media';
|
||||||
import theme from '../../utils/theme';
|
import theme from '../../utils/theme';
|
||||||
import {FlexRow} from '../../utils/containers';
|
import {FlexRow} from '../../utils/containers';
|
||||||
import Button from '../../components/elements/Button';
|
import Button from '../../components/generic/Button';
|
||||||
import MainContainerStyle from './styles/MainContainerStyle';
|
import MainContainerStyle from './styles/MainContainerStyle';
|
||||||
|
|
||||||
const RegisterWithEmail = () => {
|
const RegisterWithEmail = () => {
|
||||||
|
Loading…
Reference in New Issue
Block a user