Skip to content

Commit

Permalink
Merge pull request #1 from chezzoba/ddobby/add-HW-for-react1
Browse files Browse the repository at this point in the history
React 1 new Homework
  • Loading branch information
ddobby94 authored Aug 22, 2024
2 parents 16dfcce + 476410c commit 64a126b
Show file tree
Hide file tree
Showing 72 changed files with 7,230 additions and 0 deletions.
Binary file added react1/homework/.DS_Store
Binary file not shown.
3 changes: 3 additions & 0 deletions react1/homework/space-turism/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "next/core-web-vitals"
}
36 changes: 36 additions & 0 deletions react1/homework/space-turism/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js
.yarn/install-state.gz

# testing
/coverage

# next.js
/.next/
/out/

# production
/build

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# local env files
.env*.local

# vercel
.vercel

# typescript
*.tsbuildinfo
next-env.d.ts
22 changes: 22 additions & 0 deletions react1/homework/space-turism/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"workbench.colorCustomizations": {
"activityBar.activeBackground": "#1f6fd0",
"activityBar.background": "#1f6fd0",
"activityBar.foreground": "#e7e7e7",
"activityBar.inactiveForeground": "#e7e7e799",
"activityBarBadge.background": "#ee90bb",
"activityBarBadge.foreground": "#15202b",
"commandCenter.border": "#e7e7e799",
"sash.hoverBorder": "#1f6fd0",
"statusBar.background": "#1857a4",
"statusBar.foreground": "#e7e7e7",
"statusBarItem.hoverBackground": "#1f6fd0",
"statusBarItem.remoteBackground": "#1857a4",
"statusBarItem.remoteForeground": "#e7e7e7",
"titleBar.activeBackground": "#1857a4",
"titleBar.activeForeground": "#e7e7e7",
"titleBar.inactiveBackground": "#1857a499",
"titleBar.inactiveForeground": "#e7e7e799"
},
"peacock.color": "#1857a4"
}
30 changes: 30 additions & 0 deletions react1/homework/space-turism/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).

## Getting Started

First, run the development server:

```bash
npm run dev
```

Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.

You can start editing the page by modifying `app/page.js`. The page auto-updates as you edit the file.

This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font.

## Learn More

To learn more about Next.js, take a look at the following resources:

- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.

You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!

## Deploy on Vercel

The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.

Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
47 changes: 47 additions & 0 deletions react1/homework/space-turism/app/about_us/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# TASK 1

Let's finish the "About Us" page!

## Content to use

### Our Mission

At Galactica, our mission is to unlock the wonders of the universe for everyone. We believe that space is the final frontier and that the opportunity to explore it should be within everyone’s reach. Our journeys are designed to inspire, educate, and provide a once-in-a-lifetime experience that transcends the ordinary.

### Our Values

Exploration: We are driven by a deep-seated desire to explore the unknown. We believe that the pursuit of discovery is at the heart of human nature, and we are committed to pushing the boundaries of what is possible.

Innovation: At Galactica, we prioritize cutting-edge technology and innovation. We are constantly evolving our spacecraft, safety protocols, and services to ensure that our travelers experience the most advanced and secure space journeys available.

Sustainability: We are committed to making space exploration sustainable for future generations. Our space missions are designed to minimize environmental impact, both on Earth and in space, and to foster a spirit of responsibility towards our universe.

Community: We believe in the power of collective exploration. Our journeys are not just about reaching new destinations; they are about building a community of space enthusiasts who share a passion for the stars.


### Our Crew

#### Description
Our crew is the heart and soul of Galactica. We are a diverse team of seasoned space explorers, engineers, and visionaries who are united by a common goal: to make space travel accessible and exciting for all.

Captain Sarah Vega: A former NASA astronaut with over 15 years of experience, Captain Vega leads our missions with unparalleled expertise and a passion for space exploration.

Dr. Leo Redding: Our chief astrophysicist, Dr. Redding, is a renowned scientist who has contributed to major space discoveries. He ensures that every journey is as educational as it is exhilarating.

Chief Engineer Hana Lee: With her extensive background in aerospace engineering, Hana Lee is responsible for the state-of-the-art technology that powers our spacecraft. Her innovation ensures that our travelers are always in safe hands.

Mission Specialist Alex Santos: As a mission specialist, Alex’s job is to ensure that every aspect of the journey runs smoothly. With a background in both science and adventure tourism, Alex is the perfect guide for our space travelers.

Crew Member Maya Patel: Maya brings a unique blend of technical skills and customer service experience to the team. She’s always ready to assist with any needs and to make sure every traveler has an unforgettable experience.

#### Content

Use the content saved in the `/public/crew` folder!

### Our Partners

We collaborate with some of the most respected names in the space and technology industries to make every journey extraordinary.

