Skip to content

Commit

Permalink
Merge pull request #145 from siesgstarena/minor-changes
Browse files Browse the repository at this point in the history
Fix dir structure
  • Loading branch information
SalmanAd01 authored Jan 27, 2023
2 parents 4976ee5 + a83107f commit 7fe0e0e
Show file tree
Hide file tree
Showing 25 changed files with 121 additions and 122 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { useContext } from 'react';
import '../Style.css';
import PropTypes from 'prop-types';
import { Button } from '@material/react-button';
import AceEditorContext from '../../../Contexts/AceEditorContext';
import AceEditorContext from '../../../../Contexts/AceEditorContext';

const Run = ({ loading, setLoading, lang, input, setMessageType, setMessage, setOutput }) => {
const { editorConfig } = useContext(AceEditorContext);
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ import Select from '@material/react-select';
import { Cell, Row } from '@material/react-layout-grid';
import React, { useState, useEffect } from 'react';
import { useLazyQuery } from '@apollo/client';
import AceEditorContext from '../../../Contexts/AceEditorContext';
import { languageOptions } from '../../drawer/contests/status/options';
import AceEditorContext from '../../../../Contexts/AceEditorContext';
import { languageOptions } from '../../../drawer/contests/status/options';
import languageDefaults from '../defaults/languages';
import Editor from '../index';
import Menu from '../menu';
import MessageCard from '../../common/MessageCard';
import { GET_EDITOR_SHARE } from '../../../graphql/queries';
import MessageCard from '../../MessageCard';
import { GET_EDITOR_SHARE } from '../../../../graphql/queries';
import Run from '../common/Run';
import Input from '../common/Input';
import Output from '../common/Output';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import 'ace-builds/src-noconflict/theme-github';
import 'ace-builds/src-noconflict/ext-language_tools';

import optionToextLanguages from './defaults/extLanguages';
import AceEditorContext from '../../Contexts/AceEditorContext';
import AceEditorContext from '../../../Contexts/AceEditorContext';

const Editor = () => {
const { editorConfig, setEditorConfig } = useContext(AceEditorContext);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ import MaterialIcon from '@material/react-material-icon';
import * as ace from 'ace-builds/src-noconflict/ace';
import { useApolloClient } from '@apollo/client';
import themes from '../defaults/themes';
import AceEditorContext from '../../../Contexts/AceEditorContext';
import { SAVE_CODE } from '../../../graphql/mutations';
import MessageCard from '../../common/MessageCard';
import AceEditorContext from '../../../../Contexts/AceEditorContext';
import { SAVE_CODE } from '../../../../graphql/mutations';
import MessageCard from '../../MessageCard';
import '../Style.css';

ace.config.set('basePath', '/assets/ui/');
Expand Down
14 changes: 7 additions & 7 deletions src/Components/drawer/contests/common/SubmitOnProblemPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@ import { languageOptions } from '../status/options';
import Uploading from '../submit/Uploading';
import useSessionExpired from '../../../../customHooks/useSessionExpired';
import AceEditorContext from '../../../../Contexts/AceEditorContext';
import Menu from '../../../editor/menu';
import Editor from '../../../editor';
import languageDefaults from '../../../editor/defaults/languages';
import Menu from '../../../common/Editor/menu';
import Editor from '../../../common/Editor';
import languageDefaults from '../../../common/Editor/defaults/languages';
import { GET_CONTEST_DASHBOARD } from '../../../../graphql/queries';
import Spinner from '../../../common/Spinner';
import SomethingWentWrong from '../../../common/SomethingWentWrong';
import Run from '../../../editor/common/Run';
import Input from '../../../editor/common/Input';
import Output from '../../../editor/common/Output';
import Run from '../../../common/Editor/common/Run';
import Input from '../../../common/Editor/common/Input';
import Output from '../../../common/Editor/common/Output';
import './Style.css';
import initialState from '../../../editor/defaults/initialState';
import initialState from '../../../common/Editor/defaults/initialState';

const SubmitOnProblemPage = ({ setEditorOpen }) => {
const isMobile = window.innerWidth <= 768;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const About = () => {
<Box className="ch1About">
<Headline2 className="titleAbout">What is Turing Cup?</Headline2>
<Typography className="contentAbout">
Named after Alan Turing, the Turing Cup is CodeChef SIESGSTs annual flagship
Named after Alan Turing, the Turing Cup is CodeChef SIESGST&apos;s annual flagship
competitive coding contest. A national level programming challenge, the contest
invites individual coders to crack challenging problem statements and come up with the
most intuitive and efficient solution possible - all in the given time frame
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const Footer = () => {
<Box id="footer">
<footer>
<Box className="footer-text d-flex align-items-center justify-content-center">
<a href="#">Turing Cup 2022</a>
<a href="#">Turing Cup 2023</a>
</Box>
<ul className="social-links">
<li>
Expand Down
File renamed without changes.
92 changes: 92 additions & 0 deletions src/Components/drawer/turingCup/Navbar.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
/* eslint-disable jsx-a11y/anchor-is-valid */
import React, { useEffect, useRef } from 'react';

const Navbar = () => {
useEffect(() => {
const btns = document.getElementsByClassName('nav-item');
for (let i = 0; i < btns.length; i += 1) {
btns[i].addEventListener('click', function handelNavLink() {
const current = document.getElementsByClassName('active');
current[0].className = current[0].className.replace('active', 'nav-link');
// eslint-disable-next-line react/no-this-in-sfc
this.children[0].className = 'active btn-sm px-3';
});
}
});
const navRef = useRef(null);

function toggleNav() {
document.querySelector('.navbar-collapse').classList.toggle('show');
}
window.onscroll = () => {
if (window.scrollY > 0) {
navRef.current.classList.add('navbar-shadow');
} else {
navRef.current.classList.remove('navbar-shadow');
}
if (window.scrollY > 500) {
navRef.current.classList.remove('navbar-light');
navRef.current.classList.add('navbar-dark');
navRef.current.classList.add('navbar-shadow');
} else {
navRef.current.classList.remove('navbar-dark');
navRef.current.classList.add('navbar-light');
navRef.current.classList.add('navbar-shadow');
}
};
return (
<nav
className="relative navbar navbar-expand-md fixed-top flex justify-between items-center py-6 z-10 navbar-light navbar-shadow"
ref={navRef}
>
<div className="relative container px-4 mx-auto">
<a className="navbar-brand" href="#">
Turing Cup
</a>
<button
className="navbar-toggler"
onClick={toggleNav}
type="button"
data-bs-toggle="collapse"
data-bs-target="#navbarCollapse"
aria-controls="navbarCollapse"
aria-expanded="false"
aria-label="Toggle navigation"
>
<span className="navbar-toggler-icon" />
</button>
<div className="collapse navbar-collapse" id="navbarCollapse">
<ul className="navbar-nav ml-auto mb-2 mb-md-0 align-items-center justify-content-end justify-content-md-between">
<li className="nav-item">
<a className="active btn-sm px-3" aria-current="page" href="#about">
About
</a>
</li>
<li className="nav-item">
<a className="nav-link" aria-current="page" href="#schedule">
Schedule
</a>
</li>
<li className="nav-item">
<a className="nav-link" aria-current="page" href="#registration">
Registration
</a>
</li>
<li className="nav-item">
<a className="nav-link" aria-current="page" href="#faq">
FAQ
</a>
</li>
<li className="nav-item">
<a className="nav-link" aria-current="page" href="#contact">
Contact
</a>
</li>
</ul>
</div>
</div>
</nav>
);
};

export default Navbar;
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@import url('https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css');
* {
box-sizing: border-box !important;
margin: 0;
Expand All @@ -21,6 +22,9 @@ input::-webkit-inner-spin-button {
input[type='number'] {
-moz-appearance: textfield;
}
.main-container-body {
background: linear-gradient(81.4deg, #000000 0.86%, #202e44 127.88%);
}
.navbar-light {
background-color: #fff;
color: #1b1f3a;
Expand Down Expand Up @@ -197,7 +201,10 @@ input[type='number'] {
justify-content: space-around;
color: rgba(0, 0, 0, 0.32);
}

.lead {
font-size: 1.25rem !important;
font-weight: 300;
}
.lottie-player {
position: absolute;
max-height: 200px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import './Style.css';

const index = () => {
return (
<Box style={{ background: 'linear-gradient(81.4deg, #000000 0.86%, #202E44 127.88%)' }}>
<Box className="main-container-body">
<Navbar />
<Hero />
<About />
Expand Down
100 changes: 0 additions & 100 deletions src/Components/turingcup/Navbar.jsx

This file was deleted.

4 changes: 2 additions & 2 deletions src/Routes.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const ContestSubmissionPage = lazy(() =>
);
const Ratings = lazy(() => import('./Components/drawer/ratings/index'));
const Learn = lazy(() => import('./Components/drawer/learn/index'));
const TuringCup = lazy(() => import('./Components/turingcup/index'));
const TuringCup = lazy(() => import('./Components/drawer/turingCup/index'));
const BlogsList = lazy(() => import('./Components/drawer/blogs/blogsList/index'));
const BlogPage = lazy(() => import('./Components/drawer/blogs/blogPage/index'));
const HomePage = lazy(() => import('./Components/homePage'));
Expand Down Expand Up @@ -104,7 +104,7 @@ const SuperuserAnnouncementsContainer = lazy(() =>
);
const SuperuserManage = lazy(() => import('./Components/superuser/manageSuperusers/index'));
const PageNotFound = lazy(() => import('./Components/common/PageNotFound/index'));
const Editor = lazy(() => import('./Components/editor/global/index'));
const Editor = lazy(() => import('./Components/common/Editor/global/index'));
const Routes = () => {
const path = window.location.pathname;
const { loading, error, data } = useQuery(GET_LOGGED_IN_USER);
Expand Down

0 comments on commit 7fe0e0e

Please sign in to comment.