This project was bootstrapped with Create React App.
To add a new photo or change the current profile picture for someone
- Open frontend/src/assets/images/profilePics directory
- Add the photo to this folder
- Open profilePics.js (in the profilePics directory) and either change the current photo url for this person's entry or if adding a new member, add a new entry to the list of entries. An example entry for a person named Sophie Keller with profile pic sophiespic.jpg would be:
sophiekeller: require("./sophiespic.jpg"), - To change the orientation of the member's profile pic, see updating/adding member profile information.
- Open frontend/src/assets/pageData/members.json
- If you're adding, add a new entry that matches one of the previous. Otherwise, edit the entry that corresponds to the member you are editing.
- Make sure the formatting matches those of the other entries in the file. For example,
isAlumniandisLeadshould be true or false with no quotes.nameandmajorshould have quotes around them.projectsandteamsshould have square brackets around them and be separated by commas. - Open frontend/src/assets/pageData/projects.json and frontend/src/assets/pageData/teams.json.
- Make sure that any project names in your member's projects list as well as any team name in their teams list match the corresponding file. Id's in projects.json are explicitly shown. In teams.json, the id's are the value that comes to the left of the colon for each entry: ex:
business,software, etc.
** To change the orientation of the member's profile pic, add the pair "orientation": "0 _px" to the member's profile json. In place of _, put the new number to orient the photo up and down (more negative numbers will move the photo up and more positive ones will move it down).
- Open frontend/src/assets/pageData/projects.json.
- If you're adding, add a new entry that matches the format of the previous entries. Otherwise, edit the entry that corresponds to the project you are editing.
- Make sure the formatting matches those of the other entries in the file. For example,
isActiveshould betrueorfalsewith no quotes.id,title, andinfoshould have quotes around them.subteamsandcollaboratorsshould have square brackets around them and be separated by commas. - If this is a project that doesn't have collaborators, enter an empty list (
[]) for the collaborators entry. Otherwise, make sure that the collaborator name in your list is listed in frontend/src/assets/images/institutions/institutions.js. If these names don't match, this image won't be rendered correctly. To add a new collaborator photo, see steps below. - Make sure that if you are adding a new project, you also add that project to the team member's jsons who are working on that project in frontend/src/assets/pageData/teams.json. The project name in the list of their projects must match the project id in projects.json.
- Open frontend/src/assets/pageData/projects.json.
- Find the desired project's json entry and change the
isActivefield tofalse. - Add an
info_longentry for the project. This is necessary for the read more section of the project. This should be in the past tense and it is often easiest to find some sort of final report/ESR on the project and pull from there. If you're unsure what this should look like, look at the read more sections of other past projects. If you wish for the long form description to have multiple paragraphs, separate them by the newline (\n) character within theinfo_longstring. - To add a new collaborator photo, see steps below.
- Open frontend/src/assets/pageData/institutions
- Add the photo in this directory
- Open the institutions.js in this directory and add a new entry corresponding to the image you just added. For example, if you added a collaborator called kijenzi with photo kijenzipic.jpg, you would add the entry:
kijenzi: require("./kijenzi.png"),
To run this web app locally, navigate to the frontend folder in your terminal and run
npm start
Then, open up a web browser and go to url: http://localhost:3000. The site should open there.
The site is currently deployed to Google Firebase.
- Run
yarn buildto build current version - Run
sudo firebase deploy --project ewh-siteto deploy to Google Firebase - Double check that ewh.engineering.cornell.edu has been updated
- Install the Firebase CLI on your computer
- Log in to Firebase by running
firebase loginin terminal and filling in EWH Google account login information (found in Accounts Document. - In frontend directory, run
firebase deploy --project ewh-site - Double check that ewh.engineering.cornell.edu has been updated
In the project directory, you can run:
Runs the app in the development mode.
Open 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.
Launches the test runner in the interactive watch mode.
See the section about running tests for more information.
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 for more information.
Note: this is a one-way operation. Once you eject, you can’t go back!
If you aren’t satisfied with the build tool and configuration choices, you can eject at any time. This command will remove the single build dependency from your project.
Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except eject will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.
You don’t have to ever use eject. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.
You can learn more in the Create React App documentation.
To learn React, check out the React documentation.
See https://facebook.github.io/create-react-app/docs/advanced-configuration for advanced config info.
The website is setup to be deployed from http://ewh-site.firebaseapp.com but is reachable via proxy at https://ewh.engineering.cornell.edu/. For additional questions on proxy deployment or if the SSL certificate expires, please contact Manuel Calimlim.