diff --git a/src/components/Nav/Header.module.scss b/src/components/Nav/Header.module.scss index 967ef756..b84fd0b2 100644 --- a/src/components/Nav/Header.module.scss +++ b/src/components/Nav/Header.module.scss @@ -512,18 +512,25 @@ } .subnavigation { - background: #fff; + background: #000; + color: #fff; font-weight: 500; left: 0; position: absolute; top: 100%; + transform: translateY(-2px); width: 100%; + @include media-breakpoint-down(md) { + display: none; + } + ul { display: flex; flex-wrap: wrap; height: 6rem; line-height: 6rem; + margin-bottom: 0; padding: 0 150px 0 0; position: relative; overflow: hidden; @@ -548,31 +555,33 @@ a:link, a:visited { border: none; + color: #fff; + + .icon { + filter: invert(1); + } &:hover { - .subnavigationItemName { - background: #000; - } - - .icon { - filter: invert(1); - } + opacity: 0.5; } } } .subnavigationItemName { align-items: center; - background: #fff; display: flex; transition: background-color 0.3s; .subnavigationFeed & { - line-height: 1.4; + line-height: 60px; } } .subnavigationFeed { + ul { + padding-right: 0; + } + li { align-items: center; display: flex; diff --git a/src/components/Nav/Header.tsx b/src/components/Nav/Header.tsx index be286e1d..07d1d460 100644 --- a/src/components/Nav/Header.tsx +++ b/src/components/Nav/Header.tsx @@ -111,11 +111,27 @@ export const Header = (props: Props) => { } const toggleSubnavigation = (isShow, signal) => { + clearTimer() setIsKnowledgeBaseVisible(false) setIsTopicsVisible(false) setIsZineVisible(false) setIsFeedVisible(false) - signal(isShow) + + if (signal) { + signal(isShow) + } + } + + let timer = 0 + + const clearTimer = () => { + clearTimeout(timer) + } + + const hideSubnavigation = () => { + timer = setTimeout(() => { + toggleSubnavigation(false) + }, 500) } return ( @@ -144,14 +160,15 @@ export const Header = (props: Props) => { {t('Discours')} -
+
{props.title}
-
+
-
+
-
+
  • #Интервью @@ -330,6 +367,8 @@ export const Header = (props: Props) => {
    • diff --git a/src/components/Nav/HeaderAuth.tsx b/src/components/Nav/HeaderAuth.tsx index 6eaae6a8..4cd3c4ba 100644 --- a/src/components/Nav/HeaderAuth.tsx +++ b/src/components/Nav/HeaderAuth.tsx @@ -107,8 +107,8 @@ export const HeaderAuth = (props: Props) => { return ( -
      -
      +
      +