#### Content

Use the content saved in the `/public/business_partners` folder!
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
73 changes: 73 additions & 0 deletions react1/homework/space-turism/app/about_us/page.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
"use client";

import React from 'react';

import { Navbar } from '../../components/ui/Navbar';
import { Footer } from '../../components/ui/Footer';

import styles from './page.module.css';

// TASK - React 1 week 1
// After you are finished with creating the page, move the OurValues, OurCrew, OurPartners components into their own files
// OurValues.js, OurCrew.js, OurPartners.js should live in this folder
// import and use the components from the newly created files

const OurValues = () => {
// TASK - React 1 week 1
// Create the "Our Values" section
// Use the descriptions provided in /app/about_us/README.md
// Some inspiration ideas found in /app/about_us/inspirations
return (
<p> ADD OUR VALUES HERE </p>
);
};

const OurCrew = () => {
// TASK - React 1 week 1
// Create the "Our Crew section"
// Use the descriptions provided in /app/about_us/README.md
// Use the pictures from /public/crew
// Some inspiration ideas found in /app/about_us/inspirations
return (
<p> ADD OUR CREW HERE </p>
);
}

const OurPartners = () => {
// TASK - React 1 week 1
// Create the "Our Crew section"
// Use the descriptions provided in /app/about_us/README.md
// Use the pictures from /public/crew
// Some inspiration ideas found in /app/about_us/inspirations
return (
<p> ADD OUR Partners HERE </p>
);
}


export const Crew = () => {
return (
<div className="fullBGpicture">
<Navbar />
<main className="mainContent">
<h1>About us</h1>
<section className="card">
<h2>Our Values</h2>
<OurValues/>
</section>
<section className="card">
<h2>The crew</h2>
<OurCrew/>
</section>

{/* TASK - React 1 week 1 */}
{/* Add in the <OurPartners /> component here */}
</main>
{/* TASK - React 1 week 1 */}
{/* Import and use the Footer component here */}
{/* Footer found in the ui/Footer.js folder */}
</div>
);
}

export default Crew;
5 changes: 5 additions & 0 deletions react1/homework/space-turism/app/about_us/page.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.app {
background-color: black;
width: 100vw;
height: 100vh;
}
40 changes: 40 additions & 0 deletions react1/homework/space-turism/app/destination/AddWishlistItem.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
"use client";

import React, { useState } from 'react';

import styles from './page.module.css';


export const AddWishlistItem = ({
onAddWishlistItem,
}) => {
const [thumbnail, onThumbnailChange] = useState('/destination/image-europa.png');
// TASK - React 1 week 3
// 1. Add a useState for the handling the <input id="customWishlist" type="text" />
// 2. Connect the onThumbnailChange to the <select>

const onAddItemPressed = () => {
// TASK - React 1 week 3
// implement this function
// Clear the <input/> field on button press
// pass the thumbnail and the name from the input to the onAddWishlistItem function
// call the onAddWishlistItem here
}


return (
<div className={styles.addWishlistItem}>
<p>Add custom planet to wishlist</p>
<label htmlFor="customWishlist">Wishlist item name</label>
<input id="customWishlist" type="text" />
<label htmlFor="customWishlistThumbnail">Wishlist item thumbnail</label>
<select id="customWishlistThumbnail" >
<option value="/destination/image-europa.png">EUROPA</option>
<option value="/destination/image-mars.png">MARS</option>
<option value="/destination/image-moon.png">MOON</option>
<option value="/destination/image-titan.png">TITAN</option>
</select>
<button>ADD CUSTOM</button>
</div>
);
};
13 changes: 13 additions & 0 deletions react1/homework/space-turism/app/destination/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
## Descriptions for the planets

### Europa
Europa, one of Jupiter’s moons, is an icy world with a hidden ocean beneath its surface. This mysterious moon is a prime candidate for the search for extraterrestrial life, making it a thrilling destination for space explorers.

### Mars
Mars, the Red Planet, is a barren yet fascinating world with vast deserts, towering volcanoes, and the deepest canyon in the solar system. As humanity’s next frontier, Mars invites us to dream of colonization and the possibilities of life beyond Earth.

### Moon
Our closest celestial neighbor, the Moon, is a silent witness to Earth's history. With its stunning craters and desolate landscapes, the Moon offers a unique glimpse into space exploration's past and future, making it a perfect destination for lunar adventurers.

### Titan
Titan, Saturn's largest moon, is a world of dense atmosphere and liquid methane lakes. This enigmatic moon is shrouded in a thick orange haze, concealing a landscape that is both alien and strangely familiar, beckoning explorers to uncover its secrets.
Loading

0 comments on commit 64a126b

Please sign in to comment.