feat(admin): replace checkbox with toggle-switch slider, add i18n multilanguage
This commit is contained in:
@@ -604,6 +604,49 @@ table.admin-table tbody tr:hover {
|
||||
filter: brightness(1.1);
|
||||
}
|
||||
|
||||
/* ---------------- Forms / Toggle Switch ---------------- */
|
||||
.toggle-switch {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
width: 44px;
|
||||
height: 24px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.toggle-switch input {
|
||||
opacity: 0;
|
||||
width: 0;
|
||||
height: 0;
|
||||
}
|
||||
.toggle-slider {
|
||||
position: absolute;
|
||||
cursor: pointer;
|
||||
top: 0; left: 0; right: 0; bottom: 0;
|
||||
background-color: var(--line);
|
||||
transition: background-color 0.3s ease;
|
||||
border-radius: 24px;
|
||||
}
|
||||
.toggle-slider:before {
|
||||
position: absolute;
|
||||
content: "";
|
||||
height: 16px;
|
||||
width: 16px;
|
||||
left: 4px;
|
||||
bottom: 4px;
|
||||
background-color: var(--text);
|
||||
transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
|
||||
border-radius: 50%;
|
||||
}
|
||||
input:checked + .toggle-slider {
|
||||
background-color: var(--accent);
|
||||
}
|
||||
input:focus + .toggle-slider {
|
||||
box-shadow: 0 0 0 2px var(--bg-card), 0 0 0 4px var(--accent);
|
||||
}
|
||||
input:checked + .toggle-slider:before {
|
||||
transform: translateX(20px);
|
||||
background-color: #111;
|
||||
}
|
||||
|
||||
/* Admin tabs */
|
||||
.admin-tabs {
|
||||
display: flex; gap: 0.4rem;
|
||||
|
||||
Reference in New Issue
Block a user