kumify/dreams/features.py
Kumi 7f79a79a17
feat: Enhances navigation with collapsible menus
Introduces NavCollapse to manage grouped navigation items.
Simplifies 'features.py' by organizing items under collapsible sections.
Updates HTML generation for both NavItem and NavCollapse classes.

Improves user experience by improving sidebar organization.
2024-11-19 06:56:52 +01:00

30 lines
819 B
Python

from frontend.classes import NavSection, NavItem, NavCollapse, DashboardSection
from django.urls import reverse_lazy
# Sidebar navigation items
dreams_section = NavSection("Dreams")
dreams_settings_collapse = NavCollapse("Settings", icon="fas fa-fw fa-cog")
dream_list = NavItem("Dream List", reverse_lazy("dreams:dream_list"))
dreams_settings = [
NavItem("Themes", reverse_lazy("dreams:theme_list")),
NavItem("Notifications", reverse_lazy("dreams:notification_list")),
]
for item in dreams_settings:
dreams_settings_collapse.add_item(item)
dreams_section.add_item(dream_list)
dreams_section.add_item(dreams_settings_collapse)
NAV_SECTIONS = [dreams_section]
# Dashboard sections
dreams_section = DashboardSection("Dreams", "dreams/dashboard_section.html")
DASHBOARD_SECTIONS = [dreams_section]