Fixed header navigation style
This commit is contained in:
parent
613617da0b
commit
c269e0d632
|
@ -71,12 +71,16 @@
|
||||||
align-items: center;
|
align-items: center;
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
height: 56px;
|
height: 56px;
|
||||||
padding: 0 $container-padding-x 0 0;
|
padding: 0;
|
||||||
position: relative;
|
position: relative;
|
||||||
transition: height 0.2s;
|
transition: height 0.2s;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
z-index: 9;
|
z-index: 9;
|
||||||
|
|
||||||
|
@include media-breakpoint-up(sm) {
|
||||||
|
padding: 0 6rem 0 0;
|
||||||
|
}
|
||||||
|
|
||||||
@include media-breakpoint-up(md) {
|
@include media-breakpoint-up(md) {
|
||||||
height: 70px;
|
height: 70px;
|
||||||
}
|
}
|
||||||
|
@ -141,6 +145,7 @@
|
||||||
|
|
||||||
.mainNavigation {
|
.mainNavigation {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
|
font-weight: 500;
|
||||||
list-style: none;
|
list-style: none;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
|
@ -204,10 +209,14 @@
|
||||||
box-sizing: content-box;
|
box-sizing: content-box;
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
float: right;
|
float: right;
|
||||||
|
padding-left: 0;
|
||||||
padding-right: 0;
|
padding-right: 0;
|
||||||
padding-left: divide($container-padding-x, 2);
|
|
||||||
width: 2.2rem;
|
width: 2.2rem;
|
||||||
|
|
||||||
|
@include media-breakpoint-up(sm) {
|
||||||
|
padding-left: divide($container-padding-x, 2);
|
||||||
|
}
|
||||||
|
|
||||||
@include media-breakpoint-up(md) {
|
@include media-breakpoint-up(md) {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
@ -318,12 +327,16 @@
|
||||||
.articleControls {
|
.articleControls {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
left: 0;
|
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
right: 2rem;
|
||||||
top: 50%;
|
top: 50%;
|
||||||
transform: translateY(-50%);
|
transform: translateY(-50%);
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
||||||
|
@include media-breakpoint-up(md) {
|
||||||
|
right: 0;
|
||||||
|
}
|
||||||
|
|
||||||
.control {
|
.control {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
border: 0;
|
border: 0;
|
||||||
|
@ -344,7 +357,11 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.control + .control {
|
.control + .control {
|
||||||
margin-left: 1.6rem;
|
margin-left: 1.2rem;
|
||||||
|
|
||||||
|
@include media-breakpoint-up(sm) {
|
||||||
|
margin-left: 2rem;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
img {
|
img {
|
||||||
|
@ -390,12 +407,20 @@
|
||||||
display: flex;
|
display: flex;
|
||||||
height: 2.4em;
|
height: 2.4em;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
margin-left: divide($container-padding-x, 2);
|
margin-left: divide($container-padding-x, 4);
|
||||||
position: relative;
|
position: relative;
|
||||||
|
transition: margin-left 0.3s;
|
||||||
width: 2.4em;
|
width: 2.4em;
|
||||||
|
|
||||||
@include media-breakpoint-up(sm) {
|
@include media-breakpoint-down(sm) {
|
||||||
margin-left: 1.2rem;
|
margin-left: 0.4rem !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.headerScrolledTop &,
|
||||||
|
.headerScrolledBottom & {
|
||||||
|
border-color: transparent;
|
||||||
|
margin-left: 0;
|
||||||
|
transition: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.circlewrap {
|
.circlewrap {
|
||||||
|
|
|
@ -8,17 +8,19 @@ img {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.notifications-counter {
|
.notificationsCounter {
|
||||||
background-color: red;
|
background-color: #d00820;
|
||||||
border-radius: 1rem;
|
border: 2px solid #fff;
|
||||||
|
border-radius: 2em;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
height: 1.5em;
|
height: 1.6em;
|
||||||
line-height: 1.5em;
|
left: 1.1em;
|
||||||
|
line-height: 1.25em;
|
||||||
|
padding: 0 0.25em;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: -0.5rem;
|
|
||||||
text-align: center;
|
text-align: center;
|
||||||
top: -0.5rem;
|
top: -0.5rem;
|
||||||
width: 1.5em;
|
min-width: 1.5em;
|
||||||
}
|
}
|
|
@ -1,7 +1,7 @@
|
||||||
import { mergeProps, Show } from 'solid-js'
|
import { mergeProps, Show } from 'solid-js'
|
||||||
import type { JSX } from 'solid-js'
|
import type { JSX } from 'solid-js'
|
||||||
import { clsx } from 'clsx'
|
import { clsx } from 'clsx'
|
||||||
import './Icon.css'
|
import styles from './Icon.module.scss'
|
||||||
|
|
||||||
type IconProps = {
|
type IconProps = {
|
||||||
class?: string
|
class?: string
|
||||||
|
@ -16,10 +16,10 @@ export const Icon = (passedProps: IconProps) => {
|
||||||
const props = mergeProps({ title: '', counter: 0 }, passedProps)
|
const props = mergeProps({ title: '', counter: 0 }, passedProps)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div class={clsx('icon', props.class)} style={props.style}>
|
<div class={clsx(styles.icon, props.class)} style={props.style}>
|
||||||
<img src={`/icons/${props.name}.svg`} alt={props.title ?? props.name} class={props.iconClassName} />
|
<img src={`/icons/${props.name}.svg`} alt={props.title ?? props.name} class={props.iconClassName} />
|
||||||
<Show when={props.counter}>
|
<Show when={props.counter}>
|
||||||
<div class="notifications-counter">{props.counter}</div>
|
<div class={styles.notificationsCounter}>{props.counter}</div>
|
||||||
</Show>
|
</Show>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|
|
@ -690,11 +690,11 @@ astro-island {
|
||||||
|
|
||||||
.shift-content {
|
.shift-content {
|
||||||
@include media-breakpoint-up(md) {
|
@include media-breakpoint-up(md) {
|
||||||
margin-left: 127px;
|
margin-left: 161px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@include media-breakpoint-up(lg) {
|
@include media-breakpoint-up(lg) {
|
||||||
margin-left: 201px;
|
margin-left: 235px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user