Skip to content

5 page #14

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

Open
wants to merge 13 commits 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
38,995 changes: 38,995 additions & 0 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@
"axios": "^0.21.1",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-icons": "^4.7.1",
"react-loading": "^2.0.3",
"react-modal": "^3.13.1",
"react-router-dom": "^5.2.0",
"react-scripts": "4.0.3",
"react-to-print": "^2.14.11",
"web-vitals": "^1.0.1"
},
"scripts": {
Expand Down
Binary file added public/pokeball.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
83 changes: 80 additions & 3 deletions src/App.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
.App {
text-align: center;
}

.App-logo {
height: 40vmin;
pointer-events: none;
Expand All @@ -14,14 +13,14 @@
}

.App-header {
background-color: #282c34;
background-image: linear-gradient(rgb(148, 148, 148), #a1e1ff, rgb(47, 46, 46));
min-height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
font-size: calc(10px + 2vmin);
color: white;
color: rgb(0, 0, 0);
}

.App-link {
Expand All @@ -36,3 +35,81 @@
transform: rotate(360deg);
}
}

.list-container {
display: grid;
width: 100vw;
grid-template-columns: auto auto auto;
align-items: center;
justify-items: center;
}

.search-box {
width: 90vw;
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 20px;
}

.search-input {
width: 70%;
padding: 8px;
}

.couldnt-find {
font-size: medium;
color: rgb(58, 52, 0);
margin-bottom: 30px;
}

@media only screen and (min-width: 770px) {
.list-container {
max-width: 1280px;
}

.search-box {
max-width: 1080px;
margin-bottom: 40px;
background-color:#1d1d10;
border: 2px solid white;
color: rgb(0, 61, 18);
font-weight: bold;
padding: 0.5rem 1.5rem;
border-radius: 50px;
}

.search-input {
width: 40%;
padding: 8px;
}
}

.react-icons {
color: white
}
.button {
font: inherit;
background-color: #a38c8c;
border: 1px solid white;
color: white;
font-weight: bold;
padding: 0.5rem 1.5rem;
border-radius: 6px;
cursor: pointer;
}
.h1-tittle {
background-color: #89f1f8;
border: 1px solid white;
color: white;
font-weight: bold;
padding: 0.5rem 1.5rem;
border-radius: 6px;
}

.chat {
position: fixed;

bottom: 0;
right: 0%;
}
40 changes: 30 additions & 10 deletions src/App.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,37 @@
import "./App.css";
import Home from "./Home";
import { Route, NavLink, HashRouter } from "react-router-dom";
import PokeDex from "./PokeDex";
import Home from "./components/pages/Home";
import PokeDex from "./components/pages/PokeDex";
import AuthForm from "./components/auth/AuhtForm";
import Layout from "./components/layout/Layout";
import AuthContext from "./store/auth-context";
import { useContext } from "react";
import { HashRouter, Route, Redirect } from "react-router-dom";
import ProfilePage from "./components/pages/ProfilePage";

function App() {
const authCtx = useContext(AuthContext);
return (
<HashRouter>
<div>
<Route exact path="/" component={Home}/>
<Route path="/pokedex" component={PokeDex}/>
</div>

</HashRouter>
<Layout>
<HashRouter>
<div>
<Route exact path="/" component={Home} />
<Route path="/auth" component={AuthForm} />
<Route path="/pokedex">
{authCtx.isLoggedIn && <PokeDex />}
{!authCtx.isLoggedIn && <Redirect to="/" />}
</Route>

{/*<Route path='/profile'>
{authCtx.isLoggedIn && <ProfilePage />}
{!authCtx.isLoggedIn && <Redirect to='/' />}
</Route>*/}

<Route path="*">
<Redirect to="/" />
</Route>
</div>
</HashRouter>
</Layout>
);
}

Expand Down
32 changes: 0 additions & 32 deletions src/Home.js

This file was deleted.

97 changes: 0 additions & 97 deletions src/PokeDex.js

This file was deleted.

84 changes: 84 additions & 0 deletions src/components/DetailCard.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
.card-container {
width: 80vw;
height: auto;
}

.pokemon-name {
font-size: xx-large;
font-weight: bold;
line-height: 0%;
text-transform: capitalize;
}

.top-content {
display: grid;
}

.pokemon-img {
width: 100%;
max-height: 200px;
object-fit: cover;
}

table {
width: 100%;
text-align: left;
padding: 5px;
border: 1px aliceblue solid;
}

td, th {
text-transform: capitalize;
}

.table-wrapper {
display: flex;
align-items: center;
}

.barchart-wrapper {
width: 100%;
padding-top: 20px;
margin: 0 auto;
}

.bar-box {
background-color: #302e2e;
width: 150px;
height: 6px;
}

.progress-bar {
background-color: yellow;
height: 6px;
}

button {
padding: 5px;
background-color: yellow;
color: black;
margin-top: 20px;
}

@media only screen and (min-width: 770px) {
.card-container {
width: 600px;
}
.top-content {
grid-template-columns: 50% 50%;
}
.pokemon-img {
width: 80%;
height: auto;
max-height: none;
object-fit: cover;
}

.barchart-wrapper {
padding-top: 0;
}

.bar-box {
width: 200px;
}
}
Loading