diff --git a/src/web/.gitignore b/src/web/.gitignore
new file mode 100644
index 0000000..eab0d4b
--- /dev/null
+++ b/src/web/.gitignore
@@ -0,0 +1,4 @@
+*.db
+*.py[cod]
+.web
+__pycache__/
\ No newline at end of file
diff --git a/src/web/.web/bun.lockb b/src/web/.web/bun.lockb
index 2a35965..8f3012b 100755
Binary files a/src/web/.web/bun.lockb and b/src/web/.web/bun.lockb differ
diff --git a/src/web/.web/package.json b/src/web/.web/package.json
index bcc6b67..10b8126 100644
--- a/src/web/.web/package.json
+++ b/src/web/.web/package.json
@@ -10,7 +10,7 @@
"@emotion/react": "11.11.1",
"@radix-ui/themes": "^2.0.0",
"axios": "1.6.0",
- "framer-motion": "^11.0.8",
+ "framer-motion": "^11.0.12",
"json5": "2.2.3",
"lucide-react": "0.314.0",
"next": "14.0.1",
diff --git a/src/web/.web/pages/404.js b/src/web/.web/pages/404.js
index 30da05e..a0d10d9 100644
--- a/src/web/.web/pages/404.js
+++ b/src/web/.web/pages/404.js
@@ -14,29 +14,16 @@ import NextHead from "next/head"
-export function Fragment_e9a05c105aa9215aeba52aeec8fe2e76 () {
- const state = useContext(StateContexts.state)
- const [addEvents, connectErrors] = useContext(EventLoopContext);
+const pulse = keyframes`
+ 0% {
+ opacity: 0;
+ }
+ 100% {
+ opacity: 1;
+ }
+`
- return (
-
- {isTrue(((!state.is_hydrated) || (connectErrors.length > 0))) ? (
-
-
- {`wifi_off`}
-
-
-) : (
-
-)}
-
- )
-}
-
- import { useIsPresent } from "framer-motion";
-
-
export function Fragment_14636cc997c0546c0967a25d8e600f96 () {
const [addEvents, connectErrors] = useContext(EventLoopContext);
@@ -66,15 +53,28 @@ export function Fragment_14636cc997c0546c0967a25d8e600f96 () {
)
}
-const pulse = keyframes`
- 0% {
- opacity: 0;
- }
- 100% {
- opacity: 1;
- }
-`
+ import { useIsPresent } from "framer-motion";
+
+export function Fragment_e9a05c105aa9215aeba52aeec8fe2e76 () {
+ const state = useContext(StateContexts.state)
+ const [addEvents, connectErrors] = useContext(EventLoopContext);
+
+
+ return (
+
+ {isTrue(((!state.is_hydrated) || (connectErrors.length > 0))) ? (
+
+
+ {`wifi_off`}
+
+
+) : (
+
+)}
+
+ )
+}
export default function Component() {
@@ -92,38 +92,48 @@ export default function Component() {
-
-
+
+
+
{`About`}
+
-
-
+
+
+
{`Projects`}
+
-
-
+
+
+
{`Resume`}
+
-
-
+
+
+
{`Blog`}
+
-
-
+
+
+
{`Shop`}
+
diff --git a/src/web/.web/pages/index.js b/src/web/.web/pages/index.js
index 11b104b..1c74427 100644
--- a/src/web/.web/pages/index.js
+++ b/src/web/.web/pages/index.js
@@ -14,29 +14,16 @@ import NextHead from "next/head"
-export function Fragment_e9a05c105aa9215aeba52aeec8fe2e76 () {
- const state = useContext(StateContexts.state)
- const [addEvents, connectErrors] = useContext(EventLoopContext);
+const pulse = keyframes`
+ 0% {
+ opacity: 0;
+ }
+ 100% {
+ opacity: 1;
+ }
+`
- return (
-
- {isTrue(((!state.is_hydrated) || (connectErrors.length > 0))) ? (
-
-
- {`wifi_off`}
-
-
-) : (
-
-)}
-
- )
-}
-
- import { useIsPresent } from "framer-motion";
-
-
export function Fragment_14636cc997c0546c0967a25d8e600f96 () {
const [addEvents, connectErrors] = useContext(EventLoopContext);
@@ -66,15 +53,28 @@ export function Fragment_14636cc997c0546c0967a25d8e600f96 () {
)
}
-const pulse = keyframes`
- 0% {
- opacity: 0;
- }
- 100% {
- opacity: 1;
- }
-`
+ import { useIsPresent } from "framer-motion";
+
+export function Fragment_e9a05c105aa9215aeba52aeec8fe2e76 () {
+ const state = useContext(StateContexts.state)
+ const [addEvents, connectErrors] = useContext(EventLoopContext);
+
+
+ return (
+
+ {isTrue(((!state.is_hydrated) || (connectErrors.length > 0))) ? (
+
+
+ {`wifi_off`}
+
+
+) : (
+
+)}
+
+ )
+}
export default function Component() {
@@ -92,38 +92,48 @@ export default function Component() {
-
-
+
+
+
{`About`}
+
-
-
+
+
+
{`Projects`}
+
-
-
+
+
+
{`Resume`}
+
-
-
+
+
+
{`Blog`}
+
-
-
+
+
+
{`Shop`}
+
diff --git a/src/web/.web/reflex.json b/src/web/.web/reflex.json
index 64b666f..91555a1 100644
--- a/src/web/.web/reflex.json
+++ b/src/web/.web/reflex.json
@@ -1 +1 @@
-{"version": "0.4.3", "project_hash": 133404493286750418693195899744043836434, "last_version_check_datetime": "2024-03-12 00:10:35.074745"}
\ No newline at end of file
+{"version": "0.4.3", "project_hash": 76742530442461448999350655539571039381, "last_version_check_datetime": "2024-03-12 10:19:00.533460"}
\ No newline at end of file
diff --git a/src/web/.web/utils/context.js b/src/web/.web/utils/context.js
index 333bc3e..6c1194e 100644
--- a/src/web/.web/utils/context.js
+++ b/src/web/.web/utils/context.js
@@ -1,7 +1,7 @@
import { createContext, useContext, useMemo, useReducer, useState } from "react"
import { applyDelta, Event, hydrateClientStorage, useEventLoop, refs } from "/utils/state.js"
-export const initialState = {"state": {"is_hydrated": false, "router": {"session": {"client_token": "", "client_ip": "", "session_id": ""}, "headers": {"host": "", "origin": "", "upgrade": "", "connection": "", "pragma": "", "cache_control": "", "user_agent": "", "sec_websocket_version": "", "sec_websocket_key": "", "sec_websocket_extensions": "", "accept_encoding": "", "accept_language": ""}, "page": {"host": "", "path": "", "raw_path": "", "full_path": "", "full_raw_path": "", "params": {}}}}, "state.on_load_internal_state": {}, "state.state": {}, "state.state.theme_state": {"current_theme": 0, "theme": {"background_color": "#282828"}, "themes": {"0": {"background_color": "#282828"}, "1": {"background_color": "#000000"}}}, "state.update_vars_internal_state": {}}
+export const initialState = {"state": {"is_hydrated": false, "router": {"session": {"client_token": "", "client_ip": "", "session_id": ""}, "headers": {"host": "", "origin": "", "upgrade": "", "connection": "", "pragma": "", "cache_control": "", "user_agent": "", "sec_websocket_version": "", "sec_websocket_key": "", "sec_websocket_extensions": "", "accept_encoding": "", "accept_language": ""}, "page": {"host": "", "path": "", "raw_path": "", "full_path": "", "full_raw_path": "", "params": {}}}}, "state.state": {}, "state.state.theme_state": {"current_theme": 0, "theme": {"background_color": "#282828"}, "themes": {"0": {"background_color": "#282828"}, "1": {"background_color": "#000000"}}}, "state.update_vars_internal_state": {}, "state.on_load_internal_state": {}}
export const defaultColorMode = "light"
export const ColorModeContext = createContext(null);
@@ -9,10 +9,10 @@ export const UploadFilesContext = createContext(null);
export const DispatchContext = createContext(null);
export const StateContexts = {
state: createContext(null),
- state__on_load_internal_state: createContext(null),
state__state: createContext(null),
state__state__theme_state: createContext(null),
state__update_vars_internal_state: createContext(null),
+ state__on_load_internal_state: createContext(null),
}
export const EventLoopContext = createContext(null);
export const clientStorage = {"cookies": {}, "local_storage": {}}
@@ -80,33 +80,33 @@ export function EventLoopProvider({ children }) {
export function StateProvider({ children }) {
const [state, dispatch_state] = useReducer(applyDelta, initialState["state"])
- const [state__on_load_internal_state, dispatch_state__on_load_internal_state] = useReducer(applyDelta, initialState["state.on_load_internal_state"])
const [state__state, dispatch_state__state] = useReducer(applyDelta, initialState["state.state"])
const [state__state__theme_state, dispatch_state__state__theme_state] = useReducer(applyDelta, initialState["state.state.theme_state"])
const [state__update_vars_internal_state, dispatch_state__update_vars_internal_state] = useReducer(applyDelta, initialState["state.update_vars_internal_state"])
+ const [state__on_load_internal_state, dispatch_state__on_load_internal_state] = useReducer(applyDelta, initialState["state.on_load_internal_state"])
const dispatchers = useMemo(() => {
return {
"state": dispatch_state,
- "state.on_load_internal_state": dispatch_state__on_load_internal_state,
"state.state": dispatch_state__state,
"state.state.theme_state": dispatch_state__state__theme_state,
"state.update_vars_internal_state": dispatch_state__update_vars_internal_state,
+ "state.on_load_internal_state": dispatch_state__on_load_internal_state,
}
}, [])
return (
-
+
{children}
+
-
)
}
\ No newline at end of file
diff --git a/src/web/web/components/navbar.py b/src/web/web/components/navbar.py
index 87be852..293c69f 100644
--- a/src/web/web/components/navbar.py
+++ b/src/web/web/components/navbar.py
@@ -1,33 +1,24 @@
import reflex as rx
+from web.state import *
from web.style import *
def navbar():
return rx.box(
rx.center(
rx.flex(
- rx.link(
- rx.text("About", href="/about")
- )
+ rx.link("About", href="/about")
),
rx.flex(
- rx.link(
- rx.text("Projects", href="/projects")
- )
+ rx.link("Projects", href="/projects")
),
rx.flex(
- rx.link(
- rx.text("Resume", href="/resume")
- )
+ rx.link("Resume", href="/resume")
),
rx.flex(
- rx.link(
- rx.text("Blog", href="/blog")
- )
+ rx.link("Blog", href="/blog")
),
rx.flex(
- rx.link(
- rx.text("Shop", href="shop")
- )
+ rx.link("Shop", href="/shop")
),
spacing="7",
)
diff --git a/src/web/web/pages/__init__.py b/src/web/web/pages/__init__.py
index 126ce4b..995fd3c 100644
--- a/src/web/web/pages/__init__.py
+++ b/src/web/web/pages/__init__.py
@@ -1,6 +1,7 @@
from web.route import Route
from .index import index
+from .about import about
from .page404 import page404
routes = [
diff --git a/src/web/web/pages/about.py b/src/web/web/pages/about.py
new file mode 100644
index 0000000..a7719a3
--- /dev/null
+++ b/src/web/web/pages/about.py
@@ -0,0 +1,14 @@
+import reflex as rx
+from web.templates import webpage
+
+@webpage(path="/about", title="About")
+def about():
+ return rx.box(
+ rx.center(
+ rx.vstack(
+ rx.heading("About", sixe="9"),
+ align="center"
+ ),
+ height="100vh",
+ )
+ )
diff --git a/src/web/web/pages/page404.py b/src/web/web/pages/page404.py
index 0c65a96..baa5355 100644
--- a/src/web/web/pages/page404.py
+++ b/src/web/web/pages/page404.py
@@ -1,6 +1,5 @@
import reflex as rx
from web.templates import webpage
-from web.motion import motion
# TODO: Add a go back here link
@@ -9,14 +8,10 @@ def page404():
return rx.box(
rx.center(
rx.vstack(
- motion(
- rx.heading(
- "Whoops, this page doesn't exist...", size="9"
- ),
- initial={"opacity": 0, "y": -50}, # Initial state: transparent and above the screen
- animate={"opacity": 1, "y": 0, "transition": {"duration": 0.5, "ease": "easeInOut"}}, # Animate opacity to 1 and move down into view
- while_hover={"scale": 1.1}, # Enlarge on hover
- )
+ rx.heading(
+ "Whoops, this page doesn't exist...", size="9"
+ ),
+ align="center"
),
height="100vh",
width="100%",
diff --git a/src/web/web/templates/webpage.py b/src/web/web/templates/webpage.py
index 02a3122..23527d3 100644
--- a/src/web/web/templates/webpage.py
+++ b/src/web/web/templates/webpage.py
@@ -1,7 +1,6 @@
from typing import Callable
import reflex as rx
from web.route import Route
-from web.motion import motion
def webpage(path: str, title: str = "Timothy Pidashev", props=None) -> Callable:
"""This template wraps the webpage with the navbar and footer.
@@ -42,15 +41,11 @@ def webpage(path: str, title: str = "Timothy Pidashev", props=None) -> Callable:
# Declare the entire page content
return rx.box(
- motion(
- rx.box(
- navbar(),
- contents(*children, **props),
- footer(),
- **props
- ),
- initial={"opacity": 0, "y": -50}, # Initial state: transparent and above the screen
- animate={"opacity": 1, "y": 0, "transition": {"duration": 0.5, "ease": "easeInOut"}}, # Animate opacity to 1 and move down into view
+ rx.box(
+ navbar(),
+ contents(*children, **props),
+ footer(),
+ **props
)
)