Repository navigation
Expand file tree
/
Copy path_bottom_nav.html
More file actions
136 lines (135 loc) · 14.5 KB
/
Copy path_bottom_nav.html
File metadata and controls
136 lines (135 loc) · 14.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
{% if current_user.is_authenticated %}
{% set ep = request.endpoint or '' %}
{% set timer_tab_active = ep == 'timer.manual_entry' or (ep.startswith('timer.') and ep != 'timer.time_entries_overview' and ep != 'timer.focus_mode') %}
{% set reports_in_more = ep.startswith('reports.') or ep.startswith('scheduled_reports.') or ep.startswith('custom_reports.') or ep.startswith('analytics.') %}
{% set more_tab_active = ep.startswith('invoices.') or ep.startswith('clients.') or ep.startswith('tasks.') or ep.startswith('expenses.') or ep.startswith('deals.') or ep.startswith('leads.') or reports_in_more or ep.startswith('user.settings') or ep.startswith('admin.') or ep == 'main.productivity_dashboard' or ep.startswith('calendar.') or ep.startswith('recurring_tasks.') or ep == 'timer.focus_mode' or ep.startswith('kanban.') or ep.startswith('gantt.') or ep.startswith('inventory.') %}
{# Backdrop + drawer sit above the tab bar so taps dismiss correctly #}
<div id="bottomNavMoreBackdrop" class="hidden fixed inset-0 z-[55] bg-black/40 md:hidden" aria-hidden="true"></div>
<section
id="bottomNavMorePanel"
class="bottom-nav-more-panel pointer-events-none fixed inset-x-0 bottom-0 z-[60] flex max-h-[min(85vh,32rem)] translate-y-full transform flex-col rounded-t-2xl border border-border-light dark:border-border-dark bg-card-light dark:bg-card-dark pb-safe shadow-2xl transition-transform duration-300 ease-out md:hidden"
role="dialog"
aria-modal="true"
aria-labelledby="bottomNavMoreTitle"
aria-hidden="true"
>
<div class="flex items-center justify-between gap-3 px-4 pt-4 pb-2 border-b border-border-light dark:border-border-dark shrink-0">
<h2 id="bottomNavMoreTitle" class="text-base font-semibold text-text-light dark:text-text-dark">{{ _('More') }}</h2>
<button type="button" id="bottomNavMoreClose" class="p-2 rounded-lg text-text-muted-light dark:text-text-muted-dark hover:bg-background-light dark:hover:bg-background-dark" aria-label="{{ _('Close') }}">
<i class="fas fa-times text-lg" aria-hidden="true"></i>
</button>
</div>
<nav class="overflow-y-auto px-3 py-3 space-y-1" aria-label="{{ _('More navigation') }}">
<a href="{{ url_for('main.productivity_dashboard') }}" class="bottom-nav-more-link flex items-center gap-3 min-h-[44px] px-3 rounded-xl text-text-light dark:text-text-dark hover:bg-background-light dark:hover:bg-background-dark {% if ep == 'main.productivity_dashboard' %}text-primary font-semibold bg-primary/5 dark:bg-primary/10{% endif %}">
<i class="fas fa-chart-line w-6 text-center text-lg shrink-0 opacity-80" aria-hidden="true"></i>
<span>{{ _('My productivity') }}</span>
</a>
{% if is_module_enabled('calendar') %}
<a href="{{ url_for('calendar.view_calendar') }}" class="bottom-nav-more-link flex items-center gap-3 min-h-[44px] px-3 rounded-xl text-text-light dark:text-text-dark hover:bg-background-light dark:hover:bg-background-dark {% if ep.startswith('calendar.') %}text-primary font-semibold bg-primary/5 dark:bg-primary/10{% endif %}">
<i class="fas fa-calendar-alt w-6 text-center text-lg shrink-0 opacity-80" aria-hidden="true"></i>
<span>{{ _('Calendar') }}</span>
</a>
{% endif %}
{% if is_module_enabled('recurring_tasks') and current_user.ui_show_recurring_tasks %}
<a href="{{ url_for('recurring_tasks.list_recurring_tasks') }}" class="bottom-nav-more-link flex items-center gap-3 min-h-[44px] px-3 rounded-xl text-text-light dark:text-text-dark hover:bg-background-light dark:hover:bg-background-dark {% if ep.startswith('recurring_tasks.') %}text-primary font-semibold bg-primary/5 dark:bg-primary/10{% endif %}">
<i class="fas fa-redo w-6 text-center text-lg shrink-0 opacity-80" aria-hidden="true"></i>
<span>{{ _('Recurring Tasks') }}</span>
</a>
{% endif %}
{% if is_module_enabled('tasks') %}
<a href="{{ url_for('tasks.list_tasks') }}" class="bottom-nav-more-link flex items-center gap-3 min-h-[44px] px-3 rounded-xl text-text-light dark:text-text-dark hover:bg-background-light dark:hover:bg-background-dark {% if ep.startswith('tasks.') %}text-primary font-semibold bg-primary/5 dark:bg-primary/10{% endif %}">
<i class="fas fa-tasks w-6 text-center text-lg shrink-0 opacity-80" aria-hidden="true"></i>
<span>{{ _('Tasks') }}</span>
</a>
{% endif %}
{% if is_module_enabled('expenses') %}
<a href="{{ url_for('expenses.list_expenses') }}" class="bottom-nav-more-link flex items-center gap-3 min-h-[44px] px-3 rounded-xl text-text-light dark:text-text-dark hover:bg-background-light dark:hover:bg-background-dark {% if ep.startswith('expenses.') %}text-primary font-semibold bg-primary/5 dark:bg-primary/10{% endif %}">
<i class="fas fa-receipt w-6 text-center text-lg shrink-0 opacity-80" aria-hidden="true"></i>
<span>{{ _('Expenses') }}</span>
</a>
{% endif %}
{% if is_module_enabled('deals') %}
<a href="{{ url_for('deals.list_deals') }}" class="bottom-nav-more-link flex items-center gap-3 min-h-[44px] px-3 rounded-xl text-text-light dark:text-text-dark hover:bg-background-light dark:hover:bg-background-dark {% if ep.startswith('deals.') %}text-primary font-semibold bg-primary/5 dark:bg-primary/10{% endif %}">
<i class="fas fa-handshake w-6 text-center text-lg shrink-0 opacity-80" aria-hidden="true"></i>
<span>{{ _('Deals') }}</span>
</a>
{% endif %}
{% if is_module_enabled('leads') %}
<a href="{{ url_for('leads.list_leads') }}" class="bottom-nav-more-link flex items-center gap-3 min-h-[44px] px-3 rounded-xl text-text-light dark:text-text-dark hover:bg-background-light dark:hover:bg-background-dark {% if ep.startswith('leads.') %}text-primary font-semibold bg-primary/5 dark:bg-primary/10{% endif %}">
<i class="fas fa-user-plus w-6 text-center text-lg shrink-0 opacity-80" aria-hidden="true"></i>
<span>{{ _('Leads') }}</span>
</a>
{% endif %}
{% if current_user.is_admin %}
<a href="{{ url_for('admin.list_users') }}" class="bottom-nav-more-link flex items-center gap-3 min-h-[44px] px-3 rounded-xl text-text-light dark:text-text-dark hover:bg-background-light dark:hover:bg-background-dark {% if ep.startswith('admin.users') %}text-primary font-semibold bg-primary/5 dark:bg-primary/10{% endif %}">
<i class="fas fa-users w-6 text-center text-lg shrink-0 opacity-80" aria-hidden="true"></i>
<span>{{ _('Users') }}</span>
</a>
{% endif %}
{% if is_module_enabled('invoices') %}
<a href="{{ url_for('invoices.list_invoices') }}" class="bottom-nav-more-link flex items-center gap-3 min-h-[44px] px-3 rounded-xl text-text-light dark:text-text-dark hover:bg-background-light dark:hover:bg-background-dark {% if ep.startswith('invoices.') %}text-primary font-semibold bg-primary/5 dark:bg-primary/10{% endif %}">
<i class="fas fa-file-invoice-dollar w-6 text-center text-lg shrink-0 opacity-80" aria-hidden="true"></i>
<span>{{ _('Invoices') }}</span>
</a>
{% endif %}
{% if is_module_enabled('clients') %}
<a href="{{ url_for('clients.list_clients') }}" class="bottom-nav-more-link flex items-center gap-3 min-h-[44px] px-3 rounded-xl text-text-light dark:text-text-dark hover:bg-background-light dark:hover:bg-background-dark {% if ep.startswith('clients.') %}text-primary font-semibold bg-primary/5 dark:bg-primary/10{% endif %}">
<i class="fas fa-building w-6 text-center text-lg shrink-0 opacity-80" aria-hidden="true"></i>
<span>{{ _('Clients') }}</span>
</a>
{% endif %}
{% if is_module_enabled('reports') %}
<a href="{{ url_for('reports.reports') }}" class="bottom-nav-more-link flex items-center gap-3 min-h-[44px] px-3 rounded-xl text-text-light dark:text-text-dark hover:bg-background-light dark:hover:bg-background-dark {% if reports_in_more %}text-primary font-semibold bg-primary/5 dark:bg-primary/10{% endif %}">
<i class="fas fa-chart-bar w-6 text-center text-lg shrink-0 opacity-80" aria-hidden="true"></i>
<span>{{ _('Reports') }}</span>
</a>
{% endif %}
<a href="{{ url_for('timer.focus_mode') }}" class="bottom-nav-more-link flex items-center gap-3 min-h-[44px] px-3 rounded-xl text-text-light dark:text-text-dark hover:bg-background-light dark:hover:bg-background-dark {% if ep == 'timer.focus_mode' %}text-primary font-semibold bg-primary/5 dark:bg-primary/10{% endif %}">
<i class="fas fa-hourglass-half w-6 text-center text-lg shrink-0 opacity-80" aria-hidden="true"></i>
<span>{{ _('Focus') }}</span>
</a>
{% if is_module_enabled('kanban') %}
<a href="{{ url_for('kanban.board') }}" class="bottom-nav-more-link flex items-center gap-3 min-h-[44px] px-3 rounded-xl text-text-light dark:text-text-dark hover:bg-background-light dark:hover:bg-background-dark {% if ep.startswith('kanban.') %}text-primary font-semibold bg-primary/5 dark:bg-primary/10{% endif %}">
<i class="fas fa-columns w-6 text-center text-lg shrink-0 opacity-80" aria-hidden="true"></i>
<span>{{ _('Kanban') }}</span>
</a>
{% endif %}
{% if current_user.is_admin %}
<a href="{{ url_for('admin.admin_dashboard') }}" class="bottom-nav-more-link flex items-center gap-3 min-h-[44px] px-3 rounded-xl text-text-light dark:text-text-dark hover:bg-background-light dark:hover:bg-background-dark {% if ep == 'admin.admin_dashboard' %}text-primary font-semibold bg-primary/5 dark:bg-primary/10{% endif %}">
<i class="fas fa-cog w-6 text-center text-lg shrink-0 opacity-80" aria-hidden="true"></i>
<span>{{ _('Admin') }}</span>
</a>
{% endif %}
<a href="{{ url_for('user.settings') }}" class="bottom-nav-more-link flex items-center gap-3 min-h-[44px] px-3 rounded-xl text-text-light dark:text-text-dark hover:bg-background-light dark:hover:bg-background-dark {% if ep.startswith('user.settings') %}text-primary font-semibold bg-primary/5 dark:bg-primary/10{% endif %}">
<i class="fas fa-sliders-h w-6 text-center text-lg shrink-0 opacity-80" aria-hidden="true"></i>
<span>{{ _('Settings') }}</span>
</a>
<button type="button" id="bottomNavBrowseAll" class="bottom-nav-more-link flex w-full items-center gap-3 min-h-[44px] px-3 rounded-xl text-text-light dark:text-text-dark hover:bg-background-light dark:hover:bg-background-dark text-left">
<i class="fas fa-bars w-6 text-center text-lg shrink-0 opacity-80" aria-hidden="true"></i>
<span>{{ _('Browse all…') }}</span>
</button>
</nav>
</section>
<nav class="mobile-bottom-nav fixed bottom-0 inset-x-0 z-50 flex md:hidden w-full min-h-[52px] items-stretch border-t border-border-light dark:border-border-dark bg-card-light dark:bg-card-dark pb-safe shadow-[0_-2px_10px_rgba(0,0,0,0.06)] dark:shadow-[0_-2px_10px_rgba(0,0,0,0.2)]" role="navigation" aria-label="{{ _('Main') }}">
<a href="{{ url_for('main.dashboard') }}" class="relative flex min-h-[44px] min-w-0 flex-1 flex-col items-center justify-center px-0.5 py-1.5 text-center transition-colors {% if ep == 'main.dashboard' %}bg-primary/10 font-medium text-primary dark:bg-primary/20{% else %}text-text-light dark:text-text-dark hover:bg-background-light dark:hover:bg-background-dark{% endif %}" aria-label="{{ _('Dashboard') }}" {% if ep == 'main.dashboard' %}aria-current="page"{% endif %}>
<i class="fas fa-tachometer-alt text-lg shrink-0" aria-hidden="true"></i>
<span class="bottom-nav-text mt-0.5 w-full truncate px-0.5 text-center text-xs leading-tight">{{ _('Dashboard') }}</span>
</a>
<a href="{{ url_for('timer.manual_entry') }}" class="relative flex min-h-[44px] min-w-0 flex-1 flex-col items-center justify-center px-0.5 py-1.5 text-center transition-colors {% if timer_tab_active %}bg-primary/10 font-medium text-primary dark:bg-primary/20{% else %}text-text-light dark:text-text-dark hover:bg-background-light dark:hover:bg-background-dark{% endif %}" aria-label="{{ _('Log time') }}" {% if timer_tab_active %}aria-current="page"{% endif %}>
<i class="fas fa-pen text-lg shrink-0" aria-hidden="true"></i>
<span class="bottom-nav-text mt-0.5 w-full truncate px-0.5 text-center text-xs leading-tight">{{ _('Log time') }}</span>
</a>
<a href="{{ url_for('timer.time_entries_overview') }}" class="relative flex min-h-[44px] min-w-0 flex-1 flex-col items-center justify-center px-0.5 py-1.5 text-center transition-colors {% if ep == 'timer.time_entries_overview' %}bg-primary/10 font-medium text-primary dark:bg-primary/20{% else %}text-text-light dark:text-text-dark hover:bg-background-light dark:hover:bg-background-dark{% endif %}" aria-label="{{ _('Time entries') }}" {% if ep == 'timer.time_entries_overview' %}aria-current="page"{% endif %}>
<i class="fas fa-list-alt text-lg shrink-0" aria-hidden="true"></i>
<span class="bottom-nav-text mt-0.5 w-full truncate px-0.5 text-center text-xs leading-tight">{{ _('Time entries') }}</span>
</a>
<a href="{{ url_for('projects.list_projects') }}" class="relative flex min-h-[44px] min-w-0 flex-1 flex-col items-center justify-center px-0.5 py-1.5 text-center transition-colors {% if ep.startswith('projects.') %}bg-primary/10 font-medium text-primary dark:bg-primary/20{% else %}text-text-light dark:text-text-dark hover:bg-background-light dark:hover:bg-background-dark{% endif %}" aria-label="{{ _('Projects') }}" {% if ep.startswith('projects.') %}aria-current="page"{% endif %}>
<i class="fas fa-folder text-lg shrink-0" aria-hidden="true"></i>
<span class="bottom-nav-text mt-0.5 w-full truncate px-0.5 text-center text-xs leading-tight">{{ _('Projects') }}</span>
</a>
<button type="button" id="bottomNavMoreBtn" class="relative flex min-h-[44px] min-w-0 flex-1 flex-col items-center justify-center px-0.5 py-1.5 text-center transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-primary/50 {% if more_tab_active %}bg-primary/10 font-medium text-primary dark:bg-primary/20{% else %}text-text-light dark:text-text-dark hover:bg-background-light dark:hover:bg-background-dark{% endif %}" aria-label="{{ _('More') }}" aria-expanded="false" aria-controls="bottomNavMorePanel">
<i class="fas fa-th text-lg shrink-0" aria-hidden="true"></i>
<span class="bottom-nav-text mt-0.5 w-full truncate px-0.5 text-center text-xs leading-tight">{{ _('More') }}</span>
</button>
</nav>
{% endif %}