From 061d9dee6e7b02d7823d25f83e0120d15dd6c4c9 Mon Sep 17 00:00:00 2001 From: suhascv Date: Wed, 27 Jan 2021 13:47:11 -0500 Subject: [PATCH 01/51] init --- .gitignore | 27 ++++ .gitlab-ci.yml | 16 +++ README.md | 30 ++++ package.json | 45 ++++++ public/img_favicon.ico | Bin 0 -> 1406 bytes public/index.html | 68 +++++++++ src/App.js | 42 ++++++ src/App.scss | 24 ++++ src/App.test.js | 8 ++ src/components/Footer.scss | 3 + src/components/Navigation.scss | 143 +++++++++++++++++++ src/components/about/About.scss | 28 ++++ src/components/about/about.js | 16 +++ src/components/about/about.json | 0 src/components/calendar/Calendar.scss | 150 ++++++++++++++++++++ src/components/calendar/calendarEvents.json | 62 ++++++++ src/components/calendar/openCalendar.js | 96 +++++++++++++ src/components/components.scss | 1 + src/components/footer.js | 1 + src/components/home/Home.scss | 90 ++++++++++++ src/components/home/Intro.scss | 24 ++++ src/components/home/home.js | 49 +++++++ src/components/home/homeRoutes.json | 18 +++ src/components/home/intro.js | 12 ++ src/components/home/introduction.json | 3 + src/components/navigation.js | 124 ++++++++++++++++ src/constants.scss | 19 +++ src/data/navagations.json | 29 ++++ src/images/logo.png | Bin 0 -> 9226 bytes src/index.css | 13 ++ src/index.js | 17 +++ 31 files changed, 1158 insertions(+) create mode 100644 .gitignore create mode 100644 .gitlab-ci.yml create mode 100644 README.md create mode 100644 package.json create mode 100644 public/img_favicon.ico create mode 100644 public/index.html create mode 100644 src/App.js create mode 100644 src/App.scss create mode 100644 src/App.test.js create mode 100644 src/components/Footer.scss create mode 100644 src/components/Navigation.scss create mode 100644 src/components/about/About.scss create mode 100644 src/components/about/about.js create mode 100644 src/components/about/about.json create mode 100644 src/components/calendar/Calendar.scss create mode 100644 src/components/calendar/calendarEvents.json create mode 100644 src/components/calendar/openCalendar.js create mode 100644 src/components/components.scss create mode 100644 src/components/footer.js create mode 100644 src/components/home/Home.scss create mode 100644 src/components/home/Intro.scss create mode 100644 src/components/home/home.js create mode 100644 src/components/home/homeRoutes.json create mode 100644 src/components/home/intro.js create mode 100644 src/components/home/introduction.json create mode 100644 src/components/navigation.js create mode 100644 src/constants.scss create mode 100644 src/data/navagations.json create mode 100644 src/images/logo.png create mode 100644 src/index.css create mode 100644 src/index.js diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..45f77da --- /dev/null +++ b/.gitignore @@ -0,0 +1,27 @@ +# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. + +# dependencies +/node_modules +/.pnp +.pnp.js + +# testing +/coverage + +# production +/build + +# misc +.DS_Store +.env.local +.env.development.local +.env.test.local +.env.production.local +.eslintcache + +npm-debug.log* +yarn-debug.log* +yarn-error.log* +node_modules +package-lock.json + diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..e4dcffe --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,16 @@ +stages: + - build + +build: + stage: build + image: node:15.4.0 + script: + - echo "Start building App" + - npm install + - npm build + - echo "Build successfully!" + artifacts: + expire_in: 1 hour + paths: + - build + - node_modules/ diff --git a/README.md b/README.md new file mode 100644 index 0000000..3d36d0f --- /dev/null +++ b/README.md @@ -0,0 +1,30 @@ +# Open@RIT + +## Available Scripts + +In the project directory, you can run: + +### `npm start` + +Runs the app in the development mode.\ +Open [http://localhost:3000](http://localhost:3000) to view it in the browser. + +The page will reload if you make edits.\ +You will also see any lint errors in the console. + +### `npm test` + +Launches the test runner in the interactive watch mode.\ +See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. + +### `npm run build` + +Builds the app for production to the `build` folder.\ +It correctly bundles React in production mode and optimizes the build for the best performance. + +The build is minified and the filenames include the hashes.\ +Your app is ready to be deployed! + +See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. + + diff --git a/package.json b/package.json new file mode 100644 index 0000000..c1eb682 --- /dev/null +++ b/package.json @@ -0,0 +1,45 @@ +{ + "name": "open-rit", + "version": "0.1.0", + "private": true, + "dependencies": { + "@fullcalendar/react": "^5.5.0", + "@fullcalendar/resource-daygrid": "^5.5.0", + "@material-ui/core": "^4.11.3", + "@testing-library/jest-dom": "^5.11.9", + "@testing-library/react": "^11.2.3", + "@testing-library/user-event": "^12.6.2", + "node-sass": "^4.14.1", + "react": "^17.0.1", + "react-calendar": "^3.3.0", + "react-dom": "^17.0.1", + "react-router-dom": "^5.2.0", + "react-scripts": "4.0.1", + "react-tooltip": "^4.2.13", + "web-vitals": "^0.2.4" + }, + "scripts": { + "start": "react-scripts start", + "build": "react-scripts build", + "test": "react-scripts test", + "eject": "react-scripts eject" + }, + "eslintConfig": { + "extends": [ + "react-app", + "react-app/jest" + ] + }, + "browserslist": { + "production": [ + ">0.2%", + "not dead", + "not op_mini all" + ], + "development": [ + "last 1 chrome version", + "last 1 firefox version", + "last 1 safari version" + ] + } +} diff --git a/public/img_favicon.ico b/public/img_favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..a99df849f3bd5b3590e53c119a44912dbee0251b GIT binary patch literal 1406 zcmZQzU<5(|0R|w+!H~hqz#zuJz@P!dKp_SNAO?xUfG{@$0|)~J!9X$ZGsFM?{}~J_ zzA$|H_K(50`zynd8-EzG=Y3~*`}rS3=cbWBB>|KZAYa zSB7<`e#49%rAI?xGz5la2(WQ7Gjp;qFmW@pvw%Iw#K_3Rz`)7~ENLKs5m=URFmeM0 z;d~ZGW{6^t2v9v2BO6o_%x7n0g{ub1Gw|^<^S~8=%wu9?M&Sb$!3~7S!}&n>fb8dj zs%K*a0bYJ23*aVUV+dbhU@-Z>z>ru1lm%M4^Z)}xQv(BoodW}d_7k8OJ|F@B>tQb- literal 0 HcmV?d00001 diff --git a/public/index.html b/public/index.html new file mode 100644 index 0000000..0baa00a --- /dev/null +++ b/public/index.html @@ -0,0 +1,68 @@ + + + + + + + + + + + + + + Open@RIT + + + + +
+ +
+ + + + + + diff --git a/src/App.js b/src/App.js new file mode 100644 index 0000000..4c1ac52 --- /dev/null +++ b/src/App.js @@ -0,0 +1,42 @@ +import './App.scss'; +import Navigation from './components/navigation.js'; +import About from './components/about/about.js'; +import Home from './components/home/home.js'; +import OpenCalendar from'./components/calendar/openCalendar.js'; + +import { + BrowserRouter as Router, + Switch, + Route +} from "react-router-dom"; + + + +function App() { + return ( +
+ + +
+ + + + + + + + + + + + + + + +
+ +
+ ); +} + +export default App; diff --git a/src/App.scss b/src/App.scss new file mode 100644 index 0000000..46baa99 --- /dev/null +++ b/src/App.scss @@ -0,0 +1,24 @@ +@import './constants.scss'; + +*{ + box-sizing: border-box; + font-family: sans-serif; + overflow-x: hidden; + +} + +.App { + text-align: center; + +} + + +main{ + + background-color:var(--color-light); + padding-top:50px; + transition: ease-in 2s; + min-height: 100vh; + padding-left:0; +} + diff --git a/src/App.test.js b/src/App.test.js new file mode 100644 index 0000000..1f03afe --- /dev/null +++ b/src/App.test.js @@ -0,0 +1,8 @@ +import { render, screen } from '@testing-library/react'; +import App from './App'; + +test('renders learn react link', () => { + render(); + const linkElement = screen.getByText(/learn react/i); + expect(linkElement).toBeInTheDocument(); +}); diff --git a/src/components/Footer.scss b/src/components/Footer.scss new file mode 100644 index 0000000..10f0076 --- /dev/null +++ b/src/components/Footer.scss @@ -0,0 +1,3 @@ +footer{ + +} \ No newline at end of file diff --git a/src/components/Navigation.scss b/src/components/Navigation.scss new file mode 100644 index 0000000..bbda755 --- /dev/null +++ b/src/components/Navigation.scss @@ -0,0 +1,143 @@ + +@import '../constants.scss'; + + +.navbar{ + display: flex; + flex-direction: column; + height: auto; + background-color: var(--color-light); + #mobile-only-options{ + display: flex; + position: fixed; + top:66px; + padding-top: 10px; + height: auto; + width:100%; + padding:5px 15px; + flex-direction: column; + justify-content:flex-start; + align-items: flex-start; + background-color: var(--color-light); + z-index: 3; + flex-wrap: wrap; + transition: ease-in 2s; + + + a{ + font-size: 1.4rem; + font-weight: 200; + color:var(--color-grey); + cursor: pointer; + text-decoration: none; + color:var(--color-grey); + &:hover{ + color: black; + } + margin-bottom:10px; + } + + } +} + +.navigation{ + position:fixed; + z-index: 4; + top:0; + left:0; + padding:15px 20px; + padding-bottom:25px; + display: inline-flex; + justify-content: flex-start; + align-items: center; + width:100%; + height:auto; + background-color:var(--color-light); + + + .web-only-options{ + display:inline-flex; + margin-left:20px; + a{ + margin-left:20px; + font-size: 1rem; + font-weight: 500; + text-decoration: none; + color:var(--color-grey); + + &:hover{ + color: black; + + } + + } + + + + + } + + #mobile-only-bar{ + margin-left:auto; + + span{ + display: block; + width:30px; + height:3px; + background-color:var(--color-grey); + &:not(:last-child){ + margin-bottom:6px; + } + + cursor: pointer; + + + } + + &.cross{ + transform: scale(1.6); + + span{ + + &:first-child{ + transform: rotate(45deg); + } + &:nth-child(2n){ + display: none; + } + &:last-child{ + transform: rotate(-45deg); + } + } + } + } + + .logo{ + width:225px; + cursor: pointer; + .image{ + width:100%; + height:100%; + } + } + +} + + +#mobile-only-options,#mobile-only-bar{ + display: none; +} + + +@media(max-width:750px){ +#web-only-options{ + display:none; +} + +#mobile-only-bar{ + display: block; +} +#mobile-only-options{ + display:flex; +} +} \ No newline at end of file diff --git a/src/components/about/About.scss b/src/components/about/About.scss new file mode 100644 index 0000000..eb9f00f --- /dev/null +++ b/src/components/about/About.scss @@ -0,0 +1,28 @@ +@import '../components.scss'; + +.about{ + margin-top: auto; + text-align: left; + + + article{ + + .about-text{ + + background-color: white; + padding: 20px; + border:1px solid rgba(0,0,0,.125); + h1{ + color: black; + font-family: 'overpass' sans-serif; + font-size: 2.5rem; + font-weight: 500; + } + p{ + font-family: 'Roboto' sans-serif; + line-height: 1.5; + font-weight: 400; + } + } +} +} \ No newline at end of file diff --git a/src/components/about/about.js b/src/components/about/about.js new file mode 100644 index 0000000..75e1262 --- /dev/null +++ b/src/components/about/about.js @@ -0,0 +1,16 @@ +import './About.scss'; + + +export default function About(){ + return(
+
+
+
+

About

+

Open@RIT is dedicated to fostering the collaborative engine of Open across the University for Faculty, Staff and Students. Its goals are to discover, and grow, the footprint of RIT’s impact on all things Open including, but not limited to, Open Source Software, Open Data, Open Hardware, Open Educational Resources and Creative Commons licensed efforts, what we like to refer to in aggregate as Open Work.

+

+
+
+
+
) +} \ No newline at end of file diff --git a/src/components/about/about.json b/src/components/about/about.json new file mode 100644 index 0000000..e69de29 diff --git a/src/components/calendar/Calendar.scss b/src/components/calendar/Calendar.scss new file mode 100644 index 0000000..3f029a3 --- /dev/null +++ b/src/components/calendar/Calendar.scss @@ -0,0 +1,150 @@ +@import '../components.scss'; + +.event-tool{ + height: 30px; + font-size: 0.9rem; + +} + +.tool-tip{ + height: auto; + overflow-y: hidden; + font-size: 20px !important; + background-color:black !important; + z-index: 5 !important ; + +} +.calendar{ + + margin-top: 30px; + z-index: 2; + + +} + +.fc .fc-col-header-cell-cushion { + display: inline-block; + + padding: 2px 4px; + } + + .fc .fc-daygrid table{ + + } + +.fc .fc-daygrid-event .fc-daygrid-dot-event .fc-event .fc-event-start .fc-event-end .fc-event-past{ + flex-direction: column; +} + +#calendar{ + z-index: 5; +} + + + #calendar { + max-width: 1100px; + margin: 40px auto; + } + + /* + i wish this required CSS was better documented :( + https://github.com/FezVrasta/popper.js/issues/674 + derived from this CSS on this page: https://popper.js.org/tooltip-examples.html + */ + + .popper, + .tooltip { + position: absolute; + z-index: 9999; + background: #FFC107; + color: black; + width: 150px; + border-radius: 3px; + box-shadow: 0 0 2px rgba(0,0,0,0.5); + padding: 10px; + text-align: center; + } + .style5 .tooltip { + background: #1E252B; + color: #FFFFFF; + max-width: 200px; + width: auto; + font-size: .8rem; + padding: .5em 1em; + } + .popper .popper__arrow, + .tooltip .tooltip-arrow { + width: 0; + height: 0; + border-style: solid; + position: absolute; + margin: 5px; + } + + .tooltip .tooltip-arrow, + .popper .popper__arrow { + border-color: #FFC107; + } + .style5 .tooltip .tooltip-arrow { + border-color: #1E252B; + } + .popper[x-placement^="top"], + .tooltip[x-placement^="top"] { + margin-bottom: 5px; + } + .popper[x-placement^="top"] .popper__arrow, + .tooltip[x-placement^="top"] .tooltip-arrow { + border-width: 5px 5px 0 5px; + border-left-color: transparent; + border-right-color: transparent; + border-bottom-color: transparent; + bottom: -5px; + left: calc(50% - 5px); + margin-top: 0; + margin-bottom: 0; + } + .popper[x-placement^="bottom"], + .tooltip[x-placement^="bottom"] { + margin-top: 5px; + } + .tooltip[x-placement^="bottom"] .tooltip-arrow, + .popper[x-placement^="bottom"] .popper__arrow { + border-width: 0 5px 5px 5px; + border-left-color: transparent; + border-right-color: transparent; + border-top-color: transparent; + top: -5px; + left: calc(50% - 5px); + margin-top: 0; + margin-bottom: 0; + } + .tooltip[x-placement^="right"], + .popper[x-placement^="right"] { + margin-left: 5px; + } + .popper[x-placement^="right"] .popper__arrow, + .tooltip[x-placement^="right"] .tooltip-arrow { + border-width: 5px 5px 5px 0; + border-left-color: transparent; + border-top-color: transparent; + border-bottom-color: transparent; + left: -5px; + top: calc(50% - 5px); + margin-left: 0; + margin-right: 0; + } + .popper[x-placement^="left"], + .tooltip[x-placement^="left"] { + margin-right: 5px; + } + .popper[x-placement^="left"] .popper__arrow, + .tooltip[x-placement^="left"] .tooltip-arrow { + border-width: 5px 0 5px 5px; + border-top-color: transparent; + border-right-color: transparent; + border-bottom-color: transparent; + right: -5px; + top: calc(50% - 5px); + margin-left: 0; + margin-right: 0; + } \ No newline at end of file diff --git a/src/components/calendar/calendarEvents.json b/src/components/calendar/calendarEvents.json new file mode 100644 index 0000000..9baf015 --- /dev/null +++ b/src/components/calendar/calendarEvents.json @@ -0,0 +1,62 @@ + [ + { + "title": "All Day Event", + "start": "2021-01-01" + }, + { + "title": "Long Event", + "start": "2021-01-07", + "end": "2021-01-10", + "description": "This is the sample event provided as an example only", + "color": "purple" + }, + { + "groupId": "999", + "title": "Repeating Event", + "description": "This is the sample event provided as an example only", + "start": "2021-01-09T16:00:00" + }, + { + "groupId": "999", + "title": "Repeating Event", + "start": "2021-01-09T18:00:00" + }, + { + "groupId": "999", + "title": "Repeating Event", + "start": "2021-01-16T16:00:00" + }, + { + "title": "Conference", + "start": "2021-01-11", + "end": "2021-01-13", + "description": "This is the sample event provided as an example only", + "color": "purple" + }, + { + "title": "Meeting", + "start": "2021-01-12T10:30:00", + "end": "2021-01-12T12:30:" + }, + { + "title": "Lunch", + "start": "2021-01-12T12:00:" + }, + { + "title": "Meeting", + "start": "2021-01-12T14:30:" + }, + { + "title": "Birthday Party", + "start": "2021-01-13T07:00:" + }, + { + "title": "Birthday Party2", + "start": "2021-01-13T09:00:" + }, + { + "title": "Click for Foss RIT", + "url": "https://fossrit.github.io", + "start": "2021-01-28" + } + ] \ No newline at end of file diff --git a/src/components/calendar/openCalendar.js b/src/components/calendar/openCalendar.js new file mode 100644 index 0000000..baf91b8 --- /dev/null +++ b/src/components/calendar/openCalendar.js @@ -0,0 +1,96 @@ +import React from 'react'; +import ReactTooltip from 'react-tooltip'; +import'./Calendar.scss'; +import calendarEvents from './calendarEvents.json'; +import FullCalendar from '@fullcalendar/react' +import dayGridPlugin from '@fullcalendar/daygrid'; + +function formatAMPM(date) { + var hours = date.getHours(); + var minutes = date.getMinutes(); + var ampm = hours >= 12 ? 'pm' : 'am'; + hours = hours % 12; + hours = hours ? hours : 12; // the hour '0' should be '12' + minutes = minutes < 10 ? '0'+minutes : minutes; + var strTime = hours + ':' + minutes + ' ' + ampm; + return strTime; + } + +function create_UUID(){ + var dt = new Date().getTime(); + var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) { + var r = (dt + Math.random()*16)%16 | 0; + dt = Math.floor(dt/16); + return (c==='x' ? r :(r&0x3|0x8)).toString(16); + }); + return uuid; +} + + + + + + +export default class OpenCalendar extends React.Component{ +constructor(props){ + super(props); + this.state={ + event: { + title: 'Sample Event', + location: 'Portland, OR', + startTime: '2021-02-16T20:15:00-04:00', + endTime: '2021-02-16T21:45:00-04:00' + }, + + + } + this.handleEvent=this.handleEvent.bind(this); +} + +handleEvent(info){ + let start = false; + + let allInfo = [{"tag":"Title","text":info.event.title},] + let eID =create_UUID(); + if(info.event.allDay!==true){ + start=formatAMPM(info.event.start); + allInfo.push({"tag":"Starts at","text":start}) + } + if(info.event.extendedProps.description){ + allInfo.push({"tag":"description","text":info.event.extendedProps.description}) + } + return( + +
+
+ {info.event.title} + {info.event.description} + {start?start:null} +
+ + {allInfo.map((comp,index)=>
{comp.tag+" : "+comp.text}
)} +
+
+ ) +} + + +render(){ + return ( +
+
+ + + +
+
+ ); +} + +} \ No newline at end of file diff --git a/src/components/components.scss b/src/components/components.scss new file mode 100644 index 0000000..f7037db --- /dev/null +++ b/src/components/components.scss @@ -0,0 +1 @@ +@import '../constants.scss'; \ No newline at end of file diff --git a/src/components/footer.js b/src/components/footer.js new file mode 100644 index 0000000..4238cb5 --- /dev/null +++ b/src/components/footer.js @@ -0,0 +1 @@ +import './Footer.scss'; diff --git a/src/components/home/Home.scss b/src/components/home/Home.scss new file mode 100644 index 0000000..eab2744 --- /dev/null +++ b/src/components/home/Home.scss @@ -0,0 +1,90 @@ +@import '../components.scss'; + + +.home{ + z-index: 1; + width:100vw; + margin-left: 0; + display: flex; + flex-direction: column; + + + + .home-container{ + + z-index: 1; + + .content{ + display: flex; + flex-direction: row; + flex-wrap:wrap; + + + + .home-routes{ + padding:5px 10px; + z-index: 2; + width: 50%; + display: flex; + flex-wrap: wrap; + flex-direction: column; + align-items: flex-start; + justify-content: flex-start; + h2{ + font-size: 2rem; + font-weight: 500; + } + ul{ + + width:100%; + text-align: left; + background-color: white; + padding-left: 0; + + a{ + cursor: pointer; + color:var(--color-grey); + text-decoration: none; + + li{ + + border:1px solid rgba(0,0,0,.125); + font-size: 1rem; + + font-weight: 400; + padding:10px 5px; + list-style: none; + + &:hover{ + background-color: var(--color-light); + color:black; + } + } + } + } + } + } + } + +} + + + + +@media(max-width:750px){ + .home{ + + .home-container{ + + .content{ + flex-direction: column; + + + .home-routes{ + + width:100%; + } +} + } +} +} \ No newline at end of file diff --git a/src/components/home/Intro.scss b/src/components/home/Intro.scss new file mode 100644 index 0000000..d70271a --- /dev/null +++ b/src/components/home/Intro.scss @@ -0,0 +1,24 @@ +@import '../components.scss'; + +.intro{ + z-index: 1; + background-color:var(--color-orangeDark) ; + width:100%; + height:auto; + color:white; + font-size: 1.9rem; + line-height: 1.2; + padding:auto 0; + text-align: left; + font-family:'Roboto' sans-serif; + + h1{ + + font-weight: 100; + } + h3{ + font-weight: 50; + padding-bottom: 2rem; + border-bottom: 0.01px var(--color-light) inset; + } +} \ No newline at end of file diff --git a/src/components/home/home.js b/src/components/home/home.js new file mode 100644 index 0000000..ac2d664 --- /dev/null +++ b/src/components/home/home.js @@ -0,0 +1,49 @@ +import {useEffect } from 'react'; +import './Home.scss'; +import Intro from './intro.js'; +import homeRoutes from './homeRoutes.json'; + + + + +const GetRoutes=(props)=>{ + return( + +
+

{props.title}

+ +
+ ); +} + + + +export default function Home(){ + + useEffect(()=>{ + localStorage.setItem('route','/'); + }) + + return( +
+ + +
+
+
+ {homeRoutes.map(hr=>())} + +
+
+
+ + +
+ ); +} \ No newline at end of file diff --git a/src/components/home/homeRoutes.json b/src/components/home/homeRoutes.json new file mode 100644 index 0000000..ccb942f --- /dev/null +++ b/src/components/home/homeRoutes.json @@ -0,0 +1,18 @@ +[{ + "title":"Who We are", + "routes":[ + {"url":"/about","name":"About"}, + {"url":"https://fossrit.github.io/","name":"FOSS RIT"}, + {"url":"/projects","name":"Projects"}, + {"url":"/people","name":"People"} + ] +}, +{ + "title":"Participate", + "routes":[ + {"url":"/calendar","name":"Calendar"}, + {"url":"/annoucements","name":"Announcements"} + ] +} +] + \ No newline at end of file diff --git a/src/components/home/intro.js b/src/components/home/intro.js new file mode 100644 index 0000000..7ea2fda --- /dev/null +++ b/src/components/home/intro.js @@ -0,0 +1,12 @@ +import './Intro.scss'; +import introduction from './introduction.json'; +export default function Intro(){ + return( +
+
+

Open @ RIT

+

{introduction.tag}

+
+
+ ) +} \ No newline at end of file diff --git a/src/components/home/introduction.json b/src/components/home/introduction.json new file mode 100644 index 0000000..d82f482 --- /dev/null +++ b/src/components/home/introduction.json @@ -0,0 +1,3 @@ +{ + "tag":"Key Research Center and serves as Open Programs Office at RIT" +} \ No newline at end of file diff --git a/src/components/navigation.js b/src/components/navigation.js new file mode 100644 index 0000000..3d02a14 --- /dev/null +++ b/src/components/navigation.js @@ -0,0 +1,124 @@ +import './Navigation.scss'; +import Logo from '../images/logo.png'; +import navigations from '../data/navagations.json'; +import React from 'react'; + + +const setRoute =()=>{ + + try{ + localStorage.setItem('display-title','Open@RIT'); + localStorage.setItem('route','/home'); + } + catch(e){ + + } +} + +const getRoute = ()=>{ + try{ + return localStorage.getItem('route'); + } + catch(e){ + return '/home'; + } +} + +class Options extends React.Component{ + constructor(props){ + super(props); + this.state={ + route:"/", + top:76, + name:"Open@RIT" + } + this.handleRoute = this.handleRoute.bind(this); + + } + + handleRoute(url,title){ + localStorage.setItem('route',url); + localStorage.setItem('display-title',title); + + } + + componentDidMount(){ + //this.setState({top:window.scrollY+76}); + //console.log(this.state.top) ; + try{ + document.title=localStorage.getItem('display-title'); + } + catch(e){ + document.title = "Open@RIT"; + } + + } + + render(){ + + return( +
+ {navigations.map(nav=>{ + return( + this.handleRoute(nav.url,nav.name)} + + >{nav.name} + + + + )}) + } +
+ ) + } +} + +class Navigation extends React.Component{ + constructor(props){ + super(props); + this.state={ + display:false, + bar:'', + route:'', + + }; + this.handleDisplay = this.handleDisplay.bind(this); + + } + handleDisplay(){ + let display=this.state.display; + this.setState({display:display?false:true}); + this.setState({bar:display?'':'cross'}); + } + + + + + + + render(){ + return( +
+
+ {setRoute()} + }> + RIT + + {} + +
+ + + +
+
+ {this.state.display?:null} +
+ ); + } +} + +export default Navigation; \ No newline at end of file diff --git a/src/constants.scss b/src/constants.scss new file mode 100644 index 0000000..0319f41 --- /dev/null +++ b/src/constants.scss @@ -0,0 +1,19 @@ +:root{ + --color-light:#f8f9fa; + --color-black:black; + --color-grey:#6c757d; + --color-orange:#fd7e14; + --color-orangeDark:#F76902; + --color-greyDark:#343a40; + } + +.container{ + margin:10px 20%; + +} + +@media(max-width:750px){ + .container{ + margin: 10px 7%; + } +} \ No newline at end of file diff --git a/src/data/navagations.json b/src/data/navagations.json new file mode 100644 index 0000000..e223b28 --- /dev/null +++ b/src/data/navagations.json @@ -0,0 +1,29 @@ +[ { + "name":"About", + "url":"/about" + }, + { + "name":"Research", + "url":"/research" + }, + { + "name":"Education", + "url":"/education" + }, + { + "name":"Service", + "url":"/service" + }, + { + "name":"Public Resources", + "url":"/public_resources" + }, + { + "name":"Get Involved", + "url":"/get_invovled" + }, + { + "name":"Calendar", + "url":"/calendar" + } +] \ No newline at end of file diff --git a/src/images/logo.png b/src/images/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..ebf903ac0a1e72f703786e07b3816f16132a73f5 GIT binary patch literal 9226 zcmd^l^;=X?*Y*HIrz0sfz>w0?IYSO93@J*3bV!5b07^3q4T2yg64H%Gsep(K9TI|c zck|&>@AJcVz26`3?H~5F_qy)2*1gwS=bUTrv!iviRY{2+5CH%HQZ={|0sz2<-;GrW zaPE45L3YnwPv@mdt_Rt(PU(&&Ao*Q_4@4^&fVn?#6$`0<7SFK)jq} zS^r7OSW5@2=;mPy7UdV?vlemqIA1{L9zfOqSK&%gbF#K)~16m*4jhznh1hfRLo5q=2BXfUq#%9fHr( z-_^^~kI&VU?cWxZY(1?#9NfJe++4wbEm~T+d3(vS-ZA~>5?tK1wEkn*)$?D0x(k_r zpQXEi5Wk>+i_712{R8dkg|Ph}8vj?cr@p_ttpLK-)6Lt%`Ys>O+5WA37rX!6(O=*l z8!06>Yi}1@S1&asS=KuVzm0>9l#-&Df~bO$kfNZlkdTnFgru;LsDzlfl8}g!xUjOM z;=gs(Ts^%kU9D~Zt?TeVx`O|!u9TvOt)-WnhrXMe^S`sFWAEnW=4tQd4pvnBn=Ns$ zmZi0W>tEU5@cxUft%rk;t&NI@n+y0K@sV=)FAho~!V=;VqKe`QkAxm6NGeOH2n$Jy zC@3q5DT=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(j3Sb8!rSqE3PC#M{zEmT_G9pC6LfH=cfC%>2XPjLgxUx;A6=b6V z*4aboO7P$td_sY-asJudgwCv73AkN-!aOe>rHL_QF16pe zQ7VqXW#qxKk*p3eD_7eR!s{d2dr;RL>6=_6@VrRmp}(FOaX*Y`3=rL^r%$IqFQ8K! zoC*cSdzCixX?D?iq;jF^%l6VRT~FMpARjEq3$Q@5$AFqvVml`MqSlUG83VY|LIX-4%i7 zTVDuAGXT9X!WoroyBvEttA@(e7(GL@1U@TqA<_G^HNht& zxBiRysAG=o^u*M7D>^6ny3&|Kjyyv28a=jVRnvmUwaq@R+B(Sn#WtI#VIb*<9?8}> z?a@!1^w5*4X(=UDm_v;ep=TET zSgbuA+{q|BlL>UlQk$Ae2K!e?&8ZX!$Patl_{BHa(R<80Qi@N+EYD^VcXbtQTDyQO zW+;mGW?AH#T|A3)Q*Z)9_e_5Y5KwO+ZBo2)%iJfNK`Bc@SF=y-r13Elj=B~7H(zf9 zR57ikZCm4F!}X1L!Rc+>ay6Unz-Z&F0BtfvNT{-=`#9k1wOTOzHPi^WaBQ6WcyI$P*z6{=CJ&H}pZ}^LpbN1=ts3@9PfRKB)r#Cyq2WFzZ z^Wdv2_(@EW=yxy5LcuYcS`yAS|x09C@CTg#D4stk(y#h2fkDisK&xLpf#&x}t zaI5#*I5%_*4wV*=JxJ&H7?jr*qC8~86m)rQzJm*IAS~kH!r=ypzj3InL#eMbY#=pa z8m}y3INe1M zqG+YpLzmjr#eyqFXqD6nMunq88$6g^lj^C-a4^3x%58Lha*v2}Q|hvY)~|y7Hh1%Qzrp()8l)dlhy{ z3h5(Ocg02Tfy5qZ;UT0|97@z$R3VK`$8iu)ubVHw$&|ti{vFnVUuF_ zRr%4)OR7{O=;(5ND{WO3M=+)C)U#*u)jNvoacRY_u!${IGlL^-pD0=;t65`cae-SQ e^6Kr~O$4g?YCi^M1IXXoIcmz + + , + document.getElementById('root') +); + +// If you want to start measuring performance in your app, pass a function +// to log results (for example: reportWebVitals(console.log)) +// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals + -- GitLab From 92a987f69fa30a5f93e134979524e501151590a5 Mon Sep 17 00:00:00 2001 From: Suhas C V Date: Wed, 27 Jan 2021 18:56:43 +0000 Subject: [PATCH 02/51] Update .gitlab-ci.yml --- .gitlab-ci.yml | 39 +++++++++++++++++++++++++++------------ 1 file changed, 27 insertions(+), 12 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e4dcffe..5dcabb6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,16 +1,31 @@ +image: node:alpine + +# Announce the URL as per CRA docs +# https://create-react-app.dev/docs/advanced-configuration/ +variables: + PUBLIC_URL: /open-rit + +# Cache node modules - speeds up future builds +cache: + paths: + - node_modules + +# Name the stages involved in the pipeline stages: - - build +- deploy -build: - stage: build - image: node:15.4.0 - script: - - echo "Start building App" - - npm install - - npm build - - echo "Build successfully!" +# Job name for gitlab to recognise this results in assets for Gitlab Pages +# https://docs.gitlab.com/ee/user/project/pages/introduction.html#gitlab-pages-requirements +pages: + stage: deploy + script: + - npm install # Install all dependencies + - npm run build # Build for production + - cp public/index.html public/404.html # Not necessary, but helps with https://medium.com/@pshrmn/demystifying-single-page-applications-3068d0555d46 + - mv public _public # CRA and gitlab pages both use the public folder. Only do this in a build pipeline. + - mv build public # Move build files to public dir for Gitlab Pages artifacts: - expire_in: 1 hour paths: - - build - - node_modules/ + - public # The built files for Gitlab Pages to serve + only: + - master # Only run on master branch -- GitLab From 248b860d497e4047601fac2776f54501b0e3d4f1 Mon Sep 17 00:00:00 2001 From: Suhas C V Date: Wed, 27 Jan 2021 19:03:02 +0000 Subject: [PATCH 03/51] Update .gitlab-ci.yml --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5dcabb6..5c74dc3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,7 +3,7 @@ image: node:alpine # Announce the URL as per CRA docs # https://create-react-app.dev/docs/advanced-configuration/ variables: - PUBLIC_URL: /open-rit + PUBLIC_URL: /open-rit/ # Cache node modules - speeds up future builds cache: -- GitLab From 1aab835a0777163b879e4bd313ff3585dd7a5f2b Mon Sep 17 00:00:00 2001 From: Suhas C V Date: Wed, 27 Jan 2021 19:20:06 +0000 Subject: [PATCH 04/51] Update .gitlab-ci.yml --- .gitlab-ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5c74dc3..6f9c46b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,9 +1,10 @@ +# Using the node alpine image to build the React app image: node:alpine # Announce the URL as per CRA docs # https://create-react-app.dev/docs/advanced-configuration/ variables: - PUBLIC_URL: /open-rit/ + PUBLIC_URL: /open-rit # Cache node modules - speeds up future builds cache: -- GitLab From 5974ca72d1e9607d8f19f7b431fd845020346ed4 Mon Sep 17 00:00:00 2001 From: Suhas C V Date: Wed, 27 Jan 2021 19:25:52 +0000 Subject: [PATCH 05/51] Update .gitlab-ci.yml --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6f9c46b..4b509b6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,5 +1,5 @@ # Using the node alpine image to build the React app -image: node:alpine +image: node:15.4.0 # Announce the URL as per CRA docs # https://create-react-app.dev/docs/advanced-configuration/ -- GitLab From d4563704d9c72b9e2517c799ab908a85bff0fab5 Mon Sep 17 00:00:00 2001 From: Suhas C V Date: Wed, 27 Jan 2021 19:28:51 +0000 Subject: [PATCH 06/51] Update package.json --- package.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/package.json b/package.json index c1eb682..8a624c8 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,6 @@ "dependencies": { "@fullcalendar/react": "^5.5.0", "@fullcalendar/resource-daygrid": "^5.5.0", - "@material-ui/core": "^4.11.3", "@testing-library/jest-dom": "^5.11.9", "@testing-library/react": "^11.2.3", "@testing-library/user-event": "^12.6.2", @@ -20,7 +19,7 @@ }, "scripts": { "start": "react-scripts start", - "build": "react-scripts build", + "build": "CI= react-scripts build", "test": "react-scripts test", "eject": "react-scripts eject" }, -- GitLab From 178fc916fa59f4560e14add0ccc3953b3a82549b Mon Sep 17 00:00:00 2001 From: Suhas C V Date: Wed, 27 Jan 2021 19:36:47 +0000 Subject: [PATCH 07/51] Add new file --- src/publicPath.json | 1 + 1 file changed, 1 insertion(+) create mode 100644 src/publicPath.json diff --git a/src/publicPath.json b/src/publicPath.json new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/src/publicPath.json @@ -0,0 +1 @@ + -- GitLab From 5f69f865ac1c0c6e07bf6a37c1a0cc7f84b6c035 Mon Sep 17 00:00:00 2001 From: Suhas C V Date: Wed, 27 Jan 2021 19:37:45 +0000 Subject: [PATCH 08/51] Update publicPath.json --- src/publicPath.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/publicPath.json b/src/publicPath.json index 8b13789..10aa89b 100644 --- a/src/publicPath.json +++ b/src/publicPath.json @@ -1 +1 @@ - +{"path":"/open-rit" -- GitLab From 1e45e701f4801b57d502fe41aa202a1850bd5bcb Mon Sep 17 00:00:00 2001 From: Suhas C V Date: Wed, 27 Jan 2021 19:38:00 +0000 Subject: [PATCH 09/51] Update publicPath.json --- src/publicPath.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/publicPath.json b/src/publicPath.json index 10aa89b..6f995ae 100644 --- a/src/publicPath.json +++ b/src/publicPath.json @@ -1 +1 @@ -{"path":"/open-rit" +{"path":"/open-rit"} -- GitLab From bde94ea9992019fd89c83c1c65a6d217011c09d4 Mon Sep 17 00:00:00 2001 From: Suhas C V Date: Wed, 27 Jan 2021 19:52:24 +0000 Subject: [PATCH 10/51] Update src/App.js, src/components/navigation.js files --- src/App.js | 8 ++- src/components/navigation.js | 115 ++++++++++++----------------------- 2 files changed, 45 insertions(+), 78 deletions(-) diff --git a/src/App.js b/src/App.js index 4c1ac52..ebbfbfc 100644 --- a/src/App.js +++ b/src/App.js @@ -3,6 +3,8 @@ import Navigation from './components/navigation.js'; import About from './components/about/about.js'; import Home from './components/home/home.js'; import OpenCalendar from'./components/calendar/openCalendar.js'; +import path from './publicPath.json'; + import { BrowserRouter as Router, @@ -20,14 +22,14 @@ function App() {
- + - + - + diff --git a/src/components/navigation.js b/src/components/navigation.js index 3d02a14..067175c 100644 --- a/src/components/navigation.js +++ b/src/components/navigation.js @@ -1,79 +1,49 @@ import './Navigation.scss'; import Logo from '../images/logo.png'; import navigations from '../data/navagations.json'; -import React from 'react'; +import React, { useEffect } from 'react'; +var path = 'open-rit/'; -const setRoute =()=>{ - - try{ - localStorage.setItem('display-title','Open@RIT'); - localStorage.setItem('route','/home'); - } - catch(e){ - - } +var routeDict = {'/':'Open@RIT'} + +for(let i in navigations){ + routeDict[navigations[i].url]=navigations[i].name; } const getRoute = ()=>{ try{ - return localStorage.getItem('route'); + return window.location.pathname ; } catch(e){ - return '/home'; + return '/'; } } -class Options extends React.Component{ - constructor(props){ - super(props); - this.state={ - route:"/", - top:76, - name:"Open@RIT" - } - this.handleRoute = this.handleRoute.bind(this); - } - - handleRoute(url,title){ - localStorage.setItem('route',url); - localStorage.setItem('display-title',title); - - } - - componentDidMount(){ - //this.setState({top:window.scrollY+76}); - //console.log(this.state.top) ; +function Options(props){ + useEffect(()=>{ try{ - document.title=localStorage.getItem('display-title'); + document.title=routeDict[window.location.pathname] } catch(e){ document.title = "Open@RIT"; } + + }); - } - - render(){ - - return( -
+ return( +
{navigations.map(nav=>{ return( - this.handleRoute(nav.url,nav.name)} - - >{nav.name} - - - - )}) - } + {nav.name} + + )}) + }
- ) - } + ); } class Navigation extends React.Component{ @@ -95,30 +65,25 @@ class Navigation extends React.Component{ } - - - - render(){ - return( -
-
- {setRoute()} - }> - RIT - - {} - -
- - - -
-
- {this.state.display?:null} -
- ); + return( +
+
+ + RIT + + {} + +
+ + + +
+
+ {this.state.display?:null} +
+ ); } } -export default Navigation; \ No newline at end of file +export default Navigation; -- GitLab From 503157fe4ec31f8f68006c8a6df2f5ae24c4e170 Mon Sep 17 00:00:00 2001 From: Suhas C V Date: Wed, 27 Jan 2021 19:55:33 +0000 Subject: [PATCH 11/51] Update src/components/navigation.js --- src/components/navigation.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/navigation.js b/src/components/navigation.js index 067175c..be6e928 100644 --- a/src/components/navigation.js +++ b/src/components/navigation.js @@ -69,7 +69,7 @@ class Navigation extends React.Component{ return(
- + RIT {} -- GitLab From 7e1f2286c3e07227f0663442a1ab1a3525a9033c Mon Sep 17 00:00:00 2001 From: Suhas C V Date: Wed, 27 Jan 2021 20:04:03 +0000 Subject: [PATCH 12/51] Update src/components/navigation.js, src/App.js files --- src/App.js | 6 +++--- src/components/navigation.js | 9 ++++----- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/App.js b/src/App.js index ebbfbfc..b2a0c93 100644 --- a/src/App.js +++ b/src/App.js @@ -22,14 +22,14 @@ function App() {
- + - + - + diff --git a/src/components/navigation.js b/src/components/navigation.js index be6e928..68caee1 100644 --- a/src/components/navigation.js +++ b/src/components/navigation.js @@ -3,7 +3,6 @@ import Logo from '../images/logo.png'; import navigations from '../data/navagations.json'; import React, { useEffect } from 'react'; -var path = 'open-rit/'; var routeDict = {'/':'Open@RIT'} @@ -37,8 +36,8 @@ function Options(props){ {navigations.map(nav=>{ return( {nav.name} + href={""+nav.url} + style={{color:nav.url===getRoute()?'black':''}}>{nav.name} )}) } @@ -69,7 +68,7 @@ class Navigation extends React.Component{ return(
- + RIT {} @@ -86,4 +85,4 @@ class Navigation extends React.Component{ } } -export default Navigation; +export default Navigation; \ No newline at end of file -- GitLab From 2d448de8628e6ad40340d973ecbbf658292efc6b Mon Sep 17 00:00:00 2001 From: Suhas C V Date: Wed, 27 Jan 2021 20:04:20 +0000 Subject: [PATCH 13/51] Update .gitlab-ci.yml --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4b509b6..22ad407 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,7 +4,7 @@ image: node:15.4.0 # Announce the URL as per CRA docs # https://create-react-app.dev/docs/advanced-configuration/ variables: - PUBLIC_URL: /open-rit + PUBLIC_URL: / # Cache node modules - speeds up future builds cache: -- GitLab From 653586c6db10d5e6f7a8f04fccfb5ab5d8e23fa1 Mon Sep 17 00:00:00 2001 From: Suhas C V Date: Wed, 27 Jan 2021 20:10:49 +0000 Subject: [PATCH 14/51] Update .gitlab-ci.yml --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 22ad407..4b509b6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,7 +4,7 @@ image: node:15.4.0 # Announce the URL as per CRA docs # https://create-react-app.dev/docs/advanced-configuration/ variables: - PUBLIC_URL: / + PUBLIC_URL: /open-rit # Cache node modules - speeds up future builds cache: -- GitLab From 46eab69b3585e1c9e7775b1a29c2db41cf77d64a Mon Sep 17 00:00:00 2001 From: Suhas C V Date: Wed, 27 Jan 2021 20:15:18 +0000 Subject: [PATCH 15/51] Update .gitlab-ci.yml --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4b509b6..0101a2f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,5 +1,5 @@ # Using the node alpine image to build the React app -image: node:15.4.0 +image: alpine # Announce the URL as per CRA docs # https://create-react-app.dev/docs/advanced-configuration/ -- GitLab From 4302832892f9267526649523fc67a7698b7924ca Mon Sep 17 00:00:00 2001 From: Suhas C V Date: Wed, 27 Jan 2021 20:21:40 +0000 Subject: [PATCH 16/51] Update navigation.js --- src/components/navigation.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/navigation.js b/src/components/navigation.js index 68caee1..ade05fd 100644 --- a/src/components/navigation.js +++ b/src/components/navigation.js @@ -36,7 +36,7 @@ function Options(props){ {navigations.map(nav=>{ return( {nav.name} )}) @@ -68,7 +68,7 @@ class Navigation extends React.Component{ return(
- + RIT {} @@ -85,4 +85,4 @@ class Navigation extends React.Component{ } } -export default Navigation; \ No newline at end of file +export default Navigation; -- GitLab From e2f02ae19544d3684e396d762d5aa32eab57f81d Mon Sep 17 00:00:00 2001 From: Suhas C V Date: Wed, 27 Jan 2021 20:22:06 +0000 Subject: [PATCH 17/51] Update .gitlab-ci.yml --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0101a2f..a47bc44 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,5 +1,5 @@ # Using the node alpine image to build the React app -image: alpine +image: 15.4.0 # Announce the URL as per CRA docs # https://create-react-app.dev/docs/advanced-configuration/ -- GitLab From f9d1bed5d1dd4d0c0314234c4efda105a11bbaed Mon Sep 17 00:00:00 2001 From: suhascv Date: Wed, 27 Jan 2021 15:29:15 -0500 Subject: [PATCH 18/51] up --- .gitlab-ci.yml | 2 +- src/components/navigation.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a47bc44..c805879 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,7 +4,7 @@ image: 15.4.0 # Announce the URL as per CRA docs # https://create-react-app.dev/docs/advanced-configuration/ variables: - PUBLIC_URL: /open-rit + PUBLIC_URL: / # Cache node modules - speeds up future builds cache: diff --git a/src/components/navigation.js b/src/components/navigation.js index ade05fd..5b67cae 100644 --- a/src/components/navigation.js +++ b/src/components/navigation.js @@ -36,7 +36,7 @@ function Options(props){ {navigations.map(nav=>{ return( {nav.name} )}) -- GitLab From 66c81af7702dd3c9a7f5887aa6c981e26a5499fd Mon Sep 17 00:00:00 2001 From: Suhas C V Date: Wed, 27 Jan 2021 20:30:44 +0000 Subject: [PATCH 19/51] Update .gitlab-ci.yml --- .gitlab-ci.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c805879..0584abc 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,8 +3,6 @@ image: 15.4.0 # Announce the URL as per CRA docs # https://create-react-app.dev/docs/advanced-configuration/ -variables: - PUBLIC_URL: / # Cache node modules - speeds up future builds cache: -- GitLab From 5829544e3e9dc522dbaf00b4741974867a6cc228 Mon Sep 17 00:00:00 2001 From: Suhas C V Date: Wed, 27 Jan 2021 20:31:58 +0000 Subject: [PATCH 20/51] Update .gitlab-ci.yml --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0584abc..930ad1d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,5 +1,5 @@ # Using the node alpine image to build the React app -image: 15.4.0 +image: node: 15.4.0 # Announce the URL as per CRA docs # https://create-react-app.dev/docs/advanced-configuration/ -- GitLab From 1b1667333afb0e4134050b7d355e4df46e740833 Mon Sep 17 00:00:00 2001 From: Suhas C V Date: Wed, 27 Jan 2021 20:34:05 +0000 Subject: [PATCH 21/51] Update .gitlab-ci.yml --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 930ad1d..8d4efa5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,5 +1,5 @@ # Using the node alpine image to build the React app -image: node: 15.4.0 +image: node:15.4.0 # Announce the URL as per CRA docs # https://create-react-app.dev/docs/advanced-configuration/ -- GitLab From c591eb5aa2477174af445048fce904d93fdc6230 Mon Sep 17 00:00:00 2001 From: Suhas C V Date: Wed, 27 Jan 2021 20:38:53 +0000 Subject: [PATCH 22/51] Update .gitlab-ci.yml --- .gitlab-ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8d4efa5..4b509b6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,6 +3,8 @@ image: node:15.4.0 # Announce the URL as per CRA docs # https://create-react-app.dev/docs/advanced-configuration/ +variables: + PUBLIC_URL: /open-rit # Cache node modules - speeds up future builds cache: -- GitLab From 27d97fffb003b793f0746a65d61abe28a004d8eb Mon Sep 17 00:00:00 2001 From: Suhas C V Date: Wed, 27 Jan 2021 20:47:39 +0000 Subject: [PATCH 24/51] Update App.js --- src/App.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/App.js b/src/App.js index b2a0c93..4e64269 100644 --- a/src/App.js +++ b/src/App.js @@ -22,14 +22,14 @@ function App() {
- + - + - + -- GitLab From 570f4e254e7ec27de3d28cb4b9cbffa46d9127d5 Mon Sep 17 00:00:00 2001 From: Suhas C V Date: Wed, 27 Jan 2021 20:53:16 +0000 Subject: [PATCH 25/51] Update src/components/navigation.js --- src/components/navigation.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/navigation.js b/src/components/navigation.js index 5b67cae..dc3dbb2 100644 --- a/src/components/navigation.js +++ b/src/components/navigation.js @@ -36,7 +36,7 @@ function Options(props){ {navigations.map(nav=>{ return( {nav.name} )}) -- GitLab From 9ecd4b18700e14e98aa371d27c852b190269b2c6 Mon Sep 17 00:00:00 2001 From: Suhas C V Date: Wed, 27 Jan 2021 20:58:33 +0000 Subject: [PATCH 26/51] Update src/components/navigation.js --- src/components/navigation.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/navigation.js b/src/components/navigation.js index dc3dbb2..0f4178d 100644 --- a/src/components/navigation.js +++ b/src/components/navigation.js @@ -36,7 +36,7 @@ function Options(props){ {navigations.map(nav=>{ return( {nav.name} )}) -- GitLab From 9b5b9489481d8a041991951768c9315bccce132a Mon Sep 17 00:00:00 2001 From: Suhas C V Date: Wed, 27 Jan 2021 21:07:20 +0000 Subject: [PATCH 27/51] Update .gitlab-ci.yml --- .gitlab-ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4b509b6..da844a1 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -22,7 +22,6 @@ pages: script: - npm install # Install all dependencies - npm run build # Build for production - - cp public/index.html public/404.html # Not necessary, but helps with https://medium.com/@pshrmn/demystifying-single-page-applications-3068d0555d46 - mv public _public # CRA and gitlab pages both use the public folder. Only do this in a build pipeline. - mv build public # Move build files to public dir for Gitlab Pages artifacts: -- GitLab From 14176e49e03b739b01676109e130e2f11f0ae0e1 Mon Sep 17 00:00:00 2001 From: Suhas C V Date: Wed, 27 Jan 2021 21:11:00 +0000 Subject: [PATCH 28/51] Update .gitlab-ci.yml --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index da844a1..64b6979 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,7 +4,7 @@ image: node:15.4.0 # Announce the URL as per CRA docs # https://create-react-app.dev/docs/advanced-configuration/ variables: - PUBLIC_URL: /open-rit + PUBLIC_URL: # Cache node modules - speeds up future builds cache: -- GitLab From f385f33ab8a4a5c642b6a5dbb30072a0e6b603d6 Mon Sep 17 00:00:00 2001 From: Suhas C V Date: Wed, 27 Jan 2021 21:11:13 +0000 Subject: [PATCH 29/51] Update .gitlab-ci.yml --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 64b6979..cd71b18 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,7 +4,7 @@ image: node:15.4.0 # Announce the URL as per CRA docs # https://create-react-app.dev/docs/advanced-configuration/ variables: - PUBLIC_URL: + PUBLIC_URL: / # Cache node modules - speeds up future builds cache: -- GitLab From 6e6877d612ab253cca0c0f33706783436b437be5 Mon Sep 17 00:00:00 2001 From: Suhas C V Date: Wed, 27 Jan 2021 21:14:50 +0000 Subject: [PATCH 30/51] Update src/App.js --- src/App.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/App.js b/src/App.js index 4e64269..a4eac82 100644 --- a/src/App.js +++ b/src/App.js @@ -26,10 +26,10 @@ function App() { - + - + -- GitLab From 25e85b5b2b25b5c7669a2b38a69e4a18877b0ecf Mon Sep 17 00:00:00 2001 From: Suhas C V Date: Wed, 27 Jan 2021 21:17:43 +0000 Subject: [PATCH 31/51] Update .gitlab-ci.yml --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index cd71b18..da844a1 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,7 +4,7 @@ image: node:15.4.0 # Announce the URL as per CRA docs # https://create-react-app.dev/docs/advanced-configuration/ variables: - PUBLIC_URL: / + PUBLIC_URL: /open-rit # Cache node modules - speeds up future builds cache: -- GitLab From 7a5ace7eac77b2ba5a72b823eaf36b4e163a0288 Mon Sep 17 00:00:00 2001 From: Suhas C V Date: Wed, 27 Jan 2021 21:28:02 +0000 Subject: [PATCH 32/51] Update .gitlab-ci.yml --- .gitlab-ci.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index da844a1..5a056a3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -22,6 +22,10 @@ pages: script: - npm install # Install all dependencies - npm run build # Build for production + - cd build + - cp index.html 200.html + - surge + - cd ../ - mv public _public # CRA and gitlab pages both use the public folder. Only do this in a build pipeline. - mv build public # Move build files to public dir for Gitlab Pages artifacts: -- GitLab From e65d8305829d58595cefbd891d590ca5430697ac Mon Sep 17 00:00:00 2001 From: Suhas C V Date: Wed, 27 Jan 2021 21:30:13 +0000 Subject: [PATCH 33/51] Update .gitlab-ci.yml --- .gitlab-ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5a056a3..d37664b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -24,7 +24,6 @@ pages: - npm run build # Build for production - cd build - cp index.html 200.html - - surge - cd ../ - mv public _public # CRA and gitlab pages both use the public folder. Only do this in a build pipeline. - mv build public # Move build files to public dir for Gitlab Pages -- GitLab From 81a7b3bab7e97991e808f960cf21e6787cc92c0d Mon Sep 17 00:00:00 2001 From: Suhas C V Date: Wed, 27 Jan 2021 21:42:21 +0000 Subject: [PATCH 34/51] Update src/App.js, .gitlab-ci.yml files --- .gitlab-ci.yml | 4 ++-- src/App.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d37664b..b2af445 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -23,8 +23,8 @@ pages: - npm install # Install all dependencies - npm run build # Build for production - cd build - - cp index.html 200.html - - cd ../ + - cp public/index.html public/404.html + - cp public/index.html public/200.html - mv public _public # CRA and gitlab pages both use the public folder. Only do this in a build pipeline. - mv build public # Move build files to public dir for Gitlab Pages artifacts: diff --git a/src/App.js b/src/App.js index a4eac82..223e672 100644 --- a/src/App.js +++ b/src/App.js @@ -20,7 +20,7 @@ function App() {
- + -- GitLab From bd06a66cbaf0f3016a76fb28d167113ae5ad51e9 Mon Sep 17 00:00:00 2001 From: Suhas C V Date: Wed, 27 Jan 2021 21:48:22 +0000 Subject: [PATCH 35/51] Update .gitlab-ci.yml --- .gitlab-ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b2af445..bbd6ef9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -22,7 +22,6 @@ pages: script: - npm install # Install all dependencies - npm run build # Build for production - - cd build - cp public/index.html public/404.html - cp public/index.html public/200.html - mv public _public # CRA and gitlab pages both use the public folder. Only do this in a build pipeline. -- GitLab From 7c4b73e3a8b5eecfecce18ee50bedd6f3e4a64a6 Mon Sep 17 00:00:00 2001 From: suhascv Date: Wed, 27 Jan 2021 16:59:11 -0500 Subject: [PATCH 36/51] router --- .gitlab-ci.yml | 1 - src/App.js | 4 +--- src/index.js | 7 +++---- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b2af445..bbd6ef9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -22,7 +22,6 @@ pages: script: - npm install # Install all dependencies - npm run build # Build for production - - cd build - cp public/index.html public/404.html - cp public/index.html public/200.html - mv public _public # CRA and gitlab pages both use the public folder. Only do this in a build pipeline. diff --git a/src/App.js b/src/App.js index 223e672..894813c 100644 --- a/src/App.js +++ b/src/App.js @@ -20,7 +20,7 @@ function App() {
- + @@ -33,8 +33,6 @@ function App() { - -
diff --git a/src/index.js b/src/index.js index f540681..a34adbe 100644 --- a/src/index.js +++ b/src/index.js @@ -2,12 +2,11 @@ import React from 'react'; import ReactDOM from 'react-dom'; import './index.css'; import App from './App'; - - +import {BrowserRouter} from "react-router-dom"; ReactDOM.render( - + - , + , document.getElementById('root') ); -- GitLab From 1e8445f0d4a8b53e8cb7381a0ea9cb074fe3cacb Mon Sep 17 00:00:00 2001 From: Suhas C V Date: Wed, 27 Jan 2021 22:04:15 +0000 Subject: [PATCH 37/51] Update src/index.js --- src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index a34adbe..abc3e45 100644 --- a/src/index.js +++ b/src/index.js @@ -4,7 +4,7 @@ import './index.css'; import App from './App'; import {BrowserRouter} from "react-router-dom"; ReactDOM.render( - + , document.getElementById('root') -- GitLab From 7673958c1bc313fd2cc18233a5da295619d0dd18 Mon Sep 17 00:00:00 2001 From: Suhas C V Date: Wed, 27 Jan 2021 22:10:16 +0000 Subject: [PATCH 38/51] Update src/components/navigation.js, src/App.js files --- src/App.js | 6 +++--- src/components/navigation.js | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/App.js b/src/App.js index 894813c..c2bed16 100644 --- a/src/App.js +++ b/src/App.js @@ -22,14 +22,14 @@ function App() {
- + - + - + diff --git a/src/components/navigation.js b/src/components/navigation.js index 0f4178d..286dd90 100644 --- a/src/components/navigation.js +++ b/src/components/navigation.js @@ -36,7 +36,7 @@ function Options(props){ {navigations.map(nav=>{ return( {nav.name} )}) @@ -68,7 +68,7 @@ class Navigation extends React.Component{ return(
- + RIT {} -- GitLab From 6e36781e55d1094bbabc047dc095312af43fa867 Mon Sep 17 00:00:00 2001 From: Suhas C V Date: Wed, 27 Jan 2021 22:10:49 +0000 Subject: [PATCH 39/51] Update .gitlab-ci.yml --- .gitlab-ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index bbd6ef9..948cb99 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -23,7 +23,6 @@ pages: - npm install # Install all dependencies - npm run build # Build for production - cp public/index.html public/404.html - - cp public/index.html public/200.html - mv public _public # CRA and gitlab pages both use the public folder. Only do this in a build pipeline. - mv build public # Move build files to public dir for Gitlab Pages artifacts: -- GitLab From 30e57dfa3d04c06b03fe8805ef4e2c85c55420bb Mon Sep 17 00:00:00 2001 From: Suhas C V Date: Wed, 27 Jan 2021 22:15:44 +0000 Subject: [PATCH 40/51] Update src/App.js --- src/App.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/App.js b/src/App.js index c2bed16..f6bd4e3 100644 --- a/src/App.js +++ b/src/App.js @@ -22,14 +22,11 @@ function App() {
- - - - - + + - + -- GitLab From bc7dff4183838df84c4eb38e68e5c8a21f5711a9 Mon Sep 17 00:00:00 2001 From: Suhas C V Date: Wed, 27 Jan 2021 22:21:38 +0000 Subject: [PATCH 41/51] Update src/App.js, src/index.js files --- src/App.js | 4 +--- src/index.js | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/App.js b/src/App.js index f6bd4e3..58edb86 100644 --- a/src/App.js +++ b/src/App.js @@ -23,9 +23,7 @@ function App() { - - - + diff --git a/src/index.js b/src/index.js index abc3e45..e0eb50b 100644 --- a/src/index.js +++ b/src/index.js @@ -4,7 +4,7 @@ import './index.css'; import App from './App'; import {BrowserRouter} from "react-router-dom"; ReactDOM.render( - + , document.getElementById('root') -- GitLab From 679d7d9fec3ba524a71d7253cc6eb3ef8323df19 Mon Sep 17 00:00:00 2001 From: Suhas C V Date: Wed, 27 Jan 2021 22:29:22 +0000 Subject: [PATCH 42/51] Update .gitlab-ci.yml --- .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 948cb99..fc182ef 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -23,6 +23,7 @@ pages: - npm install # Install all dependencies - npm run build # Build for production - cp public/index.html public/404.html + - cp public/index.html public/202.html - mv public _public # CRA and gitlab pages both use the public folder. Only do this in a build pipeline. - mv build public # Move build files to public dir for Gitlab Pages artifacts: -- GitLab From f89f8a6e7fcf749132a51e4ec9032d692797c5e3 Mon Sep 17 00:00:00 2001 From: Suhas C V Date: Wed, 27 Jan 2021 22:32:48 +0000 Subject: [PATCH 43/51] Update src/index.js --- src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index e0eb50b..abc3e45 100644 --- a/src/index.js +++ b/src/index.js @@ -4,7 +4,7 @@ import './index.css'; import App from './App'; import {BrowserRouter} from "react-router-dom"; ReactDOM.render( - + , document.getElementById('root') -- GitLab From a7083b29bf966e2e39ce2d0eaea9b12c42435c81 Mon Sep 17 00:00:00 2001 From: Suhas C V Date: Wed, 27 Jan 2021 22:37:04 +0000 Subject: [PATCH 44/51] Update .gitlab-ci.yml --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index fc182ef..93d6bf2 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,7 +4,7 @@ image: node:15.4.0 # Announce the URL as per CRA docs # https://create-react-app.dev/docs/advanced-configuration/ variables: - PUBLIC_URL: /open-rit + PUBLIC_URL: "/open-rit" # Cache node modules - speeds up future builds cache: -- GitLab From c71dd22013ab37d42dcdda9f871552dab986a628 Mon Sep 17 00:00:00 2001 From: Suhas C V Date: Wed, 27 Jan 2021 22:43:27 +0000 Subject: [PATCH 45/51] Update src/App.js --- src/App.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/App.js b/src/App.js index 58edb86..ffbc52d 100644 --- a/src/App.js +++ b/src/App.js @@ -15,6 +15,7 @@ import { function App() { + console.log(process.env.PUBLIC_URL); return (
-- GitLab From d5f900933ad4cb85ef5a7c663eba3263afd82080 Mon Sep 17 00:00:00 2001 From: Suhas C V Date: Wed, 27 Jan 2021 22:47:08 +0000 Subject: [PATCH 46/51] Update src/index.js --- src/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/index.js b/src/index.js index abc3e45..21aff0f 100644 --- a/src/index.js +++ b/src/index.js @@ -2,11 +2,11 @@ import React from 'react'; import ReactDOM from 'react-dom'; import './index.css'; import App from './App'; -import {BrowserRouter} from "react-router-dom"; +import {HashRouter} from "react-router-dom"; ReactDOM.render( - + - , + , document.getElementById('root') ); -- GitLab From 35b68658cf5d476cda3053e97cf1148508fa8200 Mon Sep 17 00:00:00 2001 From: Suhas C V Date: Wed, 27 Jan 2021 22:50:50 +0000 Subject: [PATCH 47/51] Update src/index.js, src/components/home/home.js files --- src/components/home/home.js | 3 ++- src/index.js | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/components/home/home.js b/src/components/home/home.js index ac2d664..b9df2af 100644 --- a/src/components/home/home.js +++ b/src/components/home/home.js @@ -28,6 +28,7 @@ export default function Home(){ useEffect(()=>{ localStorage.setItem('route','/'); + console.log(process.env.PUBLIC_URL) }) return( @@ -46,4 +47,4 @@ export default function Home(){
); -} \ No newline at end of file +} diff --git a/src/index.js b/src/index.js index 21aff0f..abc3e45 100644 --- a/src/index.js +++ b/src/index.js @@ -2,11 +2,11 @@ import React from 'react'; import ReactDOM from 'react-dom'; import './index.css'; import App from './App'; -import {HashRouter} from "react-router-dom"; +import {BrowserRouter} from "react-router-dom"; ReactDOM.render( - + - , +
, document.getElementById('root') ); -- GitLab From 17f9322c0f586739a996699ea7a1067ebf13e572 Mon Sep 17 00:00:00 2001 From: Suhas C V Date: Wed, 27 Jan 2021 23:00:05 +0000 Subject: [PATCH 48/51] Update src/App.js --- src/App.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/App.js b/src/App.js index ffbc52d..c66a77f 100644 --- a/src/App.js +++ b/src/App.js @@ -24,7 +24,7 @@ function App() { - + }/> -- GitLab From 8f2656a0b5b9a99ca3f3d0f47040f3dc25369ad5 Mon Sep 17 00:00:00 2001 From: Suhas C V Date: Wed, 27 Jan 2021 23:05:37 +0000 Subject: [PATCH 49/51] Update .gitlab-ci.yml --- .gitlab-ci.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 93d6bf2..fefac63 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,7 +4,7 @@ image: node:15.4.0 # Announce the URL as per CRA docs # https://create-react-app.dev/docs/advanced-configuration/ variables: - PUBLIC_URL: "/open-rit" + PUBLIC_URL: /open-rit # Cache node modules - speeds up future builds cache: @@ -22,10 +22,9 @@ pages: script: - npm install # Install all dependencies - npm run build # Build for production - - cp public/index.html public/404.html - - cp public/index.html public/202.html - mv public _public # CRA and gitlab pages both use the public folder. Only do this in a build pipeline. - mv build public # Move build files to public dir for Gitlab Pages + - cp public/index.html public/404.html artifacts: paths: - public # The built files for Gitlab Pages to serve -- GitLab From a846a9ceb05f3212132557ef4014bd98bdbea53a Mon Sep 17 00:00:00 2001 From: Suhas C V Date: Wed, 27 Jan 2021 23:08:50 +0000 Subject: [PATCH 50/51] Update .gitlab-ci.yml --- .gitlab-ci.yml | 39 +++++++++++++++++++-------------------- 1 file changed, 19 insertions(+), 20 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index fefac63..4eedba5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,32 +1,31 @@ -# Using the node alpine image to build the React app image: node:15.4.0 -# Announce the URL as per CRA docs -# https://create-react-app.dev/docs/advanced-configuration/ -variables: - PUBLIC_URL: /open-rit - -# Cache node modules - speeds up future builds cache: + key: ${CI_COMMIT_REF_SLUG} paths: - - node_modules + - node_modules/ + +variables: + PUBLIC_URL: /open-rit # The path of the application + +before_script: + - npm install -# Name the stages involved in the pipeline -stages: -- deploy +test: + stage: test + script: + - CI=true npm test -# Job name for gitlab to recognise this results in assets for Gitlab Pages -# https://docs.gitlab.com/ee/user/project/pages/introduction.html#gitlab-pages-requirements pages: stage: deploy script: - - npm install # Install all dependencies - - npm run build # Build for production - - mv public _public # CRA and gitlab pages both use the public folder. Only do this in a build pipeline. - - mv build public # Move build files to public dir for Gitlab Pages - - cp public/index.html public/404.html + - CI=true npm run build + - rm -rf public + - mv build public + - cp public/index.html public/404.html # Fix for BrowserRouter + - find public -type f -regex '.*\.\(htm\|html\|txt\|text\|js\|css\)$' -exec gzip -f -k {} \; # Compress artifacts: paths: - - public # The built files for Gitlab Pages to serve + - public # GitLab pages directory only: - - master # Only run on master branch + - master -- GitLab From 04eba1f67bc6d0ab28de4349fa689d696ae38960 Mon Sep 17 00:00:00 2001 From: Suhas C V Date: Wed, 27 Jan 2021 23:25:04 +0000 Subject: [PATCH 51/51] Update src/components/navigation.js --- src/components/navigation.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/components/navigation.js b/src/components/navigation.js index 286dd90..011544c 100644 --- a/src/components/navigation.js +++ b/src/components/navigation.js @@ -2,7 +2,7 @@ import './Navigation.scss'; import Logo from '../images/logo.png'; import navigations from '../data/navagations.json'; import React, { useEffect } from 'react'; - +import {Link} from 'react-router-dom'; var routeDict = {'/':'Open@RIT'} @@ -35,10 +35,11 @@ function Options(props){
{navigations.map(nav=>{ return( - + {nav.name} + )}) }
-- GitLab