Make lightbar wider on mobile, move to top

This commit is contained in:
Jip Fr 2023-08-21 13:16:00 +02:00
parent fe7c496e0a
commit b94b6b0249
2 changed files with 61 additions and 44 deletions

View File

@ -19,7 +19,7 @@ export function Navigation(props: NavigationProps) {
return (
<>
<div className="absolute inset-x-0 top-0 flex h-[88px] items-center justify-center">
<div className="absolute inset-x-0 mt-20 flex items-center sm:mt-0">
<div className="absolute inset-x-0 -mt-[22%] flex items-center sm:mt-0">
<Lightbar />
</div>
</div>

View File

@ -1,19 +1,34 @@
.lightbar, .lightbar-visual {
position: absolute;
top: 0;
width: 150vw;
width: 500vw;
height: 800px;
pointer-events: none;
user-select: none;
}
.lightbar {
left: 50vw;
transform: translateX(-50%);
}
@screen sm {
.lightbar, .lightbar-visual {
width: 150vw;
}
.lightbar {
left: -25vw;
transform: initial;
}
}
.lightbar {
display: flex;
justify-content: center;
align-items: center;
--d: 3s;
--animation: cubic-bezier(.75,-0.00,.25,1);
--animation: cubic-bezier(.75, -0.00, .25, 1);
animation: boot var(--d) var(--animation) forwards;
}
@ -21,8 +36,8 @@
left: 0;
--top: theme('colors.background.main');
--bottom: theme('colors.lightBar.light');
--first: conic-gradient(from 90deg at 80% 50%,var(--top),var(--bottom));
--second: conic-gradient(from 270deg at 20% 50%,var(--bottom),var(--top));
--first: conic-gradient(from 90deg at 80% 50%, var(--top), var(--bottom));
--second: conic-gradient(from 270deg at 20% 50%, var(--bottom), var(--top));
mask-image: radial-gradient(100% 50% at center center, black, transparent);
background-image: var(--first), var(--second);
background-position-x: 1%, 99%;
@ -46,6 +61,7 @@
opacity: 0.25;
}
to {
opacity: 1;
}
@ -55,6 +71,7 @@
0% {
transform: rotate(180deg) translateZ(0px) translateY(400px) scaleX(0.8);
}
100% {
transform: rotate(180deg) translateZ(0px) translateY(400px) scaleX(1);
}