diff --git a/remix/app/components/Buttons/Attention.tsx b/remix/app/components/Buttons/Attention.tsx
new file mode 100644
index 0000000..9b19ace
--- /dev/null
+++ b/remix/app/components/Buttons/Attention.tsx
@@ -0,0 +1,32 @@
+import React from 'react'
+import { Flex } from '@chakra-ui/react'
+
+export const Attention = props => {
+ return (
+
+
+
+ )
+}
diff --git a/remix/app/components/Buttons/Hamburger.tsx b/remix/app/components/Buttons/Hamburger.tsx
new file mode 100644
index 0000000..c8a60ba
--- /dev/null
+++ b/remix/app/components/Buttons/Hamburger.tsx
@@ -0,0 +1,38 @@
+import React from 'react'
+import { Flex } from '@chakra-ui/react'
+
+export const Hamburger = props => {
+ const lineCount = [1, 2, 3]
+
+ return (
+
+ {lineCount.map((line, idx) => {
+ return (
+
+ )
+ })}
+
+ )
+}
diff --git a/remix/app/components/Layout/Main.tsx b/remix/app/components/Layout/Main.tsx
new file mode 100644
index 0000000..b5eeed7
--- /dev/null
+++ b/remix/app/components/Layout/Main.tsx
@@ -0,0 +1,11 @@
+import { Flex } from '@chakra-ui/react'
+import { Nav } from '../Nav/Nav'
+
+export const Main = props => {
+ return (
+
+
+ {props.children}
+
+ )
+}
diff --git a/remix/app/components/Nav/Nav.tsx b/remix/app/components/Nav/Nav.tsx
new file mode 100644
index 0000000..20eec82
--- /dev/null
+++ b/remix/app/components/Nav/Nav.tsx
@@ -0,0 +1,26 @@
+import React from 'react'
+import { Flex } from '@chakra-ui/react'
+import { RainbowSkeleton } from '../Skeleton/RainbowSkeleton'
+
+export const Nav = props => {
+ return (
+ <>
+
+
+
+
+ >
+ )
+}
diff --git a/remix/app/components/Nav/ReactiveNav.tsx b/remix/app/components/Nav/ReactiveNav.tsx
new file mode 100644
index 0000000..f9bc1db
--- /dev/null
+++ b/remix/app/components/Nav/ReactiveNav.tsx
@@ -0,0 +1,69 @@
+import React from 'react'
+import { Flex } from '@chakra-ui/react'
+import { Hamburger } from '../Buttons/Hamburger'
+import { Attention } from '../Buttons/Attention'
+import { RightNav } from './ReactiveRightNav'
+
+export const ReactiveNav = props => {
+ const [navItems] = React.useState([{}])
+
+ const setNav = React.useCallback(active => {
+ setMt(active ? '100%' : '0%')
+ setNavActive(active)
+ }, [])
+
+ React.useEffect(() => {
+ // react to mouse move event
+ const listener = event => {
+ if (event?.clientY <= 20) {
+ setNav(true)
+ } else if (event?.clientY >= 100) {
+ setNav(false)
+ }
+ }
+ window.addEventListener('mousemove', listener)
+ return () => {
+ window.removeEventListener('mousemove', listener)
+ }
+ }, [setNav])
+
+ const [navActive, setNavActive] = React.useState(false)
+
+ const [mt, setMt] = React.useState('0%')
+
+ return (
+ <>
+
+
+
+ {/* w={navActive ? '0px' : '40px'} */}
+
+
+
+
+ >
+ )
+}
diff --git a/remix/app/components/Nav/ReactiveRightNav.tsx b/remix/app/components/Nav/ReactiveRightNav.tsx
new file mode 100644
index 0000000..a60c100
--- /dev/null
+++ b/remix/app/components/Nav/ReactiveRightNav.tsx
@@ -0,0 +1,82 @@
+import React from 'react'
+import { Center, Text } from '@chakra-ui/react'
+
+export const ReactiveRightNav = props => {
+ const setNav = React.useCallback(active => {
+ setMr(active ? '0%' : '-100%')
+ setNavActive(active)
+ }, [])
+
+ const [entered, setEntered] = React.useState(false)
+
+ React.useEffect(() => {
+ // react to mouse move event
+ const listener = event => {
+ const windowWidth = window.innerWidth
+ if (!entered) {
+ if (event?.clientX >= windowWidth - 60) {
+ setNav(true)
+ } else if (event?.clientX <= windowWidth - 100) {
+ setNav(false)
+ }
+ }
+ }
+ window.addEventListener('mousemove', listener)
+ return () => {
+ window.removeEventListener('mousemove', listener)
+ }
+ }, [setNav, entered])
+
+ const [navActive, setNavActive] = React.useState(false)
+
+ // const defaultMr = '-100%'
+ const defaultMr = '0%'
+
+ const [mr, setMr] = React.useState(defaultMr)
+
+ const navItems = React.useMemo(() => {
+ return ['home', 'imagine', 'create', 'share']
+ }, [])
+
+ return (
+
+ setEntered(true)}
+ onMouseLeave={() => setEntered(false)}
+ flexDir={'column'}
+ borderLeftRadius={'40px'}
+ h='85%'
+ minW={'600px'}
+ maxW='100%'
+ py={80}
+ px={100}
+ bg={`rgba(0, 0, 0, 0.01)`}
+ >
+ {navItems.map((navItem, idx) => {
+ return (
+
+ {navItem}
+
+ )
+ })}
+
+
+ )
+}
diff --git a/remix/app/components/Skeleton/RainbowSkeleton.tsx b/remix/app/components/Skeleton/RainbowSkeleton.tsx
new file mode 100644
index 0000000..2d19ca7
--- /dev/null
+++ b/remix/app/components/Skeleton/RainbowSkeleton.tsx
@@ -0,0 +1,47 @@
+import React from 'react'
+import { Flex } from '@chakra-ui/react'
+
+export const RainbowSkeleton = props => {
+
+ const [rainbowColours] = React.useState(["#f34a4a", "#ffbc48", "#58ca70", "#47b5e6", "#a555e8"])
+
+ const keyframes = React.useMemo(() => {
+ let keyframes = {}
+ rainbowColours.forEach((colour, idx) => {
+ keyframes[Math.round(idx * 100 / rainbowColours.length) + "%"] = { backgroundColor: colour }
+ })
+ keyframes["100%"] = { backgroundColor: rainbowColours[0] }
+ return keyframes
+ }, [rainbowColours])
+
+ if (props?.loaded) {
+ return props?.children
+ }
+
+ return (
+
+
+
+ )
+}
diff --git a/remix/app/components/rainbowText.tsx b/remix/app/components/rainbowText.tsx
index 62b7247..0e1fc23 100644
--- a/remix/app/components/rainbowText.tsx
+++ b/remix/app/components/rainbowText.tsx
@@ -5,6 +5,7 @@ export const RainbowText = props => {
return (
{
const texts = React.useMemo(() => {
return [
'thingtime',
- 'creative',
- 'tt',
'vibrant',
- 'powerful',
- 'love',
'infinite',
+ 'creative',
+ 'powerful',
'magical',
- 'inspiring'
+ 'inspiring',
+ 'love',
+ 'tt'
]
}, [])
const [titleText, setTitleText] = React.useState(texts[0])
React.useEffect(() => {
- const newTimeout = Math.random() * 3500 + 1500
+ const newTimeout = Math.random() * 1500 + 2500
setTimeout(() => {
- let newTextIdx = Math.round(Math.random() * (texts.length - 1))
- if (newTextIdx === texts.indexOf(titleText)) {
- newTextIdx = newTextIdx + 1
- }
+ // let newTextIdx = Math.round(Math.random() * (texts.length - 1))
+ let newTextIdx = texts?.indexOf(titleText) + 1
+ // if (newTextIdx === texts.indexOf(titleText)) {
+ // newTextIdx = newTextIdx + 1
+ // }
const newText = texts[newTextIdx] || texts[0]
setTitleText(newText)
}, newTimeout)
diff --git a/remix/app/root.tsx b/remix/app/root.tsx
index 36195e5..2d7264a 100644
--- a/remix/app/root.tsx
+++ b/remix/app/root.tsx
@@ -9,6 +9,7 @@ import {
ScrollRestoration
} from '@remix-run/react'
import { Analytics } from '@vercel/analytics/react'
+import { Main } from './components/Layout/Main'
function Document ({
children,
@@ -27,7 +28,7 @@ function Document ({
- {children}
+ {children}
diff --git a/remix/package.json b/remix/package.json
index 35888bc..a748850 100644
--- a/remix/package.json
+++ b/remix/package.json
@@ -3,7 +3,7 @@
"sideEffects": false,
"scripts": {
"build": "remix build",
- "dev": "remix dev"
+ "dev": "remix dev --port 9999"
},
"dependencies": {
"@chakra-ui/react": "^2.7.1",