add Ticker

This commit is contained in:
David Rodenkirchen
2024-05-27 06:59:02 +02:00
parent 9cd9aa8a04
commit de33e99703
2 changed files with 80 additions and 4 deletions
+20 -4
View File
@@ -1,7 +1,8 @@
from pathlib import Path
import rio
from from_root import from_root
from rio import TextStyle
from ezgg_website.components.ticker import Ticker
class Header(rio.Component):
@@ -9,9 +10,24 @@ class Header(rio.Component):
return rio.Column(
rio.Rectangle(
content=rio.Column(
rio.Row(
rio.Link(
rio.Image(from_root("ezgg_website/assets/placeholder_logo_grey.png"), align_x=0, width=8),
"/"
rio.Image(from_root("ezgg_website/assets/placeholder_logo_grey.png"), align_x=0, width=8),
"/"
),
Ticker(
texts=[
"Can this Tick?",
"Yes it can!",
"Rio is awesome",
"Look at them suckers still using JS"
],
refresh_interval=5,
tick_in_order=True,
style=TextStyle(italic=True),
width="grow",
justify="right"
)
),
margin=1
),