Skip to content

Commit 6b82ffa

Browse files
committed
wip
1 parent 37830de commit 6b82ffa

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

pages/index.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,6 @@ const Home = ({ bio, avatar_url, blog, email, randomE }) => {
3232
recaptchaRef.current.execute()
3333
ReactGA.set({ page: window.location.pathname })
3434
ReactGA.pageview(window.location.pathname)
35-
36-
window.document.querySelector('#__next').style.backgroundImage = `url(${randomE})`
37-
window.document.querySelector('#__next').style.backgroundSize = 'cover'
3835
}, [])
3936

4037
const statusScript = useScript(
@@ -80,10 +77,14 @@ const Home = ({ bio, avatar_url, blog, email, randomE }) => {
8077

8178
<div className="absolute right-0 z-10 text-center origin-top rotate-45 translate-x-1/2 bg-white mt-9 mr-9 w-72" >
8279
<div className="py-1 lg:text-xl">
83-
<a href="https://github.com/oxicode" target='_blank' rel="noreferrer"><FaGithub className={'align-sub inline-block'} /> Github </a>
80+
<a href="https://github.com/oxicode" target='_blank' rel="noreferrer">
81+
<FaGithub className={'align-sub inline-block'} /> Github
82+
</a>
8483
</div>
8584
</div>
86-
<div className="flex flex-col min-h-screen">
85+
<div
86+
style={{ '--bg-url': `url(${randomE})` }}
87+
className="flex flex-col min-h-screen bg-cover bg-[image:var(--bg-url)]" >
8788
<div className="relative m-auto">
8889
<div className="absolute top-0 left-0 w-full h-6 bg-zz-bottom bg-[length:1rem]"></div>
8990
<div className="absolute bottom-0 left-0 w-full h-6 bg-zz-top bg-[length:1rem]"></div>

0 commit comments

Comments
 (0)