fix(web): repair home page design — invalid CSS, dead code, missing form wrappers
This commit is contained in:
1 parent
7e66bb4fbb
commit
ca693a2ed0
5 files changed
+109
-134
No files matched your search
@@ -1,98 +1,2 @@
|
||||
.page {
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
main {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.sidebar {
|
||||
background-image: linear-gradient(180deg, rgb(5, 39, 103) 0%, #3a0647 70%);
|
||||
}
|
||||
|
||||
.top-row {
|
||||
background-color: #f7f7f7;
|
||||
border-bottom: 1px solid #d6d5d5;
|
||||
justify-content: flex-end;
|
||||
height: 3.5rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.top-row ::deep a, .top-row ::deep .btn-link {
|
||||
white-space: nowrap;
|
||||
margin-left: 1.5rem;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.top-row ::deep a:hover, .top-row ::deep .btn-link:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.top-row ::deep a:first-child {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
@media (max-width: 640.98px) {
|
||||
.top-row {
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.top-row ::deep a, .top-row ::deep .btn-link {
|
||||
margin-left: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 641px) {
|
||||
.page {
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
.sidebar {
|
||||
width: 250px;
|
||||
height: 100vh;
|
||||
position: sticky;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.top-row {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.top-row.auth ::deep a:first-child {
|
||||
flex: 1;
|
||||
text-align: right;
|
||||
width: 0;
|
||||
}
|
||||
|
||||
.top-row, article {
|
||||
padding-left: 2rem !important;
|
||||
padding-right: 1.5rem !important;
|
||||
}
|
||||
}
|
||||
|
||||
#blazor-error-ui {
|
||||
color-scheme: light only;
|
||||
background: lightyellow;
|
||||
bottom: 0;
|
||||
box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
|
||||
box-sizing: border-box;
|
||||
display: none;
|
||||
left: 0;
|
||||
padding: 0.6rem 1.25rem 0.7rem 1.25rem;
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
z-index: 1000;
|
||||
}
|
||||
|
||||
#blazor-error-ui .dismiss {
|
||||
cursor: pointer;
|
||||
position: absolute;
|
||||
right: 0.75rem;
|
||||
top: 0.5rem;
|
||||
}
|
||||
/* MainLayout styles are handled by MudBlazor components (MudAppBar, MudDrawer, etc.).
|
||||
This file intentionally left minimal — global styles live in app.css. */
|
||||
@@ -31,13 +31,11 @@
|
||||
opacity: 0;
|
||||
transition: display 0.5s allow-discrete, overlay 0.5s allow-discrete;
|
||||
animation: components-reconnect-modal-fadeOutOpacity 0.5s both;
|
||||
&[open]
|
||||
|
||||
{
|
||||
animation: components-reconnect-modal-slideUp 1.5s cubic-bezier(.05, .89, .25, 1.02) 0.3s, components-reconnect-modal-fadeInOpacity 0.5s ease-in-out 0.3s;
|
||||
animation-fill-mode: both;
|
||||
}
|
||||
|
||||
#components-reconnect-modal[open] {
|
||||
animation: components-reconnect-modal-slideUp 1.5s cubic-bezier(.05, .89, .25, 1.02) 0.3s, components-reconnect-modal-fadeInOpacity 0.5s ease-in-out 0.3s;
|
||||
animation-fill-mode: both;
|
||||
}
|
||||
|
||||
#components-reconnect-modal::backdrop {
|
||||
|
||||
@@ -18,21 +18,24 @@
|
||||
Plateforme de surveillance vidéo
|
||||
</MudText>
|
||||
|
||||
<MudTextField @bind-Value="_email" Label="Email" Variant="Variant.Outlined"
|
||||
Class="mb-4" Required="true" Immediate="true" />
|
||||
<MudTextField @bind-Value="_password" Label="Mot de passe" Variant="Variant.Outlined"
|
||||
InputType="InputType.Password" Class="mb-6" Required="true" Immediate="true" />
|
||||
<form @onsubmit="LoginAsync" method="post">
|
||||
<MudTextField @bind-Value="_email" Label="Email" Variant="Variant.Outlined"
|
||||
Class="mb-4" Required="true" Immediate="true" />
|
||||
<MudTextField @bind-Value="_password" Label="Mot de passe" Variant="Variant.Outlined"
|
||||
InputType="InputType.Password" Class="mb-6" Required="true" Immediate="true"
|
||||
Autocomplete="current-password" />
|
||||
|
||||
@if (!string.IsNullOrEmpty(_errorMessage))
|
||||
{
|
||||
<MudAlert Severity="Severity.Error" Class="mb-4">@_errorMessage</MudAlert>
|
||||
}
|
||||
@if (!string.IsNullOrEmpty(_errorMessage))
|
||||
{
|
||||
<MudAlert Severity="Severity.Error" Class="mb-4">@_errorMessage</MudAlert>
|
||||
}
|
||||
|
||||
<MudButton Variant="Variant.Filled" Color="Color.Primary" FullWidth="true"
|
||||
OnClick="@LoginAsync" Disabled="@_loading" Class="mb-4">
|
||||
@if (_loading) { <MudProgressCircular Size="Size.Small" Class="mr-2" /> }
|
||||
Se connecter
|
||||
</MudButton>
|
||||
<MudButton Variant="Variant.Filled" Color="Color.Primary" FullWidth="true"
|
||||
ButtonType="ButtonType.Submit" Disabled="@_loading" Class="mb-4">
|
||||
@if (_loading) { <MudProgressCircular Size="Size.Small" Class="mr-2" /> }
|
||||
Se connecter
|
||||
</MudButton>
|
||||
</form>
|
||||
|
||||
<MudText Typo="Typo.body2" Align="Align.Center">
|
||||
Pas encore de compte ?
|
||||
|
||||
@@ -11,24 +11,29 @@
|
||||
<MudPaper Elevation="5" Class="pa-8" Style="border-radius: 16px;">
|
||||
<MudText Typo="Typo.h5" Align="Align.Center" Class="mb-6">Créer un compte</MudText>
|
||||
|
||||
<MudTextField @bind-Value="_displayName" Label="Nom d'affichage" Variant="Variant.Outlined"
|
||||
Class="mb-4" Required="true" Immediate="true" />
|
||||
<MudTextField @bind-Value="_email" Label="Email" Variant="Variant.Outlined"
|
||||
Class="mb-4" Required="true" Immediate="true" />
|
||||
<MudTextField @bind-Value="_password" Label="Mot de passe" Variant="Variant.Outlined"
|
||||
InputType="InputType.Password" Class="mb-6" Required="true" Immediate="true"
|
||||
HelperText="Minimum 12 caractères" />
|
||||
<form @onsubmit="RegisterAsync" method="post">
|
||||
<MudTextField @bind-Value="_displayName" Label="Nom d'affichage" Variant="Variant.Outlined"
|
||||
Class="mb-4" Required="true" Immediate="true"
|
||||
Autocomplete="name" />
|
||||
<MudTextField @bind-Value="_email" Label="Email" Variant="Variant.Outlined"
|
||||
Class="mb-4" Required="true" Immediate="true"
|
||||
Autocomplete="email" />
|
||||
<MudTextField @bind-Value="_password" Label="Mot de passe" Variant="Variant.Outlined"
|
||||
InputType="InputType.Password" Class="mb-6" Required="true" Immediate="true"
|
||||
HelperText="Minimum 12 caractères"
|
||||
Autocomplete="new-password" />
|
||||
|
||||
@if (!string.IsNullOrEmpty(_errorMessage))
|
||||
{
|
||||
<MudAlert Severity="Severity.Error" Class="mb-4">@_errorMessage</MudAlert>
|
||||
}
|
||||
@if (!string.IsNullOrEmpty(_errorMessage))
|
||||
{
|
||||
<MudAlert Severity="Severity.Error" Class="mb-4">@_errorMessage</MudAlert>
|
||||
}
|
||||
|
||||
<MudButton Variant="Variant.Filled" Color="Color.Primary" FullWidth="true"
|
||||
OnClick="@RegisterAsync" Disabled="@_loading" Class="mb-4">
|
||||
@if (_loading) { <MudProgressCircular Size="Size.Small" Class="mr-2" /> }
|
||||
S'inscrire
|
||||
</MudButton>
|
||||
<MudButton Variant="Variant.Filled" Color="Color.Primary" FullWidth="true"
|
||||
ButtonType="ButtonType.Submit" Disabled="@_loading" Class="mb-4">
|
||||
@if (_loading) { <MudProgressCircular Size="Size.Small" Class="mr-2" /> }
|
||||
S'inscrire
|
||||
</MudButton>
|
||||
</form>
|
||||
|
||||
<MudText Typo="Typo.body2" Align="Align.Center">
|
||||
Déjà un compte ?
|
||||
|
||||
@@ -4,9 +4,37 @@ html, body {
|
||||
font-family: 'Inter', 'Roboto', 'Helvetica', 'Arial', sans-serif;
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
background-color: #f5f5f5;
|
||||
color-scheme: light dark;
|
||||
}
|
||||
|
||||
/* MudBlazor overrides */
|
||||
/* ─── Scrollbar ───────────────────────────────────────────────── */
|
||||
|
||||
::-webkit-scrollbar {
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-track {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-thumb {
|
||||
background: #c4c4c4;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-thumb:hover {
|
||||
background: #a6a6a6;
|
||||
}
|
||||
|
||||
* {
|
||||
scrollbar-color: #c4c4c4 transparent;
|
||||
scrollbar-width: thin;
|
||||
}
|
||||
|
||||
/* ─── MudBlazor overrides ─────────────────────────────────────── */
|
||||
|
||||
.mud-dialog {
|
||||
border-radius: 12px !important;
|
||||
}
|
||||
@@ -21,7 +49,8 @@ code {
|
||||
font-size: 0.9em;
|
||||
}
|
||||
|
||||
/* Validation */
|
||||
/* ─── Validation ───────────────────────────────────────────────── */
|
||||
|
||||
.valid.modified:not([type=checkbox]) {
|
||||
outline: 1px solid #26b050;
|
||||
}
|
||||
@@ -33,3 +62,39 @@ code {
|
||||
.validation-message {
|
||||
color: #e50000;
|
||||
}
|
||||
|
||||
/* ─── Blazor error UI ─────────────────────────────────────────── */
|
||||
|
||||
#blazor-error-ui {
|
||||
color-scheme: light only;
|
||||
background: lightyellow;
|
||||
bottom: 0;
|
||||
box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
|
||||
box-sizing: border-box;
|
||||
display: none;
|
||||
left: 0;
|
||||
padding: 0.6rem 1.25rem 0.7rem 1.25rem;
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
z-index: 1000;
|
||||
}
|
||||
|
||||
#blazor-error-ui .dismiss {
|
||||
cursor: pointer;
|
||||
position: absolute;
|
||||
right: 0.75rem;
|
||||
top: 0.5rem;
|
||||
}
|
||||
|
||||
/* ─── Dark mode ────────────────────────────────────────────────── */
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
html, body {
|
||||
background-color: #1e1e2e;
|
||||
}
|
||||
|
||||
#blazor-error-ui {
|
||||
background: #3a2a00;
|
||||
color: #ffd966;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user