feat: adjust mobile viewport margin and update company branding in footer
This commit is contained in:
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
import { motion, Transition } from 'framer-motion'
|
import { motion, Transition } from 'framer-motion'
|
||||||
import React from 'react'
|
import React from 'react'
|
||||||
|
import { useMediaQuery } from '@/hooks/useMediaQuery'
|
||||||
|
|
||||||
type FadeInProps = {
|
type FadeInProps = {
|
||||||
children: React.ReactNode
|
children: React.ReactNode
|
||||||
@@ -10,15 +11,18 @@ type FadeInProps = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function FadeIn({ children, transition, className }: FadeInProps) {
|
export function FadeIn({ children, transition, className }: FadeInProps) {
|
||||||
|
const isMobile = useMediaQuery('(max-width: 768px)')
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<motion.div
|
<motion.div
|
||||||
className={className}
|
className={className}
|
||||||
initial={{ opacity: 0, y: 20 }}
|
initial={{ opacity: 0, y: 20 }}
|
||||||
whileInView={{ opacity: 1, y: 0 }}
|
whileInView={{ opacity: 1, y: 0 }}
|
||||||
viewport={{ once: false, margin: '0px 0px -100px 0px' }}
|
viewport={{ once: false, margin: isMobile ? '0px 0px -50px 0px' : '0px 0px -100px 0px' }}
|
||||||
transition={transition || { duration: 0.5 }}
|
transition={transition || { duration: 0.5 }}
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
</motion.div>
|
</motion.div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -58,7 +58,7 @@ export function Footer() {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex flex-col items-center border-t border-gray-800 pt-8 pb-12 md:flex-row-reverse md:justify-between md:pt-6">
|
<div className="flex flex-col items-center border-t border-gray-800 pt-8 pb-12 md:flex-row-reverse md:justify-between md:pt-6">
|
||||||
<form className="flex w-full justify-center md:w-auto">
|
{/* <form className="flex w-full justify-center md:w-auto">
|
||||||
<TextField
|
<TextField
|
||||||
type="email"
|
type="email"
|
||||||
aria-label="Email address"
|
aria-label="Email address"
|
||||||
@@ -72,9 +72,9 @@ export function Footer() {
|
|||||||
<span className="hidden lg:inline">Join our newsletter</span>
|
<span className="hidden lg:inline">Join our newsletter</span>
|
||||||
<span className="lg:hidden">Join newsletter</span>
|
<span className="lg:hidden">Join newsletter</span>
|
||||||
</Button>
|
</Button>
|
||||||
</form>
|
</form> */}
|
||||||
<p className="mt-6 text-sm text-gray-400 md:mt-0 ">
|
<p className="mt-6 text-sm text-gray-400 md:mt-0 ">
|
||||||
© Copyright ThreeFold {new Date().getFullYear()}. All rights reserved.
|
© Copyright OurWorld Holdings, {new Date().getFullYear()}. All rights reserved.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</Container>
|
</Container>
|
||||||
|
@@ -122,7 +122,7 @@ export function Header() {
|
|||||||
<MobileNavLink href="/#faqs">FAQs</MobileNavLink>
|
<MobileNavLink href="/#faqs">FAQs</MobileNavLink>
|
||||||
</div>
|
</div>
|
||||||
<div className="mt-8 flex flex-col gap-4">
|
<div className="mt-8 flex flex-col gap-4">
|
||||||
<Button href="https://docs.ourworld.tf/mycelium_cloud/docs/" variant="outline" color="white">
|
<Button href="https://docs.ourworld.tf/mycelium_cloud/docs/" variant="outline" color="white" target="_blank" rel="noopener noreferrer">
|
||||||
Docs
|
Docs
|
||||||
</Button>
|
</Button>
|
||||||
<Button href="https://www.mycelium.threefold.io/download/" color="cyan">Get Started</Button>
|
<Button href="https://www.mycelium.threefold.io/download/" color="cyan">Get Started</Button>
|
||||||
@@ -135,7 +135,7 @@ export function Header() {
|
|||||||
)}
|
)}
|
||||||
</Popover>
|
</Popover>
|
||||||
<div className="flex items-center gap-6 max-lg:hidden">
|
<div className="flex items-center gap-6 max-lg:hidden">
|
||||||
<Button href="https://docs.ourworld.tf/mycelium_cloud/docs/" variant="outline" color="white">
|
<Button href="https://docs.ourworld.tf/mycelium_cloud/docs/" variant="outline" color="white" target="_blank" rel="noopener noreferrer">
|
||||||
Docs
|
Docs
|
||||||
</Button>
|
</Button>
|
||||||
<Button href="https://www.mycelium.threefold.io/download/" color="cyan">Get Started</Button>
|
<Button href="https://www.mycelium.threefold.io/download/" color="cyan">Get Started</Button>
|
||||||
|
@@ -92,7 +92,7 @@ export function WorldMap() {
|
|||||||
<CT color="light" className="uppercase tracking-wide">SSD CAPACITY</CT>
|
<CT color="light" className="uppercase tracking-wide">SSD CAPACITY</CT>
|
||||||
<CountUpNumber end={5388956} color="light" className="mt-2 text-3xl font-bold" />
|
<CountUpNumber end={5388956} color="light" className="mt-2 text-3xl font-bold" />
|
||||||
<CP color="light" className="mt-2 text-sm">
|
<CP color="light" className="mt-2 text-sm">
|
||||||
Total amount of storage (SSD, HDD, & RAM) on the grid.
|
Total GB amount of storage (SSD, HDD, & RAM) on the grid.
|
||||||
</CP>
|
</CP>
|
||||||
</motion.div>
|
</motion.div>
|
||||||
|
|
||||||
|
21
src/hooks/useMediaQuery.ts
Normal file
21
src/hooks/useMediaQuery.ts
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
'use client'
|
||||||
|
|
||||||
|
import { useState, useEffect } from 'react'
|
||||||
|
|
||||||
|
export function useMediaQuery(query: string) {
|
||||||
|
const [matches, setMatches] = useState(false)
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
const media = window.matchMedia(query)
|
||||||
|
if (media.matches !== matches) {
|
||||||
|
setMatches(media.matches)
|
||||||
|
}
|
||||||
|
const listener = () => {
|
||||||
|
setMatches(media.matches)
|
||||||
|
}
|
||||||
|
media.addEventListener('change', listener)
|
||||||
|
return () => media.removeEventListener('change', listener)
|
||||||
|
}, [matches, query])
|
||||||
|
|
||||||
|
return matches
|
||||||
|
}
|
Reference in New Issue
Block a user