116 lines
3.5 KiB
Python
116 lines
3.5 KiB
Python
from __future__ import annotations
|
|
|
|
from pathlib import Path
|
|
|
|
import rio
|
|
|
|
from . import pages
|
|
from . import components as comps
|
|
|
|
themes = [
|
|
# Grey/Purple
|
|
rio.Theme.from_colors(
|
|
primary_color=rio.Color.from_hex("bb86fc"),
|
|
secondary_color=rio.Color.from_hex("6200ee"),
|
|
neutral_color=rio.Color.from_hex("1e1e1e"),
|
|
background_color=rio.Color.from_hex("121212"),
|
|
hud_color=rio.Color.from_hex("bb86fc"),
|
|
text_color=rio.Color.from_hex("FFFFFF"),
|
|
light=False,
|
|
),
|
|
|
|
# Grey/Turquoise
|
|
rio.Theme.from_colors(
|
|
primary_color=rio.Color.from_hex("03dac5"),
|
|
secondary_color=rio.Color.from_hex("018786"),
|
|
neutral_color=rio.Color.from_hex("1e1e1e"),
|
|
background_color=rio.Color.from_hex("121212"),
|
|
hud_color=rio.Color.from_hex("03dac5"),
|
|
text_color=rio.Color.from_hex("FFFFFF"),
|
|
light=False,
|
|
),
|
|
|
|
# Grey/Pink
|
|
rio.Theme.from_colors(
|
|
primary_color=rio.Color.from_hex("fe1f70"),
|
|
secondary_color=rio.Color.from_hex("a32263"),
|
|
neutral_color=rio.Color.from_hex("1e1e1e"),
|
|
background_color=rio.Color.from_hex("121212"),
|
|
hud_color=rio.Color.from_hex("fe1f70"),
|
|
text_color=rio.Color.from_hex("FFFFFF"),
|
|
light=False,
|
|
),
|
|
|
|
# Grey/Red
|
|
rio.Theme.from_colors(
|
|
primary_color=rio.Color.from_hex("ec1e2a"),
|
|
secondary_color=rio.Color.from_hex("9b1725"),
|
|
neutral_color=rio.Color.from_hex("1e1e1e"),
|
|
background_color=rio.Color.from_hex("121212"),
|
|
hud_color=rio.Color.from_hex("ec1e2a"),
|
|
text_color=rio.Color.from_hex("FFFFFF"),
|
|
light=False,
|
|
),
|
|
|
|
# Grey/Orange
|
|
rio.Theme.from_colors(
|
|
primary_color=rio.Color.from_hex("ff800d"),
|
|
secondary_color=rio.Color.from_hex("ae5714"),
|
|
neutral_color=rio.Color.from_hex("1e1e1e"),
|
|
background_color=rio.Color.from_hex("121212"),
|
|
hud_color=rio.Color.from_hex("ff800d"),
|
|
text_color=rio.Color.from_hex("FFFFFF"),
|
|
light=False,
|
|
),
|
|
|
|
# Grey/Blue
|
|
rio.Theme.from_colors(
|
|
primary_color=rio.Color.from_hex("2c89ff"),
|
|
secondary_color=rio.Color.from_hex("2376dc"),
|
|
neutral_color=rio.Color.from_hex("1e1e1e"),
|
|
background_color=rio.Color.from_hex("121212"),
|
|
hud_color=rio.Color.from_hex("2c89ff"),
|
|
text_color=rio.Color.from_hex("FFFFFF"),
|
|
light=False,
|
|
),
|
|
# Turquoise - Dark
|
|
rio.Theme.from_colors(
|
|
primary_color=rio.Color.from_hex("03dac5"),
|
|
secondary_color=rio.Color.from_hex("018786"),
|
|
neutral_color=rio.Color.from_hex("1e1e1e"),
|
|
background_color=rio.Color.from_hex("121212"),
|
|
hud_color=rio.Color.from_hex("03dac5"),
|
|
text_color=rio.Color.from_hex("FFFFFF"),
|
|
light=False,
|
|
),
|
|
# Turquoise - Light
|
|
rio.Theme.from_colors(
|
|
primary_color=rio.Color.from_hex("03dac5"),
|
|
secondary_color=rio.Color.from_hex("018786"),
|
|
neutral_color=rio.Color.from_hex("FFFFFF"),
|
|
background_color=rio.Color.from_hex("FFFFFF"),
|
|
hud_color=rio.Color.from_hex("03dac5"),
|
|
text_color=rio.Color.from_hex("000000"),
|
|
light=True,
|
|
)
|
|
]
|
|
|
|
|
|
async def on_session_start(s: rio.Session) -> None:
|
|
await s.set_title("EZ GG e.V.")
|
|
|
|
# Create the Rio app
|
|
app = rio.App(
|
|
name='ezgg-website',
|
|
pages=[
|
|
rio.Page(
|
|
name="Home",
|
|
page_url='',
|
|
build=pages.Home,
|
|
),
|
|
],
|
|
theme=themes[6],
|
|
assets_dir=Path(__file__).parent / "assets",
|
|
on_session_start=on_session_start
|
|
)
|