-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add profile image users, add audio draven, start creation of play music
- Loading branch information
1 parent
5846586
commit ae9874c
Showing
40 changed files
with
635 additions
and
7 deletions.
There are no files selected for viewing
This file contains 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
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
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.
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.
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.
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.
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.
This file contains 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,75 @@ | ||
import { useState } from "react"; | ||
|
||
import { store } from "../../facilities/store"; | ||
import { useNavigate } from "react-router-dom"; | ||
import { toast } from "react-toastify"; | ||
|
||
import * as C from "./styles"; | ||
import { FiLogOut } from "react-icons/fi"; | ||
import MusicLegend from "../../assets/music-legends.png"; | ||
import { ProfileImages } from "../ProfileImages"; | ||
import Borda from "../../assets/borda.png"; | ||
export function Header({ children, isProfile }) { | ||
const [profile, setProfile] = useState(false); | ||
const [imageProfile, setImageProfile] = useState({ | ||
id: 0, | ||
name: "Yasuo", | ||
image: | ||
"https://i.pinimg.com/originals/fb/e5/72/fbe572e1faefa97388243a952acfbe93.jpg", | ||
}); | ||
|
||
const navigate = useNavigate(); | ||
|
||
const logoutClient = () => { | ||
store.removeStorage("user"); | ||
toast.success("Logout efetuado com sucesso!", { | ||
position: "top-right", | ||
autoClose: 1500, | ||
hideProgressBar: false, | ||
closeOnClick: true, | ||
pauseOnHover: false, | ||
draggable: true, | ||
progress: undefined, | ||
}); | ||
navigate("/"); | ||
}; | ||
|
||
const handleProfile = () => { | ||
if (profile) { | ||
setProfile(false); | ||
return; | ||
} | ||
setProfile(true); | ||
}; | ||
|
||
const handleImageProfile = (element) => { | ||
setImageProfile(element); | ||
setProfile(false); | ||
}; | ||
|
||
return ( | ||
<C.Container> | ||
<div className="lib"> | ||
<p className="info">Biblioteca de Musicas</p> | ||
</div> | ||
|
||
<img className="logo" alt="music-legends" src={MusicLegend} /> | ||
|
||
<C.ContainerUser> | ||
<p className="info">{children}Yasuo</p> | ||
<img src={imageProfile.image} alt={imageProfile.name} /> | ||
<img | ||
className="borda" | ||
src={Borda} | ||
alt="borda-lvl-500" | ||
onClick={handleProfile} | ||
/> | ||
<FiLogOut onClick={() => logoutClient()} /> | ||
</C.ContainerUser> | ||
|
||
{profile && isProfile && ( | ||
<ProfileImages onClickOn={(element) => handleImageProfile(element)} /> | ||
)} | ||
</C.Container> | ||
); | ||
} |
This file contains 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,96 @@ | ||
import styled from "styled-components"; | ||
|
||
export const Container = styled.div` | ||
width: 100%; | ||
height: 12vh; | ||
background: #14061f; | ||
align-items: center; | ||
justify-content: space-between; | ||
display: flex; | ||
padding: 0px 40px; | ||
position: fixed; | ||
z-index: 1000; | ||
.logo { | ||
width: 200px; | ||
} | ||
.lib { | ||
width: 200px; | ||
display: flex; | ||
justify-content: center; | ||
} | ||
.info:after { | ||
content: ""; | ||
width: 0; | ||
height: 2px; | ||
background: #2ef4cc; | ||
position: absolute; | ||
left: 0; | ||
bottom: -12px; | ||
transition: width 0.2s; | ||
} | ||
.info { | ||
transition: color 0.2s; | ||
position: relative; | ||
color: #c0c0c0; | ||
font-weight: 400; | ||
font-size: 18px; | ||
padding-bottom: 3px; | ||
line-height: 20px; | ||
cursor: pointer; | ||
transition: 0.1s; | ||
} | ||
.info:hover::after { | ||
width: 100%; | ||
} | ||
`; | ||
|
||
export const ContainerUser = styled.div` | ||
width: 200px; | ||
display: flex; | ||
align-items: center; | ||
gap: 32px; | ||
position: relative; | ||
p { | ||
border: none; | ||
} | ||
img { | ||
width: 50px; | ||
height: 50px; | ||
border-radius: 50%; | ||
cursor: pointer; | ||
:hover { | ||
opacity: 0.8; | ||
} | ||
:active { | ||
opacity: 0.6; | ||
} | ||
} | ||
svg { | ||
color: #c0c0c0; | ||
font-size: 24px; | ||
cursor: pointer; | ||
transition: 0.2s; | ||
:hover { | ||
opacity: 0.8; | ||
} | ||
:active { | ||
opacity: 0.6; | ||
} | ||
} | ||
.borda { | ||
width: 70px; | ||
height: 70px; | ||
position: absolute; | ||
right: 61px; | ||
} | ||
`; |
This file contains 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,41 @@ | ||
import { useState } from "react"; | ||
import * as C from "./styles"; | ||
|
||
import { | ||
AiOutlineLeft, | ||
AiOutlineRight, | ||
AiOutlinePlayCircle, | ||
AiOutlineEllipsis, | ||
AiOutlinePauseCircle, | ||
} from "react-icons/ai"; | ||
|
||
export function MediaPlayer() { | ||
const [pause, setPause] = useState(false); | ||
|
||
return ( | ||
<C.Container> | ||
<C.ContainerNameMusic> | ||
<p className="music">Warrior</p> | ||
<p className="description">RIOT GAMES FT. IMAGINE DRAGONS</p> | ||
</C.ContainerNameMusic> | ||
<C.ContainerControls> | ||
<AiOutlineLeft /> | ||
{pause ? ( | ||
<AiOutlinePauseCircle | ||
className="control" | ||
onClick={() => setPause(false)} | ||
/> | ||
) : ( | ||
<AiOutlinePlayCircle | ||
className="control" | ||
onClick={() => setPause(true)} | ||
/> | ||
)} | ||
<AiOutlineRight /> | ||
</C.ContainerControls> | ||
<C.ContainerMenu> | ||
<AiOutlineEllipsis /> | ||
</C.ContainerMenu> | ||
</C.Container> | ||
); | ||
} |
This file contains 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,80 @@ | ||
import styled from "styled-components"; | ||
|
||
export const Container = styled.div` | ||
width: 100%; | ||
height: 10vh; | ||
position: fixed; | ||
bottom: 0px; | ||
background: #14061f; | ||
justify-content: space-between; | ||
display: flex; | ||
align-items: center; | ||
padding: 0px 30px; | ||
color: #fff; | ||
`; | ||
|
||
export const ContainerNameMusic = styled.div` | ||
max-width: 200px; | ||
.music { | ||
font-weight: 500; | ||
font-size: 18px; | ||
line-height: 28px; | ||
letter-spacing: 0.04em; | ||
color: #f1f0f0; | ||
} | ||
.description { | ||
font-weight: 500; | ||
font-size: 12px; | ||
line-height: 21px; | ||
text-transform: uppercase; | ||
color: #c0c0c0; | ||
opacity: 0.6; | ||
} | ||
`; | ||
|
||
export const ContainerControls = styled.div` | ||
width: 200px; | ||
display: flex; | ||
align-items: center; | ||
gap: 20px; | ||
justify-content: space-between; | ||
svg { | ||
color: #4ac08f; | ||
font-size: 26px; | ||
cursor: pointer; | ||
:hover { | ||
opacity: 0.8; | ||
} | ||
:active { | ||
opacity: 0.6; | ||
} | ||
} | ||
.control { | ||
font-size: 32px; | ||
} | ||
`; | ||
|
||
export const ContainerMenu = styled.div` | ||
width: 200px; | ||
display: flex; | ||
align-items: center; | ||
justify-content: end; | ||
svg { | ||
color: #4ac08f; | ||
font-size: 32px; | ||
cursor: pointer; | ||
:hover { | ||
opacity: 0.8; | ||
} | ||
:active { | ||
opacity: 0.6; | ||
} | ||
} | ||
`; |
This file contains 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 * as C from "./styles"; | ||
|
||
import { profileImages } from "./profile-images"; | ||
export function ProfileImages({ onClickOn }) { | ||
return ( | ||
<C.Container> | ||
{profileImages.map((element) => ( | ||
<div onClick={() => onClickOn(element)}> | ||
<img key={element.id} src={element.image} alt={element.name} /> | ||
<C.Name>{element.name}</C.Name> | ||
</div> | ||
))} | ||
</C.Container> | ||
); | ||
} |
Oops, something went wrong.