-
Notifications
You must be signed in to change notification settings - Fork 123
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #437 from bobronaud/switch-to-new-landing
Closed #434
- Loading branch information
Showing
52 changed files
with
190 additions
and
205 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 was deleted.
Oops, something went wrong.
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
File renamed without changes.
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,89 @@ | ||
import { Link } from 'react-router-dom'; | ||
import { Container, Navbar, Image, Nav, Button } from 'react-bootstrap'; | ||
import { useTranslation } from 'react-i18next'; | ||
import { useTernaryDarkMode } from 'usehooks-ts'; | ||
import LanguageSelector from '../../components/Navigation/LanguageSelector.jsx'; | ||
import ThemeSelector from '../../components/Navigation/ThemeSelector.jsx'; | ||
import routes from '../../routes.js'; | ||
|
||
import RunItLogoLight from './assets/LogoHeaderLightTheme.svg'; | ||
import RunItLogoDark from './assets/LogoHeaderDarkTheme.svg'; | ||
import Burger from './assets/Burger.svg'; | ||
|
||
import 'bootstrap/dist/css/bootstrap.min.css'; | ||
import './landing.scss'; | ||
import './custom-colors.scss'; | ||
|
||
function Header() { | ||
const { t } = useTranslation(); | ||
const { isDarkMode } = useTernaryDarkMode(); | ||
|
||
const logo = isDarkMode ? RunItLogoDark : RunItLogoLight; | ||
return ( | ||
<header> | ||
<Navbar expand="lg"> | ||
<Container className="justify-content-between"> | ||
<Navbar.Brand className="mr-5"> | ||
<Image src={logo} /> | ||
</Navbar.Brand> | ||
<Navbar.Toggle | ||
aria-controls="navbar-responsive" | ||
className="border-0 ms-auto" | ||
data-bs-toogle="collapse" | ||
> | ||
<Image src={Burger} /> | ||
</Navbar.Toggle> | ||
<Navbar.Collapse className="my-3 mb-lg-0" id="navbar-responsive"> | ||
<Nav as="ul" className="text-center"> | ||
<li> | ||
<Navbar.Brand className="header-link" href="#aboutProject"> | ||
<span>{t('landing.header.about')}</span> | ||
</Navbar.Brand> | ||
</li> | ||
<li> | ||
<Navbar.Brand className="header-link" href="#advantages"> | ||
<span>{t('landing.header.advantages')}</span> | ||
</Navbar.Brand> | ||
</li> | ||
<li> | ||
<Navbar.Brand className="header-link" href="#possibilities"> | ||
<span>{t('landing.header.opportunities')}</span> | ||
</Navbar.Brand> | ||
</li> | ||
<li> | ||
<Navbar.Brand className="header-link" href="#faq"> | ||
<span>{t('landing.header.faq')}</span> | ||
</Navbar.Brand> | ||
</li> | ||
</Nav> | ||
<Nav | ||
as="ul" | ||
className="mb-3 mb-lg-0 gap-1 ms-auto align-items-center" | ||
> | ||
<LanguageSelector /> | ||
<ThemeSelector /> | ||
<Button | ||
as={Link} | ||
className="rounded-5 btn-signin" | ||
to={routes.signInPagePath()} | ||
variant="primary" | ||
> | ||
<span>{t('profileActions.signIn')}</span> | ||
</Button> | ||
<Button | ||
as={Link} | ||
className="rounded-5 btn-signup" | ||
to={routes.signUpPagePath()} | ||
variant="secondary" | ||
> | ||
<span>{t('profileActions.signUp')}</span> | ||
</Button> | ||
</Nav> | ||
</Navbar.Collapse> | ||
</Container> | ||
</Navbar> | ||
</header> | ||
); | ||
} | ||
|
||
export default Header; |
Oops, something went wrong.