mirror of
https://github.com/timmypidashev/web.git
synced 2026-04-14 11:03:50 +00:00
Add default webpage template
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
import reflex as rx
|
||||
from landing.style import *
|
||||
|
||||
def footer():
|
||||
return rx.box(
|
||||
footer_content(),
|
||||
background="#FFF",
|
||||
border_top=f"8px solid {rx.color('mauve', 4)};"
|
||||
border_top=f"2px solid {color['white']};"
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -1,16 +1,15 @@
|
||||
import reflex as rx
|
||||
|
||||
from landing.style import *
|
||||
|
||||
def navbar():
|
||||
return rx.flex(
|
||||
background = "#FFF",
|
||||
border_bottom=f"8px solid {rx.color('mauve', 4)};",
|
||||
height="10vh",
|
||||
position="fixed",
|
||||
width="100%",
|
||||
top="0px",
|
||||
z_index="5",
|
||||
align_items= "center",
|
||||
spacing="6",
|
||||
padding= "7px 20px 7px 20px;",
|
||||
return rx.box(
|
||||
rx.center(
|
||||
rx.vstack(
|
||||
rx.heading("Navbar", size="9"),
|
||||
align="center",
|
||||
spacing="7"
|
||||
),
|
||||
border_bottom=f"2px solid {color['white']};",
|
||||
height="10vh"
|
||||
)
|
||||
)
|
||||
|
||||
@@ -2,9 +2,15 @@ import reflex as rx
|
||||
from rxconfig import config
|
||||
from landing.state import *
|
||||
from landing.pages import *
|
||||
from landing.style import *
|
||||
|
||||
# Create app instance and add index page.
|
||||
app = rx.App(
|
||||
style=style,
|
||||
stylesheets=[
|
||||
"fonts/fonts.css",
|
||||
"css/scrollbar.css"
|
||||
]
|
||||
)
|
||||
|
||||
for route in routes:
|
||||
|
||||
@@ -1,2 +1 @@
|
||||
from .state import State
|
||||
from .theme import ThemeState
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
import reflex as rx
|
||||
|
||||
from .state import State
|
||||
|
||||
class ThemeState(State):
|
||||
"""State for the global theme"""
|
||||
theme: str = "day"
|
||||
|
||||
def toggle_theme(self):
|
||||
self.theme == "day" if self.theme != "day" else self.theme == "night"
|
||||
60
src/landing/landing/style.py
Normal file
60
src/landing/landing/style.py
Normal file
@@ -0,0 +1,60 @@
|
||||
import reflex as rx
|
||||
|
||||
color = {
|
||||
"white": "#ebdbb2",
|
||||
"black": "#000000",
|
||||
"red": {
|
||||
100: "#fb4934",
|
||||
200: "#cc241d",
|
||||
},
|
||||
"green": {
|
||||
100: "#b8bb26",
|
||||
200: "#98971a",
|
||||
},
|
||||
"yellow": {
|
||||
100: "#fabd2f",
|
||||
200: "#d79921",
|
||||
},
|
||||
"blue": {
|
||||
100: "#83a598",
|
||||
200: "#458588",
|
||||
},
|
||||
"purple": {
|
||||
100: "#d3869b",
|
||||
200: "#b16286",
|
||||
},
|
||||
"aqua": {
|
||||
100: "#8ec07c",
|
||||
200: "#689d6a",
|
||||
}
|
||||
}
|
||||
|
||||
style = {
|
||||
# Background color
|
||||
"background_color": color["black"],
|
||||
|
||||
# Text
|
||||
rx.text: {
|
||||
"font_family": "ComicCode",
|
||||
"font_size": 24,
|
||||
"color": color["white"]
|
||||
},
|
||||
|
||||
# Heading
|
||||
rx.heading: {
|
||||
"font_family": "ComicCode",
|
||||
"font_size": 32,
|
||||
"color": color["white"]
|
||||
},
|
||||
|
||||
# Link
|
||||
rx.link: {
|
||||
"font_family": "ComicCode",
|
||||
"font_size": 24,
|
||||
"color": color["black"],
|
||||
"text_decoration": "none",
|
||||
"_hover": {
|
||||
"color": color["green"][100]
|
||||
}
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user