Homepage/ezgg_website/__init__.py
David Rodenkirchen 5dd65c82ed add theme 1
2024-05-24 17:44:35 +02:00

47 lines
1.1 KiB
Python

from __future__ import annotations
from pathlib import Path
import rio
from . import pages
from . import components as comps
themes = [
rio.Theme.from_colors(
primary_color=rio.Color.from_hex("ff800d"),
secondary_color=rio.Color.from_hex("ae5714"),
background_color=rio.Color.from_hex("090021"),
hud_color=rio.Color.from_hex("2c2340"),
text_color=rio.Color.from_hex("fefefe"),
light=False,
),
rio.Theme.from_colors(
primary_color=rio.Color.from_hex("ff800d"),
secondary_color=rio.Color.from_hex("ae5714"),
background_color=rio.Color.from_hex("090021"),
hud_color=rio.Color.from_hex("2c2340"),
text_color=rio.Color.from_hex("fefefe"),
light=False,
)
]
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[0],
assets_dir=Path(__file__).parent / "assets",
on_session_start=on_session_start
)