-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
263 additions
and
8 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
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
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
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,30 @@ | ||
.home { | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
justify-content: space-around; | ||
width: 100%; | ||
} | ||
|
||
.buttons > button { | ||
width:300px; | ||
justify-content: center; | ||
} | ||
|
||
.buttons>.go-to-add-button{ | ||
margin-top:1em; | ||
color:var(--white); | ||
border-color: var(--white); | ||
} | ||
|
||
.buttons>.go-to-prez-button{ | ||
color:var(--black-grey); | ||
border-color: var(--black-grey); | ||
background-color: var(--pink); | ||
} | ||
|
||
.buttons>.go-to-prez-button:hover{ | ||
background-color: var(--black-grey); | ||
color: var(--pink); | ||
border-color: var(--pink); | ||
} |
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
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,62 @@ | ||
.page { | ||
display:flex; | ||
height: 100vh; | ||
/* max-height:100vh; */ | ||
} | ||
.sidebar { | ||
min-width:250px; | ||
height:100%; | ||
background-color:var(--pink); | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
gap:1em; | ||
} | ||
|
||
button{ | ||
cursor: pointer; | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
width:200px; | ||
padding: 10px 10px; | ||
background: none; | ||
border: solid var(--black-grey) 1px; | ||
border-radius: 10px; | ||
} | ||
button:hover{ | ||
color:var(--white); | ||
background-color: var(--black-grey); | ||
} | ||
|
||
.logo { | ||
cursor: pointer; | ||
display: flex; | ||
align-items: center; | ||
color: var(--black-grey); | ||
font-weight: 900; | ||
font-size: x-large; | ||
} | ||
|
||
.divider { | ||
/* height: 1px; */ | ||
border: solid var(--black-grey) 0.5px; | ||
width:80%; | ||
margin: 1em; | ||
} | ||
|
||
@media screen and (max-width: 992px) { | ||
.page{ | ||
flex-direction: column; | ||
|
||
} | ||
.sidebar { | ||
min-width:250px; | ||
height:auto; | ||
background-color:var(--pink); | ||
display: flex; | ||
flex-direction: row; | ||
align-items: center; | ||
gap:1em; | ||
} | ||
} |
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
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,16 @@ | ||
import HomeLogo from '../assets/home_design.svg'; | ||
import { NavigationButton } from './NavigationButton'; | ||
import '../assets/css/Home.css'; | ||
|
||
export const Home = () => { | ||
return ( | ||
<div className="home"> | ||
<h1>Bienvenue sur CodePrez</h1> | ||
<img src={HomeLogo} alt="" /> | ||
<div className="buttons"> | ||
<NavigationButton goTo="prez" /> | ||
<NavigationButton goTo="add" /> | ||
</div> | ||
</div> | ||
); | ||
}; |
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,40 @@ | ||
import React, { FC } from 'react'; | ||
import { useNavigate } from 'react-router-dom'; | ||
interface NavigationButtonProp { | ||
goTo: 'prez' | 'add'; | ||
withIcon?: boolean; | ||
} | ||
|
||
export const NavigationButton: FC<NavigationButtonProp> = ({ | ||
goTo, | ||
withIcon, | ||
}) => { | ||
const navigate = useNavigate(); | ||
const createCodePrez = () => { | ||
navigate('/add'); | ||
}; | ||
|
||
const launchPresentation = () => { | ||
navigate('/prez'); | ||
}; | ||
if (goTo === 'prez') { | ||
return ( | ||
<button onClick={launchPresentation} className="go-to-prez-button"> | ||
Ouvrir une présentation | ||
{withIcon && ( | ||
<span className="material-symbols-outlined">play_arrow</span> | ||
)} | ||
</button> | ||
); | ||
} else if (goTo === 'add') { | ||
return ( | ||
<button onClick={createCodePrez} className="go-to-add-button"> | ||
Nouvelle présentation | ||
{withIcon && ( | ||
<span className="material-symbols-outlined">add_circle</span> | ||
)} | ||
</button> | ||
); | ||
} | ||
return <></>; | ||
}; |
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
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,9 @@ | ||
//TODO: display slides ! | ||
|
||
export const Presentation = () => { | ||
return ( | ||
<div> | ||
<h1>Presentation</h1> | ||
</div> | ||
); | ||
}; |
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,29 @@ | ||
import { Outlet, useNavigate } from 'react-router-dom'; | ||
import '../assets/css/SideBar.css'; | ||
import CodePrezLogo from '../assets/logo.svg'; | ||
import { NavigationButton } from './NavigationButton'; | ||
export const SideBar = () => { | ||
const navigate = useNavigate(); | ||
|
||
const home = () => { | ||
navigate('/'); | ||
}; | ||
return ( | ||
<div className="page"> | ||
<div className="sidebar"> | ||
<link | ||
rel="stylesheet" | ||
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@48,400,0,0" | ||
/> | ||
<div className="logo" onClick={home}> | ||
<img src={CodePrezLogo} alt="" width="50" /> | ||
<p>CodePrez</p> | ||
</div> | ||
<NavigationButton goTo="add" withIcon /> | ||
<NavigationButton goTo="prez" withIcon /> | ||
<div className="divider" /> | ||
</div> | ||
<Outlet></Outlet> | ||
</div> | ||
); | ||
}; |
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