From 72ee9d2e5f733826dae4e3ec5a53dd9511d36446 Mon Sep 17 00:00:00 2001 From: Maarceeli Date: Fri, 14 Feb 2025 17:02:52 +0100 Subject: [PATCH] Add placeholders to main and home pages for future content integration --- src/main.py | 7 +++++ src/pages/home.py | 79 +++-------------------------------------------- 2 files changed, 12 insertions(+), 74 deletions(-) diff --git a/src/main.py b/src/main.py index 98bef15..8245074 100644 --- a/src/main.py +++ b/src/main.py @@ -28,36 +28,43 @@ def main(page: ft.Page): # Grades page ft.Column([ ft.Text(" Grades", size=30, weight="bold"), + ft.Placeholder() ]), # Timetable page ft.Column([ ft.Text(" Timetable", size=30, weight="bold"), + ft.Placeholder() ]), # Homework page ft.Column([ ft.Text(" Homework", size=30, weight="bold"), + ft.Placeholder() ]), # Exams page ft.Column([ ft.Text(" Exams", size=30, weight="bold"), + ft.Placeholder() ]), # Attendance page ft.Column([ ft.Text(" Attendance", size=30, weight="bold"), + ft.Placeholder() ]), # Behaviour page ft.Column([ ft.Text(" Behaviour Notes", size=30, weight="bold"), + ft.Placeholder() ]), # Settings page ft.Column([ ft.Text(" Settings", size=30, weight="bold"), + ft.Placeholder() ]), ] return pages[index] diff --git a/src/pages/home.py b/src/pages/home.py index 6e2cb68..96d8b9e 100644 --- a/src/pages/home.py +++ b/src/pages/home.py @@ -14,7 +14,7 @@ def HomePage(): ]), ft.ListView( controls=[ - ft.Text("1. Lorem ipsum\n2. Lorem ipsum\n3. Lorem ipsum\n4. Im curious what happens if i ran out of space\n5. It just creates a new line\n6. No idea why i tested that\n7. I also want to test what happens if there is too much lines\n8. Lorem ipsum\n9. Yay now you can scroll\n10. Looks like dogshit but it works\n11. Simi simi jej simi jaj", size=16, weight="normal") + ft.Placeholder() ], expand=True, spacing=10, @@ -37,78 +37,9 @@ def HomePage(): ft.Icon(ft.Icons.LOOKS_6_OUTLINED, size=32, color="#FFFFFF"), ft.Text("Recent Grades", size=24, font_family="Roboto", weight="bold") ]), - ft.ListView( - controls=[ - ft.Row([ - ft.Text("Matematyka", size=16, weight="normal"), - ft.Container( - content=ft.Text("6"), - margin=0, - padding=0, - alignment=ft.alignment.center, - bgcolor=grade[6], - width=20, - height=20, - border_radius=5, - ), - ft.Container( - content=ft.Text("5"), - margin=0, - padding=0, - alignment=ft.alignment.center, - bgcolor=grade[5], - width=20, - height=20, - border_radius=5, - ), - ft.Container( - content=ft.Text("4"), - margin=0, - padding=0, - alignment=ft.alignment.center, - bgcolor=grade[4], - width=20, - height=20, - border_radius=5, - ), - ft.Container( - content=ft.Text("3"), - margin=0, - padding=0, - alignment=ft.alignment.center, - bgcolor=grade[3], - width=20, - height=20, - border_radius=5, - ), - ft.Container( - content=ft.Text("2"), - margin=0, - padding=0, - alignment=ft.alignment.center, - bgcolor=grade[2], - width=20, - height=20, - border_radius=5, - ), - ft.Container( - content=ft.Text("1"), - margin=0, - padding=0, - alignment=ft.alignment.center, - bgcolor=grade[1], - width=20, - height=20, - border_radius=5, - ), - ]) - ], - expand=False, - spacing=10, - padding=10, - auto_scroll=False - ) - ]), + + ft.Placeholder() + ]), margin=20, padding=10, alignment=ft.alignment.top_left, @@ -118,4 +49,4 @@ def HomePage(): border_radius=10, ) ]) - ]) \ No newline at end of file + ])