mirror of
https://github.com/timmypidashev/web.git
synced 2026-04-14 11:03:50 +00:00
Rework mobile device detection
This commit is contained in:
@@ -41,7 +41,7 @@ export default function AnimationSwitcher() {
|
||||
|
||||
return (
|
||||
<div
|
||||
className="fixed bottom-4 left-4 z-[101] pointer-events-auto hidden lg:block"
|
||||
className="fixed bottom-4 left-4 z-[101] pointer-events-auto hidden desk:block"
|
||||
onMouseEnter={() => setHovering(true)}
|
||||
onMouseLeave={() => setHovering(false)}
|
||||
onClick={handleClick}
|
||||
|
||||
@@ -333,11 +333,11 @@ const Background: React.FC<BackgroundProps> = ({
|
||||
const getContainerClasses = () => {
|
||||
if (isIndex) {
|
||||
return mobileOnly
|
||||
? "fixed inset-0 -z-10 lg:hidden"
|
||||
? "fixed inset-0 -z-10 desk:hidden"
|
||||
: "fixed inset-0 -z-10";
|
||||
}
|
||||
|
||||
const baseClasses = "fixed top-0 bottom-0 hidden lg:block -z-10";
|
||||
const baseClasses = "fixed top-0 bottom-0 hidden desk:block -z-10";
|
||||
return position === "left"
|
||||
? `${baseClasses} left-0`
|
||||
: `${baseClasses} right-0`;
|
||||
|
||||
@@ -12,7 +12,7 @@ export default function Footer({ fixed = false }) {
|
||||
|
||||
return (
|
||||
<footer className={`w-full font-bold pointer-events-none ${fixed ? "fixed bottom-0 left-0 right-0" : ""}`}>
|
||||
<div className="hidden lg:flex flex-row px-2 py-1 text-lg lg:px-6 lg:py-1.5 lg:text-3xl md:text-2xl justify-between md:justify-center space-x-2 md:space-x-10 lg:space-x-20 pointer-events-none [&_a]:pointer-events-auto">
|
||||
<div className="hidden desk:flex flex-row px-2 py-1 text-lg lg:px-6 lg:py-1.5 lg:text-3xl md:text-2xl justify-between md:justify-center space-x-2 md:space-x-10 lg:space-x-20 pointer-events-none [&_a]:pointer-events-auto">
|
||||
{footerLinks}
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
@@ -92,7 +92,7 @@ export default function Header({ transparent = false }: { transparent?: boolean
|
||||
`}
|
||||
>
|
||||
<div className={`
|
||||
w-full hidden lg:flex flex-row items-center justify-center
|
||||
w-full hidden desk:flex flex-row items-center justify-center
|
||||
pointer-events-none
|
||||
${!isIndexPage ? 'bg-background md:bg-transparent' : ''}
|
||||
`}>
|
||||
|
||||
@@ -54,7 +54,7 @@ export default function MobileNav({ transparent = false }: { transparent?: boole
|
||||
return (
|
||||
<>
|
||||
<nav
|
||||
className={`fixed bottom-0 left-0 right-0 z-50 lg:hidden transition-transform duration-300 ${
|
||||
className={`fixed bottom-0 left-0 right-0 z-50 desk:hidden transition-transform duration-300 ${
|
||||
visible ? "translate-y-0" : "translate-y-full"
|
||||
} ${
|
||||
transparent
|
||||
|
||||
@@ -89,7 +89,7 @@ export default function ThemeSwitcher() {
|
||||
return (
|
||||
<>
|
||||
<div
|
||||
className="fixed bottom-4 right-4 z-[101] pointer-events-auto hidden lg:block"
|
||||
className="fixed bottom-4 right-4 z-[101] pointer-events-auto hidden desk:block"
|
||||
onMouseEnter={() => setHovering(true)}
|
||||
onMouseLeave={() => setHovering(false)}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user