From eed70bf5ccf4cb0c97701556c91e19a10fbe4672 Mon Sep 17 00:00:00 2001 From: mily Date: Fri, 18 Apr 2025 22:14:43 +0200 Subject: [PATCH] Create exams page prototype --- src/constants.py | 2 +- src/main.py | 4 +-- src/pages/exams.py | 79 ++++++++++++++++++++++++++++++++++++++++++---- 3 files changed, 76 insertions(+), 9 deletions(-) diff --git a/src/constants.py b/src/constants.py index 95f6ba3..a2a9827 100644 --- a/src/constants.py +++ b/src/constants.py @@ -18,4 +18,4 @@ usrconf = { 'fullName': '', 'grade': '', 'semester': 1, - } \ No newline at end of file +} \ No newline at end of file diff --git a/src/main.py b/src/main.py index 4040c4a..7c8a86b 100644 --- a/src/main.py +++ b/src/main.py @@ -73,7 +73,7 @@ def sync(page: ft.Page): "/grades": GradesPage(page), "/timetable": TimetablePage(), "/homework": HomeworkPage(), - "/exams": ExamsPage(), + "/exams": ExamsPage(page), "/attendance": AttendancePage(), "/behaviour": BehaviourPage(), "/settings": SettingsPage(page) @@ -117,7 +117,7 @@ def main(page: ft.Page): "/grades": GradesPage(page), "/timetable": TimetablePage(), "/homework": HomeworkPage(), - "/exams": ExamsPage(), + "/exams": ExamsPage(page), "/attendance": AttendancePage(), "/behaviour": BehaviourPage(), "/settings": SettingsPage(page) diff --git a/src/pages/exams.py b/src/pages/exams.py index ceaf744..60047de 100644 --- a/src/pages/exams.py +++ b/src/pages/exams.py @@ -2,10 +2,77 @@ import flet as ft from i18n import _ -def ExamsPage(): +def ExamsPage(page: ft.Page): return ft.Column([ - ft.Text((_("Exams")), size=30, weight="bold"), - ft.Placeholder() - ]) - - \ No newline at end of file + ft.Row([ + ft.Text((_("Exams")), size=30, weight="bold"), + ft.Row( + [ + ft.IconButton(icon=ft.icons.ARROW_LEFT), + ft.Text("14.04-20.04", size=18, weight="bold"), + ft.IconButton(icon=ft.icons.ARROW_RIGHT), + ], + alignment=ft.MainAxisAlignment.CENTER + ) + ], alignment=ft.MainAxisAlignment.SPACE_BETWEEN, spacing=10), + ft.Card( + content=ft.Container( + content=ft.Column( + [ + ft.ListTile( + title=ft.Row([ + ft.Text("Example subject" ,weight="bold"), + ft.Row( + [ + ft.Text("14.04.2025"), + ], + alignment=ft.MainAxisAlignment.CENTER + ) + ], alignment=ft.MainAxisAlignment.SPACE_BETWEEN, spacing=10), + subtitle=ft.Row([ + ft.Text("Short test - Example description"), + ft.Row( + [ + ft.Text("Example teacher"), + ], + alignment=ft.MainAxisAlignment.CENTER + ) + ], alignment=ft.MainAxisAlignment.SPACE_BETWEEN, spacing=10), + ) + + ] + ), + padding=5, + ) + ), + ft.Card( + content=ft.Container( + content=ft.Column( + [ + ft.ListTile( + title=ft.Row([ + ft.Text("Example subject" ,weight="bold"), + ft.Row( + [ + ft.Text("14.04.2025"), + ], + alignment=ft.MainAxisAlignment.CENTER + ) + ], alignment=ft.MainAxisAlignment.SPACE_BETWEEN, spacing=10), + subtitle=ft.Row([ + ft.Text("Short test - Example description"), + ft.Row( + [ + ft.Text("Example teacher"), + ], + alignment=ft.MainAxisAlignment.CENTER + ) + ], alignment=ft.MainAxisAlignment.SPACE_BETWEEN, spacing=10), + ) + + ] + ), + padding=5, + ) + ) + ])