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():
|
||||
return rx.box(
|
||||
rx.center(
|
||||
rx.vstack(
|
||||
rx.heading("Navbar", size="9"),
|
||||
align="center",
|
||||
spacing="7"
|
||||
rx.flex(
|
||||
rx.link(
|
||||
rx.text("About", color=color["white"]),
|
||||
href="http://about.timmypidashev.localhost"
|
||||
)
|
||||
),
|
||||
border_bottom=f"2px solid {color['white']};",
|
||||
height="10vh"
|
||||
rx.flex(
|
||||
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.
|
||||
app = rx.App(
|
||||
style=style,
|
||||
style=base_style,
|
||||
stylesheets=[
|
||||
"fonts/fonts.css",
|
||||
"css/scrollbar.css"
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
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 = {
|
||||
# Background color
|
||||
"background_color": color["black"],
|
||||
|
||||
base_style = {
|
||||
# Background
|
||||
# TODO: Implement dynamic background switching once reflex allows for Dict state management
|
||||
"background_color": "#282828",
|
||||
|
||||
# Text
|
||||
rx.text: {
|
||||
"font_family": "ComicCode",
|
||||
@@ -52,9 +53,39 @@ style = {
|
||||
"font_family": "ComicCode",
|
||||
"font_size": 24,
|
||||
"color": color["black"],
|
||||
"text_decoration": "none",
|
||||
"text_decoration": "underline",
|
||||
"_hover": {
|
||||
"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