show logo on mobile

master
alex 2024-01-26 20:16:49 +01:00
parent f5617c96d0
commit a26af8f20c
5 changed files with 22 additions and 7 deletions

View File

@ -1,7 +1,7 @@
import "antd/dist/reset.css"; import "antd/dist/reset.css";
import "./App.css"; import "./App.css";
import Login from "./Pages/Login"; import Login from "./Pages/Login";
import { Layout, Space, Spin, Typography } from "antd"; import { Layout, Spin, Typography } from "antd";
import { Constants, UseUserSession, myFetch } from "./utils"; import { Constants, UseUserSession, myFetch } from "./utils";
import DashboardLayout from "./Components/DashboardLayout"; import DashboardLayout from "./Components/DashboardLayout";
import SideBarProvider from "./Contexts/SideBarContext"; import SideBarProvider from "./Contexts/SideBarContext";
@ -13,7 +13,7 @@ import { useEffect, useState } from "react";
import StoresProvider from "./Contexts/StoresContext"; import StoresProvider from "./Contexts/StoresContext";
import { clarity } from "react-microsoft-clarity"; import { clarity } from "react-microsoft-clarity";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { ReactComponent as ZeitAdler } from "./ZeitAdler.svg"; import MyAppLogo from "./Components/MyAppLogo";
export function Loading() { export function Loading() {
const { t } = useTranslation(); const { t } = useTranslation();
@ -28,7 +28,7 @@ export function Loading() {
height: "100vh", height: "100vh",
}} }}
> >
<ZeitAdler <MyAppLogo
style={{ style={{
width: 320, width: 320,
height: 90, height: 90,

View File

@ -1,6 +1,8 @@
import { MenuFoldOutlined, MenuUnfoldOutlined } from "@ant-design/icons"; import { MenuFoldOutlined, MenuUnfoldOutlined } from "@ant-design/icons";
import { Button } from "antd"; import { Button } from "antd";
import { Header } from "antd/es/layout/layout"; import { Header } from "antd/es/layout/layout";
import MyAppLogo from "../MyAppLogo";
import { BreakpointLgWidth } from "../../utils";
export default function HeaderMenu({ export default function HeaderMenu({
isSideMenuCollapsed, isSideMenuCollapsed,
@ -28,6 +30,14 @@ export default function HeaderMenu({
onClick={() => setIsSideMenuCollapsed(!isSideMenuCollapsed)} onClick={() => setIsSideMenuCollapsed(!isSideMenuCollapsed)}
style={{ fontSize: "16px", width: 64, height: 64 }} style={{ fontSize: "16px", width: 64, height: 64 }}
/> />
<div style={{ display: "flex", justifyContent: "center" }}>
{window.document.body.clientWidth < BreakpointLgWidth && (
<MyAppLogo height={60} width={200} />
)}
</div>
<div style={{ width: 64, height: 64 }} />
</Header> </Header>
); );
} }

View File

@ -0,0 +1,5 @@
import { ReactComponent as ZeitAdler } from "../../ZeitAdler.svg";
export default function MyAppLogo({ ...props }) {
return <ZeitAdler {...props} />;
}

View File

@ -17,7 +17,7 @@ import { BreakpointLgWidth, Constants, isDevelopmentEnv } from "../../utils";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { useSideBarContext } from "../../Contexts/SideBarContext"; import { useSideBarContext } from "../../Contexts/SideBarContext";
import { useStoresContext } from "../../Contexts/StoresContext"; import { useStoresContext } from "../../Contexts/StoresContext";
import { ReactComponent as ZeitAdler } from "../../ZeitAdler.svg"; import MyAppLogo from "../MyAppLogo";
export function SideMenuContent({ export function SideMenuContent({
setIsSideMenuCollapsed, setIsSideMenuCollapsed,
@ -181,7 +181,7 @@ export function SideMenuContent({
padding: 10, padding: 10,
}} }}
> >
<ZeitAdler width={200} height={60} /> <MyAppLogo width={200} height={60} />
{isDevelopmentEnv() && ( {isDevelopmentEnv() && (
<p style={{ color: "#6878d6", fontWeight: "bold" }}>DEV</p> <p style={{ color: "#6878d6", fontWeight: "bold" }}>DEV</p>

View File

@ -13,7 +13,7 @@ import {
MyUsernameFormInput, MyUsernameFormInput,
} from "../../Components/MyFormInputs"; } from "../../Components/MyFormInputs";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { ReactComponent as ZeitAdler } from "../../ZeitAdler.svg"; import MyAppLogo from "../../Components/MyAppLogo";
export default function Login() { export default function Login() {
const { t } = useTranslation(); const { t } = useTranslation();
@ -95,7 +95,7 @@ export default function Login() {
justifyContent: "center", justifyContent: "center",
}} }}
> >
<ZeitAdler height={80} /> <MyAppLogo height={80} />
</div> </div>
<Tabs <Tabs