diff --git a/src/components/Nav/Header.module.scss b/src/components/Nav/Header.module.scss index 74a81550..a7218721 100644 --- a/src/components/Nav/Header.module.scss +++ b/src/components/Nav/Header.module.scss @@ -71,12 +71,16 @@ align-items: center; display: inline-flex; height: 56px; - padding: 0 $container-padding-x 0 0; + padding: 0; position: relative; transition: height 0.2s; text-align: center; z-index: 9; + @include media-breakpoint-up(sm) { + padding: 0 6rem 0 0; + } + @include media-breakpoint-up(md) { height: 70px; } @@ -141,6 +145,7 @@ .mainNavigation { display: inline-flex; + font-weight: 500; list-style: none; margin: 0; opacity: 1; @@ -204,10 +209,14 @@ box-sizing: content-box; display: inline-flex; float: right; + padding-left: 0; padding-right: 0; - padding-left: divide($container-padding-x, 2); width: 2.2rem; + @include media-breakpoint-up(sm) { + padding-left: divide($container-padding-x, 2); + } + @include media-breakpoint-up(md) { display: none; } @@ -318,12 +327,16 @@ .articleControls { display: flex; justify-content: flex-end; - left: 0; position: absolute; + right: 2rem; top: 50%; transform: translateY(-50%); width: 100%; + @include media-breakpoint-up(md) { + right: 0; + } + .control { cursor: pointer; border: 0; @@ -344,7 +357,11 @@ } .control + .control { - margin-left: 1.6rem; + margin-left: 1.2rem; + + @include media-breakpoint-up(sm) { + margin-left: 2rem; + } } img { @@ -390,12 +407,20 @@ display: flex; height: 2.4em; justify-content: center; - margin-left: divide($container-padding-x, 2); + margin-left: divide($container-padding-x, 4); position: relative; + transition: margin-left 0.3s; width: 2.4em; - @include media-breakpoint-up(sm) { - margin-left: 1.2rem; + @include media-breakpoint-down(sm) { + margin-left: 0.4rem !important; + } + + .headerScrolledTop &, + .headerScrolledBottom & { + border-color: transparent; + margin-left: 0; + transition: none; } .circlewrap { diff --git a/src/components/Nav/Icon.css b/src/components/Nav/Icon.module.scss similarity index 51% rename from src/components/Nav/Icon.css rename to src/components/Nav/Icon.module.scss index c59128ed..64609e56 100644 --- a/src/components/Nav/Icon.css +++ b/src/components/Nav/Icon.module.scss @@ -8,17 +8,19 @@ img { height: 100%; } -.notifications-counter { - background-color: red; - border-radius: 1rem; +.notificationsCounter { + background-color: #d00820; + border: 2px solid #fff; + border-radius: 2em; color: #fff; font-size: 1rem; font-weight: 700; - height: 1.5em; - line-height: 1.5em; + height: 1.6em; + left: 1.1em; + line-height: 1.25em; + padding: 0 0.25em; position: absolute; - right: -0.5rem; text-align: center; top: -0.5rem; - width: 1.5em; + min-width: 1.5em; } diff --git a/src/components/Nav/Icon.tsx b/src/components/Nav/Icon.tsx index 227e2115..cd570306 100644 --- a/src/components/Nav/Icon.tsx +++ b/src/components/Nav/Icon.tsx @@ -1,7 +1,7 @@ import { mergeProps, Show } from 'solid-js' import type { JSX } from 'solid-js' import { clsx } from 'clsx' -import './Icon.css' +import styles from './Icon.module.scss' type IconProps = { class?: string @@ -16,10 +16,10 @@ export const Icon = (passedProps: IconProps) => { const props = mergeProps({ title: '', counter: 0 }, passedProps) return ( -