Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Week 9 assignment solution #103

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,247 changes: 1,231 additions & 16 deletions week-9/petAdoption/package-lock.json

Large diffs are not rendered by default.

7 changes: 6 additions & 1 deletion week-9/petAdoption/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,23 @@
},
"dependencies": {
"react": "^18.3.1",
"react-dom": "^18.3.1"
"react-dom": "^18.3.1",
"react-router-dom": "^6.28.0",
"react-simple-typewriter": "^5.0.1"
},
"devDependencies": {
"@eslint/js": "^9.11.1",
"@types/react": "^18.3.10",
"@types/react-dom": "^18.3.0",
"@vitejs/plugin-react": "^4.3.2",
"autoprefixer": "^10.4.20",
"eslint": "^9.11.1",
"eslint-plugin-react": "^7.37.0",
"eslint-plugin-react-hooks": "^5.1.0-rc.0",
"eslint-plugin-react-refresh": "^0.4.12",
"globals": "^15.9.0",
"postcss": "^8.4.49",
"tailwindcss": "^3.4.15",
"vite": "^5.4.8"
}
}
6 changes: 6 additions & 0 deletions week-9/petAdoption/postcss.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export default {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
}
42 changes: 0 additions & 42 deletions week-9/petAdoption/src/App.css

This file was deleted.

67 changes: 53 additions & 14 deletions week-9/petAdoption/src/App.jsx
Original file line number Diff line number Diff line change
@@ -1,20 +1,59 @@
import Header from './components/Header';
import PetAdoptionForm from './components/PetAdoptionForm';
import "./myApp.css";

import Header from "./components/LandingPage";
import PetAdoptionForm from "./components/PetAdoptionForm";
import AdopterData from "./components/AdopterData";
import { BrowserRouter as Router, Routes, Route } from "react-router-dom";
import "./Styles/myApp.css";
import { useState } from "react";

const App = () => {
const [formData, setFormData] = useState([]);

return (
<div
style={{
backgroundImage: "url('https://images.unsplash.com/photo-1450778869180-41d0601e046e?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1950&q=80')",
height: "100vh",
backgroundSize: "cover"
}}
>
<Header message={"Pet Adoption Form"} />
<PetAdoptionForm />
</div>
<Router>
<Routes>
<Route
path="/"
element={
<div>
<Header />
</div>
}
/>

<Route
path="/petAdoptionForm"
element={
<div
style={{
backgroundImage:
"url('https://images.unsplash.com/photo-1450778869180-41d0601e046e?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1950&q=80')",
height: "100vh",
backgroundSize: "cover",
}}
>
<PetAdoptionForm formData={formData} setFormData={setFormData} />
</div>
}
/>

<Route
path="/adopter"
element={
<div
style={{
backgroundImage:
"url('https://images.unsplash.com/photo-1450778869180-41d0601e046e?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1950&q=80')",
height: "100vh",
backgroundSize: "cover",
}}
>
<AdopterData formData={formData} />
</div>
}
/>
</Routes>
</Router>
);
};

export default App;
94 changes: 94 additions & 0 deletions week-9/petAdoption/src/Styles/Adopter.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
.adopter-container {
display: flex;
flex-direction: column;
justify-content: flex-start;
align-items: center;
min-height: 100vh;
padding-top: 20px;
background: linear-gradient(to bottom right, #c59771bd, #f3e8d7);
animation: fadeIn 1s ease-in-out;
}

h1 {
font-size: 30px;
color: #335624;
text-align: center;
margin-bottom: 20px;
margin-top: 10px;
animation: slideIn 0.8s ease-in-out;
font-family: "Sour Gummy", sans-serif;
}

table {
width: 80%;
border-collapse: collapse;
margin-bottom: 20px;
background-color: rgba(255, 255, 255, 0.7);
box-shadow: 0px 10px 15px rgba(0, 0, 0, 0.1);
animation: fadeIn 1s ease-in-out;
}

table th,
table td {
padding: 12px;
text-align: center;
border: 1px solid #c59771;
font-size: 14px;
font-family: "Sour Gummy", sans-serif;
}

table th {
background-color: #b67c4d;
color: white;
}

table tr:nth-child(even) {
background-color: #f3e8d7;
}

table tr:nth-child(odd) {
background-color: #e4d3b2;
}

button {
padding: 12px 20px;
background-color: #335624;
color: #fff;
border: none;
border-radius: 5px;
font-size: 16px;
font-weight: bold;
font-family: "Sour Gummy", sans-serif;
cursor: pointer;
transition: all 0.3s ease-in-out;
display: inline-block;
margin: 40px auto;
text-align: center;
max-width: 200px;
}

button:hover {
background-color: #b67c4d;
transform: scale(1.1);
}

p {
font-size: 18px;
color: #335624;
font-family: "Sour Gummy", sans-serif;
text-align: center;
margin-top: 0px;
}

.gif-container {
margin-top: 150px;
}

.header-subtext {
margin-top: 100px;
margin-bottom: 100px;
}

.back-button {
margin-top: 200px;
}
92 changes: 92 additions & 0 deletions week-9/petAdoption/src/Styles/LandingPage.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
@import url("https://fonts.googleapis.com/css2?family=Sour+Gummy&display=swap");
* {
box-sizing: border-box;
margin: 0;
padding: 0;
color: #335624;
}
@keyframes fadeIn {
0% {
opacity: 0;
transform: translateY(-20px);
}
100% {
opacity: 1;
transform: translateY(0);
}
}

body {
text-align: center;
font-family: Arial, Helvetica, sans-serif;
}

.header-container {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100vh;
background: linear-gradient(to right, #f5e8c7, #f6c3ab);
text-align: center;
overflow: hidden;
}

.header-text {
font-family: "Sour Gummy", sans-serif;
font-size: 24px;
color: #335624;
margin-bottom: 20px;
opacity: 0;
animation: fadeIn 1s ease-in-out forwards;
animation-delay: 0.2s;
max-width: 600px;
}

.animation-container {
opacity: 0;
animation: fadeIn 1s ease-in-out forwards;
animation-delay: 0.5s;
}

.animation-image {
width: 300px;
height: 300px;
border-radius: 50%;
box-shadow: 2px 5px 10px rgba(0, 0, 0, 0.4);
}

.adoption-form-button {
padding: 12px 25px;
background-color: #335624;
color: #e2b997;
border: none;
border-radius: 5px;
font-size: 18px;
font-weight: bold;
cursor: pointer;
width: auto;
margin-top: 20px;
opacity: 0;
animation: fadeIn 1s ease-in-out forwards;
animation-delay: 0.8s;
font-family: "Sour Gummy", sans-serif;
transition: all 0.3s ease-in-out;
}

.adoption-form-button:hover {
background-color: #53391e;
transform: scale(1.05);
}

.header-subtext {
font-family: "Sour Gummy", sans-serif;
color: #335624;
margin-top: 20px;
font-size: 18px;
}

.highlight {
font-weight: bold;
color: #b67c4d;
}
Loading