Web: NavMenu: Was Done for tablet and mobile:
- hide module name - added logo - added short logo fro mobile - changed width of logo
This commit is contained in:
parent
9d5e2ab828
commit
5f16720aba
@ -1,4 +1,4 @@
|
||||
<svg width="254" height="24" viewBox="0 0 254 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<svg width="220" height="24" viewBox="0 0 220 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M10.9387 23.7057L0.656893 18.7625C-0.218964 18.331 -0.218964 17.664 0.656893 17.2717L4.23648 15.5455L10.9006 18.7625C11.7765 19.1941 13.1855 19.1941 14.0232 18.7625L20.6874 15.5455L24.2669 17.2717C25.1428 17.7033 25.1428 18.3702 24.2669 18.7625L13.9852 23.7057C13.1855 24.098 11.7765 24.098 10.9387 23.7057Z" fill="#FF6F3D"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M10.9387 17.6249L0.656893 12.6817C-0.218964 12.2501 -0.218964 11.5832 0.656893 11.1909L4.16032 9.50391L10.9387 12.7601C11.8145 13.1917 13.2235 13.1917 14.0613 12.7601L20.8397 9.50391L24.3431 11.1909C25.219 11.6224 25.219 12.2894 24.3431 12.6817L14.0613 17.6249C13.1855 18.0564 11.7765 18.0564 10.9387 17.6249Z" fill="#95C038"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M10.9387 11.7008L0.656893 6.75765C-0.218964 6.3261 -0.218964 5.65916 0.656893 5.26684L10.9387 0.323661C11.8145 -0.107887 13.2235 -0.107887 14.0613 0.323661L24.3431 5.26684C25.219 5.69839 25.219 6.36533 24.3431 6.75765L14.0613 11.7008C13.1855 12.0931 11.7765 12.0931 10.9387 11.7008Z" fill="#5DC0E8"/>
|
||||
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
@ -3,6 +3,7 @@ import { inject, observer } from "mobx-react";
|
||||
import PropTypes from "prop-types";
|
||||
import styled, { css } from "styled-components";
|
||||
import { Link as LinkWithoutRedirect } from "react-router-dom";
|
||||
import { isMobileOnly } from "react-device-detect";
|
||||
import NavItem from "./nav-item";
|
||||
import Headline from "@appserver/common/components/Headline";
|
||||
import Nav from "./nav";
|
||||
@ -17,6 +18,7 @@ import { desktop, tablet } from "@appserver/components/utils/device";
|
||||
import i18n from "../i18n";
|
||||
import { combineUrl } from "@appserver/common/utils";
|
||||
import { AppServerConfig } from "@appserver/common/constants";
|
||||
|
||||
const { proxyURL } = AppServerConfig;
|
||||
|
||||
const backgroundColor = "#0F4071";
|
||||
@ -33,6 +35,7 @@ const Header = styled.header`
|
||||
|
||||
${(props) =>
|
||||
props.module &&
|
||||
!props.isPersonal &&
|
||||
css`
|
||||
@media ${tablet} {
|
||||
display: none;
|
||||
@ -45,9 +48,7 @@ const Header = styled.header`
|
||||
font-size: 21px;
|
||||
line-height: 0;
|
||||
margin-top: -5px;
|
||||
cursor: ${(props) => (props.isPersonal ? "default" : "pointer")};
|
||||
|
||||
${(props) => props.isPersonal && `margin-left: 16px;`}
|
||||
cursor: "pointer";
|
||||
|
||||
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
||||
-webkit-user-drag: none;
|
||||
@ -76,17 +77,28 @@ const Header = styled.header`
|
||||
}
|
||||
|
||||
.header-logo-icon {
|
||||
width: ${(props) => (props.isPersonal ? "254px" : "146px")};
|
||||
${(props) => props.isPersonal && `margin-left: 17px;`}
|
||||
width: ${(props) => (props.isPersonal ? "220px" : "146px")};
|
||||
${(props) => props.isPersonal && `margin-left: 20px;`}
|
||||
height: 24px;
|
||||
position: relative;
|
||||
padding: 0 20px 0 6px;
|
||||
padding: ${(props) => (!props.isPersonal ? "0 20px 0 6px" : "0")};
|
||||
cursor: pointer;
|
||||
|
||||
@media (max-width: 620px) {
|
||||
display: ${(props) => (props.module ? "none" : "block")};
|
||||
padding: 0px 20px 0 6px;
|
||||
@media ${tablet} {
|
||||
${(props) => props.isPersonal && `margin-left: 16px;`}
|
||||
}
|
||||
|
||||
@media (max-width: 620px) {
|
||||
${(props) =>
|
||||
!props.isPersonal &&
|
||||
css`
|
||||
display: ${(props) => (props.module ? "none" : "block")};
|
||||
padding: 0px 20px 0 6px;
|
||||
`}
|
||||
}
|
||||
}
|
||||
.mobile-short-logo {
|
||||
width: 146px;
|
||||
}
|
||||
`;
|
||||
|
||||
@ -178,7 +190,7 @@ const HeaderComponent = ({
|
||||
<LinkWithoutRedirect className="header-logo-wrapper" to={defaultPage}>
|
||||
{!isPersonal ? (
|
||||
<img alt="logo" src={props.logoUrl} className="header-logo-icon" />
|
||||
) : (
|
||||
) : !isMobileOnly ? (
|
||||
<img
|
||||
alt="logo"
|
||||
className="header-logo-icon"
|
||||
@ -187,17 +199,27 @@ const HeaderComponent = ({
|
||||
"/static/images/personal.logo.react.svg"
|
||||
)}
|
||||
/>
|
||||
) : (
|
||||
<img
|
||||
className="header-logo-icon mobile-short-logo"
|
||||
src={combineUrl(
|
||||
AppServerConfig.proxyURL,
|
||||
"/static/images/nav.logo.opened.react.svg"
|
||||
)}
|
||||
/>
|
||||
)}
|
||||
</LinkWithoutRedirect>
|
||||
|
||||
<Headline
|
||||
className="header-module-title"
|
||||
type="header"
|
||||
color="#FFF"
|
||||
{...(!isPersonal && { onClick: onClick })}
|
||||
>
|
||||
{currentProductName}
|
||||
</Headline>
|
||||
{!isPersonal && (
|
||||
<Headline
|
||||
className="header-module-title"
|
||||
type="header"
|
||||
color="#FFF"
|
||||
onClick={onClick}
|
||||
>
|
||||
{currentProductName}
|
||||
</Headline>
|
||||
)}
|
||||
</Header>
|
||||
|
||||
{isNavAvailable && (
|
||||
|
Loading…
Reference in New Issue
Block a user