-
Couldn't load subscription status.
- Fork 12
🦸♂️ 🦸♀️ 🦸 #1
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
Aya-Jafar
wants to merge
10
commits into
shecodestooiq:master
Choose a base branch
from
Aya-Jafar:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
🦸♂️ 🦸♀️ 🦸 #1
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
b2e4ce7
initial layout
Aya-Jafar 1c7dd37
adding tabs and fetch data
Aya-Jafar de52204
sc
Aya-Jafar 24365b1
sc
Aya-Jafar 93d2cdc
sc
Aya-Jafar 6d3b494
Add files via upload
Aya-Jafar 01c44ca
Update README.md
Aya-Jafar 0f1f274
adding search results list
Aya-Jafar 7c84da1
initial steps in changing content after search
Aya-Jafar 3c2c913
changing content based on seach results & removing local useState
Aya-Jafar File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,6 +4,7 @@ | |
| /node_modules | ||
| /.pnp | ||
| .pnp.js | ||
| .env | ||
|
|
||
| # testing | ||
| /coverage | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,38 +1,249 @@ | ||
| .App { | ||
| text-align: center; | ||
| * { | ||
| color: white; | ||
| } | ||
|
|
||
| .wrapper { | ||
| background: rgb(221, 62, 86); | ||
| background: linear-gradient( | ||
| 180deg, | ||
| rgba(221, 62, 86, 1) 0%, | ||
| rgba(187, 52, 111, 1) 50%, | ||
| rgba(139, 39, 143, 1) 100% | ||
| ); | ||
| height: 100vh; | ||
|
|
||
| display: flex; | ||
| align-items: center; | ||
| justify-content: center; | ||
| } | ||
|
|
||
| .main-div { | ||
| height: 80vh; | ||
| width: 80vw; | ||
| border-radius: 20px; | ||
| background-color: #0a0a0a; | ||
| display: flex; | ||
| flex-direction: column; | ||
| } | ||
|
|
||
| .first-section { | ||
| display: flex; | ||
| justify-content: space-between; | ||
| align-items: center; | ||
| padding: 0 5%; | ||
| flex-wrap: wrap; | ||
| } | ||
|
|
||
| strong { | ||
| color: rgb(241, 59, 59); | ||
| } | ||
|
|
||
| .search-input-container { | ||
| position: relative; | ||
| margin-top: 1%; | ||
| } | ||
|
|
||
| .search-input { | ||
| /* padding: 7px 90px; */ | ||
| font-size: 17px; | ||
| border: 1px solid #ccccccbe; | ||
| border-radius: 20px; | ||
| outline: none; | ||
| width: 25vw; | ||
| padding: 7px 10px; | ||
| margin-top: 1%; | ||
| background-color: #0a0a0abf; | ||
|
|
||
| text-align: start; | ||
| } | ||
|
|
||
| .search-icon { | ||
| position: absolute; | ||
| top: 50%; | ||
| left: 10px; | ||
| transform: translateY(-50%); | ||
| color: #ccc; /* Change the color of the search icon */ | ||
| } | ||
|
|
||
| .App-logo { | ||
| height: 40vmin; | ||
| pointer-events: none; | ||
| .content { | ||
| /* background-color: #ccc; */ | ||
| width: 90%; | ||
| height: 80%; | ||
| margin-top: 1%; | ||
| margin-left: 5%; | ||
| display: flex; | ||
| align-items: center; | ||
| /* justify-content: space-around; */ | ||
| justify-content: start; | ||
| gap: 5%; | ||
| flex-wrap: wrap; | ||
| } | ||
|
|
||
| @media (prefers-reduced-motion: no-preference) { | ||
| .App-logo { | ||
| animation: App-logo-spin infinite 20s linear; | ||
| } | ||
| .content img { | ||
| width: 35%; | ||
| height: 90%; | ||
| padding-left: 3%; | ||
| border-radius: 10px; | ||
| } | ||
| .content h1 { | ||
| font-size: 40px; | ||
| font-weight: 700; | ||
| } | ||
|
|
||
| .App-header { | ||
| background-color: #282c34; | ||
| min-height: 100vh; | ||
| .info { | ||
| display: flex; | ||
| flex-direction: column; | ||
| } | ||
|
|
||
| .tabs-line { | ||
| display: flex; | ||
| gap: 6%; | ||
| /* width: 500px; */ | ||
| width: 35vw; | ||
|
|
||
| /* font-weight: 500; | ||
| font-size: 17px; */ | ||
|
|
||
| border-bottom: 2px solid rgba(255, 255, 255, 0.1); | ||
|
|
||
| margin-bottom: 10%; | ||
| cursor: pointer; | ||
| } | ||
|
|
||
| .power-container { | ||
| display: flex; | ||
| flex-direction: column; | ||
| } | ||
|
|
||
| .power-item { | ||
| display: flex; | ||
| justify-content: space-between; | ||
| align-items: start; | ||
| margin-bottom: 30px; | ||
| font-weight: 600; | ||
| font-size: 18px; | ||
| } | ||
|
|
||
| .power-num { | ||
| color: #fcc740; | ||
| font-weight: bold; | ||
| } | ||
|
|
||
| .name-icon { | ||
| display: flex; | ||
| align-items: center; | ||
| justify-content: center; | ||
| font-size: calc(10px + 2vmin); | ||
| color: white; | ||
| gap: 30px; /* Adjust this value as needed */ | ||
| } | ||
|
|
||
| .name-icon .icon { | ||
| flex-shrink: 0; | ||
| } | ||
|
|
||
| .name-icon .label { | ||
| flex-grow: 1; | ||
| font-weight: bold; | ||
| } | ||
|
|
||
| .active { | ||
| border-bottom: 4px solid #f13c3b; | ||
| margin-bottom: 1.4px; | ||
| } | ||
|
|
||
| .biography-item { | ||
| display: flex; | ||
| gap: 10px; | ||
| } | ||
|
|
||
| .App-link { | ||
| color: #61dafb; | ||
| .biography-container { | ||
| display: flex; | ||
| flex-direction: column; | ||
| justify-content: space-around; | ||
| gap: 40px; | ||
| } | ||
|
|
||
| @keyframes App-logo-spin { | ||
| from { | ||
| transform: rotate(0deg); | ||
| } | ||
| to { | ||
| transform: rotate(360deg); | ||
| } | ||
| .key { | ||
| font-weight: 700; | ||
| /* color:#4F4F4F */ | ||
| color: #fcc740; | ||
| } | ||
| .appearance-container { | ||
| display: flex; | ||
| flex-direction: column; | ||
| gap:20px | ||
| } | ||
| .appearance-item{ | ||
| display: flex; | ||
| justify-content: space-between; | ||
| font-weight: 600; | ||
| font-size: 18px; | ||
| } | ||
|
|
||
| .name-icon .appearance div{ | ||
| font-weight: 700; | ||
| } | ||
|
|
||
| .appearance-value{ | ||
| background-color: #F06259; | ||
| padding: 1% 2%; | ||
| border-radius: 15px; | ||
| } | ||
|
|
||
|
|
||
| .connection-container{ | ||
| margin: 0; | ||
| padding: 0; | ||
| /* background-color: red; */ | ||
| display: flex; | ||
| flex-direction: column; | ||
| justify-content: space-around; | ||
| gap:100px; | ||
| margin-top: 15px; | ||
| } | ||
|
|
||
| .connection-item{ | ||
| display: flex; | ||
| flex-direction: column; | ||
| gap:10px | ||
| } | ||
|
|
||
| .bold-yellow { | ||
| color: yellow; | ||
| width: 3px; | ||
| height: 10px; | ||
| } | ||
|
|
||
| .yellow-and-text{ | ||
| display: flex; | ||
| gap:10px; | ||
| font-size: 17px; | ||
| font-weight: 700; | ||
| } | ||
|
|
||
| .search-results{ | ||
| position: absolute; | ||
| display: flex; | ||
| flex-direction: column; | ||
| margin-top: 2%; | ||
| background-color: #131313; | ||
| width: 25vw; | ||
| padding-left: 5%; | ||
| height: 70vh; | ||
| max-height: 70vh; | ||
| overflow-y: scroll; | ||
|
|
||
| } | ||
|
|
||
| .search-item{ | ||
| display: flex; | ||
| margin-top: 5%; | ||
| margin-bottom: 5%; | ||
| font-size: 16px; | ||
| gap:20px; | ||
| align-items: center; | ||
| cursor: pointer; | ||
| } | ||
|
|
||
| .search-img img{ | ||
| width: 50px; | ||
| height: 60px; | ||
| } |
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| import Wrapper from "./components/Wrapper"; | ||
| import "./App.css"; | ||
| import { DataProvider } from "./providers/dataProvider"; | ||
|
|
||
| function App() { | ||
| return ( | ||
| <> | ||
| <DataProvider> | ||
| <Wrapper /> | ||
| </DataProvider> | ||
| </> | ||
| ); | ||
| } | ||
|
|
||
| export default App; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| import React, { useContext, useState } from "react"; | ||
| import Tab from "./Tab"; | ||
| import PowersTab from "./tabs/PowersTab"; | ||
| import BiographyTab from "./tabs/BiographyTab"; | ||
| import AppearanceTab from "./tabs/AppearanceTab"; | ||
| import ConnectionTab from "./tabs/ConnectionTab"; | ||
| import Context from "../providers/dataProvider"; | ||
|
|
||
|
|
||
| function Content() { | ||
| const { currentData, setCurrentData } = useContext(Context); | ||
|
|
||
| const [currentTab, setCurrentTab] = useState("powerstats"); | ||
|
|
||
| const handleTabSelect = (tab) => setCurrentTab(tab); | ||
|
|
||
|
|
||
| const generateTabContent = (tab) => { | ||
| switch (tab) { | ||
| case "powerstats": | ||
| return <PowersTab />; | ||
| case "biography": | ||
| return <BiographyTab />; | ||
| case "appearance": | ||
| return <AppearanceTab />; | ||
| case "connections": | ||
| return <ConnectionTab />; | ||
| default: | ||
| return null; | ||
| } | ||
| }; | ||
|
|
||
| return ( | ||
| <div className="content"> | ||
| {currentData && <img src={currentData.image} alt="" />} | ||
| <div className="info"> | ||
| {currentData && ( | ||
| <> | ||
| {currentData.info && <h1>{currentData.info.name.toUpperCase()}</h1>} | ||
| <Tab onSelectTab={handleTabSelect} /> | ||
| {generateTabContent(currentTab)} | ||
| </> | ||
| )} | ||
| </div> | ||
| </div> | ||
| ); | ||
| } | ||
|
|
||
| export default Content; | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
loved how you used a switch case for this kind of condition that involves several situations and also how you used it to render components