Homepage/ezgg_website/__init__.py
David Rodenkirchen 1e814d9d0e add themes
2024-05-25 12:02:08 +02:00

96 lines
2.8 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,
)
]
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[2],
assets_dir=Path(__file__).parent / "assets",
on_session_start=on_session_start
)