mirror of
https://github.com/LaconicNetwork/laconic.com.git
synced 2026-02-28 18:04:08 +00:00
New assets
This commit is contained in:
parent
ea95c606a2
commit
da0130db58
BIN
public/images/contact/banner-contact-light.png
Normal file
BIN
public/images/contact/banner-contact-light.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 151 KiB |
@ -188,4 +188,8 @@
|
||||
filter: invert(100%);
|
||||
}
|
||||
}
|
||||
|
||||
.hero__container {
|
||||
mix-blend-mode: darken;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,3 +1,6 @@
|
||||
import { useTheme } from 'next-themes'
|
||||
import { useEffect, useRef } from 'react'
|
||||
|
||||
import { Arrow } from '~/components/icons/arrow'
|
||||
import Line from '~/components/icons/line'
|
||||
import { Discord } from '~/components/icons/socials'
|
||||
@ -19,21 +22,40 @@ interface Props {
|
||||
}
|
||||
|
||||
const Hero = ({ data }: Props) => {
|
||||
const { theme } = useTheme()
|
||||
|
||||
const contactHeroRef = useRef<HTMLImageElement>(null)
|
||||
const contactHeroMobileRef = useRef<HTMLImageElement>(null)
|
||||
|
||||
useEffect(() => {
|
||||
if (!contactHeroRef.current) return
|
||||
if (!contactHeroMobileRef.current) return
|
||||
|
||||
contactHeroRef.current.src =
|
||||
theme === 'dark'
|
||||
? '/images/contact/banner-contact.png'
|
||||
: '/images/contact/banner-contact-light.png'
|
||||
contactHeroMobileRef.current.src =
|
||||
theme === 'dark'
|
||||
? '/images/contact/banner-contact.png'
|
||||
: '/images/contact/banner-contact-light.png'
|
||||
}, [theme])
|
||||
|
||||
return (
|
||||
<Section className={s['section']} disableFadeIn>
|
||||
<div className={s.gradient} />
|
||||
<div className={s.hero__container}>
|
||||
<img
|
||||
ref={contactHeroRef}
|
||||
className={s.hero}
|
||||
loading="eager"
|
||||
alt="hero"
|
||||
src="/images/contact/banner-contact.png"
|
||||
/>
|
||||
<img
|
||||
ref={contactHeroMobileRef}
|
||||
className={s.hero__mobile}
|
||||
loading="eager"
|
||||
alt="hero"
|
||||
src="/images/contact/banner-contact.png"
|
||||
/>
|
||||
</div>
|
||||
<Container className={s['container']}>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user