mirror of
https://github.com/timmypidashev/web.git
synced 2026-04-14 02:53:51 +00:00
Sunday commit
This commit is contained in:
@@ -0,0 +1,14 @@
|
|||||||
|
version: '3.8'
|
||||||
|
|
||||||
|
services:
|
||||||
|
caddy:
|
||||||
|
container_name: caddy
|
||||||
|
image: caddy:latest
|
||||||
|
ports:
|
||||||
|
- 80:80
|
||||||
|
- 443:443
|
||||||
|
volumes:
|
||||||
|
- ./Caddyfile.prod:/etc/caddy/Caddyfile
|
||||||
|
restart: unless_stopped
|
||||||
|
networks:
|
||||||
|
- caddy
|
||||||
|
|||||||
@@ -4,12 +4,36 @@ from landing.style import *
|
|||||||
def navbar():
|
def navbar():
|
||||||
return rx.box(
|
return rx.box(
|
||||||
rx.center(
|
rx.center(
|
||||||
rx.vstack(
|
rx.flex(
|
||||||
rx.heading("Navbar", size="9"),
|
rx.link(
|
||||||
align="center",
|
rx.text("About", color=color["white"]),
|
||||||
spacing="7"
|
href="http://about.timmypidashev.localhost"
|
||||||
|
)
|
||||||
),
|
),
|
||||||
border_bottom=f"2px solid {color['white']};",
|
rx.flex(
|
||||||
height="10vh"
|
rx.link(
|
||||||
|
rx.text("Projects", color=color["white"]),
|
||||||
|
href="http://projects.timmypidashev.localhost"
|
||||||
|
)
|
||||||
|
),
|
||||||
|
rx.flex(
|
||||||
|
rx.link(
|
||||||
|
rx.text("Resume", color=color["white"]),
|
||||||
|
href="http://resume.timmypidashev.localhost"
|
||||||
|
)
|
||||||
|
),
|
||||||
|
rx.flex(
|
||||||
|
rx.link(
|
||||||
|
rx.text("Blog", color=color["white"]),
|
||||||
|
href="http://blog.timmypidashev.localhost"
|
||||||
|
)
|
||||||
|
),
|
||||||
|
rx.flex(
|
||||||
|
rx.link(
|
||||||
|
rx.text("Shop", color=color["white"]),
|
||||||
|
href="http://shop.timmypidashev.localhost"
|
||||||
|
)
|
||||||
|
),
|
||||||
|
spacing="7",
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ from landing.style import *
|
|||||||
|
|
||||||
# Create app instance and add index page.
|
# Create app instance and add index page.
|
||||||
app = rx.App(
|
app = rx.App(
|
||||||
style=style,
|
style=base_style,
|
||||||
stylesheets=[
|
stylesheets=[
|
||||||
"fonts/fonts.css",
|
"fonts/fonts.css",
|
||||||
"css/scrollbar.css"
|
"css/scrollbar.css"
|
||||||
|
|||||||
@@ -1 +1,2 @@
|
|||||||
from .state import State
|
from .state import State
|
||||||
|
from .theme import ThemeState
|
||||||
|
|||||||
19
src/landing/landing/state/theme.py
Normal file
19
src/landing/landing/state/theme.py
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
import reflex as rx
|
||||||
|
from .state import State
|
||||||
|
from landing.style import *
|
||||||
|
from typing import Dict, Any, List
|
||||||
|
|
||||||
|
|
||||||
|
class ThemeState(State):
|
||||||
|
"""App Theme State"""
|
||||||
|
|
||||||
|
current_theme: int = 0
|
||||||
|
|
||||||
|
themes = {
|
||||||
|
0: {"background_color": "#282828"},
|
||||||
|
1: {"background_color": "#000000"},
|
||||||
|
}
|
||||||
|
|
||||||
|
@rx.var
|
||||||
|
def theme(self) -> dict:
|
||||||
|
return self.themes[self.current_theme]
|
||||||
@@ -29,10 +29,11 @@ color = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
style = {
|
base_style = {
|
||||||
# Background color
|
# Background
|
||||||
"background_color": color["black"],
|
# TODO: Implement dynamic background switching once reflex allows for Dict state management
|
||||||
|
"background_color": "#282828",
|
||||||
|
|
||||||
# Text
|
# Text
|
||||||
rx.text: {
|
rx.text: {
|
||||||
"font_family": "ComicCode",
|
"font_family": "ComicCode",
|
||||||
@@ -52,9 +53,39 @@ style = {
|
|||||||
"font_family": "ComicCode",
|
"font_family": "ComicCode",
|
||||||
"font_size": 24,
|
"font_size": 24,
|
||||||
"color": color["black"],
|
"color": color["black"],
|
||||||
"text_decoration": "none",
|
"text_decoration": "underline",
|
||||||
"_hover": {
|
"_hover": {
|
||||||
"color": color["green"][100]
|
"color": color["green"][100]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Dark Theme
|
||||||
|
#dark_theme = dict()
|
||||||
|
#dark_theme["background_color"] = "#282828"
|
||||||
|
|
||||||
|
# Soft Contrast Dark Theme
|
||||||
|
# TODO
|
||||||
|
|
||||||
|
# Medium Contrast Dark Theme
|
||||||
|
# TODO
|
||||||
|
|
||||||
|
# Hard Contrast Dark Theme
|
||||||
|
# TODO
|
||||||
|
|
||||||
|
# Amoled Contrast Dark Theme
|
||||||
|
#amoled_dark_theme = dict()
|
||||||
|
#amoled_dark_theme = "#000000"
|
||||||
|
|
||||||
|
# Light Theme
|
||||||
|
# TODO
|
||||||
|
|
||||||
|
# Soft Contrast Light Theme
|
||||||
|
# TODO
|
||||||
|
|
||||||
|
# Medium Contrast Light Theme
|
||||||
|
# TODO
|
||||||
|
|
||||||
|
# Hard Contrast Light Theme
|
||||||
|
# TODO
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user