]> git.localhorst.tv Git - alttp.git/commitdiff
link tech and map
authorDaniel Karbach <daniel.karbach@localhorst.tv>
Sun, 5 Feb 2023 16:47:43 +0000 (17:47 +0100)
committerDaniel Karbach <daniel.karbach@localhorst.tv>
Sun, 5 Feb 2023 16:47:43 +0000 (17:47 +0100)
resources/js/components/common/Footer.js
resources/js/components/common/Header.js
resources/js/i18n/de.js
resources/js/i18n/en.js

index 0ded211215847eb82526f303b73a5b68684b55af..361c1f711cb82bc494af8eb9d2811c27f440594c 100644 (file)
@@ -46,7 +46,14 @@ const Footer = () => {
                                        <Nav.Item as="li">
                                                <LinkContainer to="/tech">
                                                        <Nav.Link className="p-0 text-muted" href="/tech">
-                                                               ALttP Tech Index
+                                                               {t('footer.tech')}
+                                                       </Nav.Link>
+                                               </LinkContainer>
+                                       </Nav.Item>
+                                       <Nav.Item as="li">
+                                               <LinkContainer to="/map">
+                                                       <Nav.Link className="p-0 text-muted" href="/map">
+                                                               {t('footer.map')}
                                                        </Nav.Link>
                                                </LinkContainer>
                                        </Nav.Item>
index 6868477b54328a3078e16d8f10103f6ee446f92e..1bb2ce18c18f676af2d935bccebf62429e189aac 100644 (file)
@@ -2,16 +2,17 @@ import PropTypes from 'prop-types';
 import React from 'react';
 import { Button, Container, Nav, Navbar } from 'react-bootstrap';
 import { LinkContainer } from 'react-router-bootstrap';
-import { withTranslation } from 'react-i18next';
+import { useTranslation } from 'react-i18next';
 
 import Icon from './Icon';
 import LanguageSwitcher from './LanguageSwitcher';
 import { getAvatarUrl } from '../../helpers/User';
 import { withUser } from '../../helpers/UserContext';
-import i18n from '../../i18n';
 
-const Header = ({ doLogout, user }) =>
-       <Navbar id="header" bg="dark" variant="dark">
+const Header = ({ doLogout, user }) => {
+       const { t } = useTranslation();
+
+       return <Navbar id="header" bg="dark" variant="dark">
                <Container fluid>
                        <LinkContainer to="/">
                                <Navbar.Brand>
@@ -30,7 +31,19 @@ const Header = ({ doLogout, user }) =>
                                        </Nav.Link>
                                </LinkContainer>
                        </Nav>
-                       <Navbar.Text className="ms-auto me-2">
+                       <Nav className="ms-auto">
+                               <LinkContainer to="/tech">
+                                       <Nav.Link href="/tech">
+                                               {t('menu.tech')}
+                                       </Nav.Link>
+                               </LinkContainer>
+                               <LinkContainer to="/map">
+                                       <Nav.Link href="/map">
+                                               {t('menu.map')}
+                                       </Nav.Link>
+                               </LinkContainer>
+                       </Nav>
+                       <Navbar.Text className="mx-2">
                                <LanguageSwitcher />
                        </Navbar.Text>
                        <Nav>
@@ -45,7 +58,7 @@ const Header = ({ doLogout, user }) =>
                                                </LinkContainer>
                                                <Button
                                                        onClick={doLogout}
-                                                       title={i18n.t('button.logout')}
+                                                       title={t('button.logout')}
                                                        variant="outline-secondary"
                                                >
                                                        <Icon.LOGOUT title="" />
@@ -63,13 +76,13 @@ const Header = ({ doLogout, user }) =>
                                        >
                                                <Icon.DISCORD />
                                                {' '}
-                                               {i18n.t('button.login')}
+                                               {t('button.login')}
                                        </Button>
                                }
                        </Nav>
                </Container>
-       </Navbar>
-;
+       </Navbar>;
+};
 
 Header.propTypes = {
        doLogout: PropTypes.func,
@@ -81,4 +94,4 @@ Header.propTypes = {
        }),
 };
 
-export default withTranslation()(withUser(Header));
+export default withUser(Header);
index f4b73e5b0e7be479749ebf136af6ad0e0900d052..0f7c8ff5c0ddccac8735b4cecafe3149cba9fc5c 100644 (file)
@@ -283,10 +283,12 @@ export default {
                        connect: 'Connect Spedruns Discord',
                        contact: 'Wenn du gerne ein Turnier auf dieser Seite organisieren möchtest, wende dich bitte an HolySmoke#5229 im Discord.',
                        info: 'Infos',
+                       map: 'ALttP Karte',
                        privacy: 'Datenschutz',
                        resources: 'Ressourcen',
                        smd: 'Deutscher Super Metroid Discord',
                        smwiki: 'Super Metroid Speedrunning Wiki',
+                       tech: 'ALttP Techniken',
                },
                general: {
                        anonymous: 'Anonym',
@@ -385,6 +387,10 @@ export default {
                        uwLong: 'Underworld',
                        uwShort: 'UW',
                },
+               menu: {
+                       map: 'Karte',
+                       tech: 'Techniken',
+               },
                modes: {
                        heading: 'Modi',
                },
index 6498b85927eb3bce4864fa996568d9c46bbd8c3a..7414796e70157c6107eb8a7b3583a32319e0ce00 100644 (file)
@@ -283,10 +283,12 @@ export default {
                        connect: 'Connect Spedruns Discord',
                        contact: 'If you would like to organize a Tournament on this site, please contact HolySmoke#5229 on Discord.',
                        info: 'Infos',
+                       map: 'ALttP Map',
                        privacy: 'Privacy',
                        resources: 'Resources',
                        smd: 'German Super Metroid Discord',
                        smwiki: 'Super Metroid Speedrunning Wiki',
+                       tech: 'ALttP Tech',
                },
                general: {
                        anonymous: 'Anonym',
@@ -385,6 +387,10 @@ export default {
                        uwLong: 'Underworld',
                        uwShort: 'UW',
                },
+               menu: {
+                       map: 'Map',
+                       tech: 'Tech',
+               },
                modes: {
                        heading: 'Modes',
                },