ui: restyle login, dedupe navbar with Jinja macros, touch polish

- login: theme variables instead of hardcoded slate colors, decorative
  brand background, show/hide password toggle, dynamic copyright year
- navbar: nav links rendered via shared nav_link/nav_links macros
  (desktop + mobile from one source), active state now also in mobile
  menu, aria-current on active link, fix nonexistent w-4.5 class
- themes.css: btn :active press feedback, btn-lg variant, card hover
  border accent, brand accent-color and ::selection
- fix tmf-input vs pl-10 cascade conflict (themes.css loads after
  tailwind.css) with important utilities — also fixes recipe search icon
- app.py: inject current_year in template globals
- i18n: add Mostra/Nascondi password (IT/EN)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Adriano Dal Pastro
2026-06-11 15:35:53 +00:00
parent 83f8e2d332
commit 821c7c39d5
8 changed files with 209 additions and 275 deletions
@@ -3,7 +3,7 @@ msgid ""
msgstr ""
"Project-Id-Version: TieMeasureFlow 1.0\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2026-06-11 12:49+0000\n"
"POT-Creation-Date: 2026-06-11 15:33+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language: en\n"
@@ -163,8 +163,7 @@ msgstr "seconds due to inactivity."
msgid "Continua a lavorare"
msgstr "Keep working"
#: templates/admin/settings.html:3 templates/components/navbar.html:117
#: templates/components/navbar.html:335
#: templates/admin/settings.html:3 templates/components/navbar.html:37
msgid "Impostazioni"
msgstr "Settings"
@@ -456,8 +455,8 @@ msgid "Nuovo Utente"
msgstr "New User"
#: templates/admin/users.html:48 templates/admin/users.html:173
#: templates/admin/users.html:179 templates/auth/login.html:26
#: templates/auth/login.html:39 templates/auth/profile.html:36
#: templates/admin/users.html:179 templates/auth/login.html:33
#: templates/auth/login.html:47 templates/auth/profile.html:36
#: templates/measure/task_execute.html:649
msgid "Username"
msgstr "Username"
@@ -509,7 +508,7 @@ msgid "Il nome utente non può essere modificato"
msgstr "Username cannot be changed"
#: templates/admin/users.html:206 templates/admin/users.html:214
#: templates/auth/login.html:47 templates/auth/login.html:59
#: templates/auth/login.html:55 templates/auth/login.html:69
#: templates/measure/task_execute.html:654
msgid "Password"
msgstr "Password"
@@ -579,28 +578,36 @@ msgid "Username, nome visualizzato e password sono obbligatori"
msgstr "Username, display name and password are required"
# Login Page
#: templates/auth/login.html:16
#: templates/auth/login.html:23
msgid "Accedi al sistema"
msgstr "Sign in to your account"
#: templates/auth/login.html:71
#: templates/auth/login.html:73
msgid "Nascondi password"
msgstr "Hide password"
#: templates/auth/login.html:73
msgid "Mostra password"
msgstr "Show password"
#: templates/auth/login.html:94
msgid "Accedi"
msgstr "Sign In"
#: templates/auth/login.html:79
#: templates/auth/login.html:102
msgid "Hai dimenticato la password?"
msgstr "Forgot password?"
#: templates/auth/login.html:81
#: templates/auth/login.html:104
msgid "Contatta l'amministratore"
msgstr "Contact administrator"
# Additional Login Page
#: templates/auth/login.html:88
#: templates/auth/login.html:111
msgid "Sistema di misurazione industriale"
msgstr "Industrial measurement system"
#: templates/auth/profile.html:2 templates/components/navbar.html:211
#: templates/auth/profile.html:2 templates/components/navbar.html:147
msgid "Profilo"
msgstr "Profile"
@@ -650,8 +657,8 @@ msgstr "Logout from system"
msgid "Termina la sessione corrente e torna alla schermata di login"
msgstr "End current session and return to login screen"
#: templates/auth/profile.html:197 templates/components/navbar.html:222
#: templates/components/navbar.html:231
#: templates/auth/profile.html:197 templates/components/navbar.html:158
#: templates/components/navbar.html:167
msgid "Logout"
msgstr "Logout"
@@ -720,33 +727,31 @@ msgid "NON CONFORME"
msgstr "NON-CONFORMING"
# Navbar
#: templates/components/navbar.html:38 templates/components/navbar.html:277
#: templates/measure/task_complete.html:16
#: templates/components/navbar.html:26 templates/measure/task_complete.html:16
#: templates/measure/task_execute.html:2 templates/measure/task_list.html:16
msgid "Misure"
msgstr "Activities"
#: templates/components/navbar.html:55 templates/components/navbar.html:289
#: templates/maker/recipe_editor.html:51 templates/maker/recipe_list.html:83
#: templates/maker/recipe_preview.html:61 templates/maker/task_drawing.html:84
#: templates/maker/task_editor.html:110 templates/maker/version_history.html:73
#: templates/components/navbar.html:29 templates/maker/recipe_editor.html:51
#: templates/maker/recipe_list.html:83 templates/maker/recipe_preview.html:61
#: templates/maker/task_drawing.html:84 templates/maker/task_editor.html:110
#: templates/maker/version_history.html:73
msgid "Ricette"
msgstr "Recipes"
#: templates/components/navbar.html:72 templates/components/navbar.html:301
#: templates/measure/task_complete.html:261
#: templates/components/navbar.html:32 templates/measure/task_complete.html:261
msgid "Statistiche"
msgstr "Statistics"
#: templates/components/navbar.html:89 templates/components/navbar.html:314
#: templates/components/navbar.html:35
msgid "Utenti"
msgstr "Users"
#: templates/components/navbar.html:103 templates/components/navbar.html:324
#: templates/components/navbar.html:36
msgid "Stazioni"
msgstr "Stations"
#: templates/components/navbar.html:218
#: templates/components/navbar.html:154
msgid "Logout bloccato durante le misurazioni"
msgstr "Logout blocked during measurements"
@@ -3,7 +3,7 @@ msgid ""
msgstr ""
"Project-Id-Version: TieMeasureFlow 1.0\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2026-06-11 12:49+0000\n"
"POT-Creation-Date: 2026-06-11 15:33+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language: it\n"
@@ -163,8 +163,7 @@ msgstr "secondi per inattività."
msgid "Continua a lavorare"
msgstr "Continua a lavorare"
#: templates/admin/settings.html:3 templates/components/navbar.html:117
#: templates/components/navbar.html:335
#: templates/admin/settings.html:3 templates/components/navbar.html:37
msgid "Impostazioni"
msgstr "Impostazioni"
@@ -458,8 +457,8 @@ msgid "Nuovo Utente"
msgstr "Nuovo Utente"
#: templates/admin/users.html:48 templates/admin/users.html:173
#: templates/admin/users.html:179 templates/auth/login.html:26
#: templates/auth/login.html:39 templates/auth/profile.html:36
#: templates/admin/users.html:179 templates/auth/login.html:33
#: templates/auth/login.html:47 templates/auth/profile.html:36
#: templates/measure/task_execute.html:649
msgid "Username"
msgstr "Username"
@@ -511,7 +510,7 @@ msgid "Il nome utente non può essere modificato"
msgstr "Il nome utente non può essere modificato"
#: templates/admin/users.html:206 templates/admin/users.html:214
#: templates/auth/login.html:47 templates/auth/login.html:59
#: templates/auth/login.html:55 templates/auth/login.html:69
#: templates/measure/task_execute.html:654
msgid "Password"
msgstr "Password"
@@ -581,28 +580,36 @@ msgid "Username, nome visualizzato e password sono obbligatori"
msgstr "Username, nome visualizzato e password sono obbligatori"
# Login Page
#: templates/auth/login.html:16
#: templates/auth/login.html:23
msgid "Accedi al sistema"
msgstr "Accedi al sistema"
#: templates/auth/login.html:71
#: templates/auth/login.html:73
msgid "Nascondi password"
msgstr "Nascondi password"
#: templates/auth/login.html:73
msgid "Mostra password"
msgstr "Mostra password"
#: templates/auth/login.html:94
msgid "Accedi"
msgstr "Accedi"
#: templates/auth/login.html:79
#: templates/auth/login.html:102
msgid "Hai dimenticato la password?"
msgstr "Hai dimenticato la password?"
#: templates/auth/login.html:81
#: templates/auth/login.html:104
msgid "Contatta l'amministratore"
msgstr "Contatta l'amministratore"
# Additional Login Page
#: templates/auth/login.html:88
#: templates/auth/login.html:111
msgid "Sistema di misurazione industriale"
msgstr "Sistema di misurazione industriale"
#: templates/auth/profile.html:2 templates/components/navbar.html:211
#: templates/auth/profile.html:2 templates/components/navbar.html:147
msgid "Profilo"
msgstr "Profilo"
@@ -652,8 +659,8 @@ msgstr "Esci dal sistema"
msgid "Termina la sessione corrente e torna alla schermata di login"
msgstr "Termina la sessione corrente e torna alla schermata di login"
#: templates/auth/profile.html:197 templates/components/navbar.html:222
#: templates/components/navbar.html:231
#: templates/auth/profile.html:197 templates/components/navbar.html:158
#: templates/components/navbar.html:167
msgid "Logout"
msgstr "Logout"
@@ -722,33 +729,31 @@ msgid "NON CONFORME"
msgstr "NON CONFORME"
# Navbar
#: templates/components/navbar.html:38 templates/components/navbar.html:277
#: templates/measure/task_complete.html:16
#: templates/components/navbar.html:26 templates/measure/task_complete.html:16
#: templates/measure/task_execute.html:2 templates/measure/task_list.html:16
msgid "Misure"
msgstr "Attività"
#: templates/components/navbar.html:55 templates/components/navbar.html:289
#: templates/maker/recipe_editor.html:51 templates/maker/recipe_list.html:83
#: templates/maker/recipe_preview.html:61 templates/maker/task_drawing.html:84
#: templates/maker/task_editor.html:110 templates/maker/version_history.html:73
#: templates/components/navbar.html:29 templates/maker/recipe_editor.html:51
#: templates/maker/recipe_list.html:83 templates/maker/recipe_preview.html:61
#: templates/maker/task_drawing.html:84 templates/maker/task_editor.html:110
#: templates/maker/version_history.html:73
msgid "Ricette"
msgstr "Ricette"
#: templates/components/navbar.html:72 templates/components/navbar.html:301
#: templates/measure/task_complete.html:261
#: templates/components/navbar.html:32 templates/measure/task_complete.html:261
msgid "Statistiche"
msgstr "Statistiche"
#: templates/components/navbar.html:89 templates/components/navbar.html:314
#: templates/components/navbar.html:35
msgid "Utenti"
msgstr "Utenti"
#: templates/components/navbar.html:103 templates/components/navbar.html:324
#: templates/components/navbar.html:36
msgid "Stazioni"
msgstr "Stazioni"
#: templates/components/navbar.html:218
#: templates/components/navbar.html:154
msgid "Logout bloccato durante le misurazioni"
msgstr "Logout bloccato durante le misurazioni"
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2026-06-11 12:49+0000\n"
"POT-Creation-Date: 2026-06-11 15:33+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -160,8 +160,7 @@ msgstr ""
msgid "Continua a lavorare"
msgstr ""
#: templates/admin/settings.html:3 templates/components/navbar.html:117
#: templates/components/navbar.html:335
#: templates/admin/settings.html:3 templates/components/navbar.html:37
msgid "Impostazioni"
msgstr ""
@@ -448,8 +447,8 @@ msgid "Nuovo Utente"
msgstr ""
#: templates/admin/users.html:48 templates/admin/users.html:173
#: templates/admin/users.html:179 templates/auth/login.html:26
#: templates/auth/login.html:39 templates/auth/profile.html:36
#: templates/admin/users.html:179 templates/auth/login.html:33
#: templates/auth/login.html:47 templates/auth/profile.html:36
#: templates/measure/task_execute.html:649
msgid "Username"
msgstr ""
@@ -501,7 +500,7 @@ msgid "Il nome utente non può essere modificato"
msgstr ""
#: templates/admin/users.html:206 templates/admin/users.html:214
#: templates/auth/login.html:47 templates/auth/login.html:59
#: templates/auth/login.html:55 templates/auth/login.html:69
#: templates/measure/task_execute.html:654
msgid "Password"
msgstr ""
@@ -570,27 +569,35 @@ msgstr ""
msgid "Username, nome visualizzato e password sono obbligatori"
msgstr ""
#: templates/auth/login.html:16
#: templates/auth/login.html:23
msgid "Accedi al sistema"
msgstr ""
#: templates/auth/login.html:71
#: templates/auth/login.html:73
msgid "Nascondi password"
msgstr ""
#: templates/auth/login.html:73
msgid "Mostra password"
msgstr ""
#: templates/auth/login.html:94
msgid "Accedi"
msgstr ""
#: templates/auth/login.html:79
#: templates/auth/login.html:102
msgid "Hai dimenticato la password?"
msgstr ""
#: templates/auth/login.html:81
#: templates/auth/login.html:104
msgid "Contatta l'amministratore"
msgstr ""
#: templates/auth/login.html:88
#: templates/auth/login.html:111
msgid "Sistema di misurazione industriale"
msgstr ""
#: templates/auth/profile.html:2 templates/components/navbar.html:211
#: templates/auth/profile.html:2 templates/components/navbar.html:147
msgid "Profilo"
msgstr ""
@@ -638,8 +645,8 @@ msgstr ""
msgid "Termina la sessione corrente e torna alla schermata di login"
msgstr ""
#: templates/auth/profile.html:197 templates/components/navbar.html:222
#: templates/components/navbar.html:231
#: templates/auth/profile.html:197 templates/components/navbar.html:158
#: templates/components/navbar.html:167
msgid "Logout"
msgstr ""
@@ -703,33 +710,31 @@ msgstr ""
msgid "NON CONFORME"
msgstr ""
#: templates/components/navbar.html:38 templates/components/navbar.html:277
#: templates/measure/task_complete.html:16
#: templates/components/navbar.html:26 templates/measure/task_complete.html:16
#: templates/measure/task_execute.html:2 templates/measure/task_list.html:16
msgid "Misure"
msgstr ""
#: templates/components/navbar.html:55 templates/components/navbar.html:289
#: templates/maker/recipe_editor.html:51 templates/maker/recipe_list.html:83
#: templates/maker/recipe_preview.html:61 templates/maker/task_drawing.html:84
#: templates/maker/task_editor.html:110 templates/maker/version_history.html:73
#: templates/components/navbar.html:29 templates/maker/recipe_editor.html:51
#: templates/maker/recipe_list.html:83 templates/maker/recipe_preview.html:61
#: templates/maker/task_drawing.html:84 templates/maker/task_editor.html:110
#: templates/maker/version_history.html:73
msgid "Ricette"
msgstr ""
#: templates/components/navbar.html:72 templates/components/navbar.html:301
#: templates/measure/task_complete.html:261
#: templates/components/navbar.html:32 templates/measure/task_complete.html:261
msgid "Statistiche"
msgstr ""
#: templates/components/navbar.html:89 templates/components/navbar.html:314
#: templates/components/navbar.html:35
msgid "Utenti"
msgstr ""
#: templates/components/navbar.html:103 templates/components/navbar.html:324
#: templates/components/navbar.html:36
msgid "Stazioni"
msgstr ""
#: templates/components/navbar.html:218
#: templates/components/navbar.html:154
msgid "Logout bloccato durante le misurazioni"
msgstr ""