login style fix
This commit is contained in:
@@ -23,6 +23,31 @@
|
|||||||
--table-head: #292b2f;
|
--table-head: #292b2f;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[data-theme="dark"] .table {
|
||||||
|
--bs-table-color: var(--text-main);
|
||||||
|
color: var(--text-main);
|
||||||
|
}
|
||||||
|
|
||||||
|
[data-theme="dark"] .btn-close {
|
||||||
|
filter: invert(1) grayscale(100%) brightness(200%);
|
||||||
|
}
|
||||||
|
|
||||||
|
[data-theme="dark"] .text-muted {
|
||||||
|
color: var(--text-muted) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
[data-theme="dark"] .modal-body .text-muted {
|
||||||
|
color: #f6f6f7 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
[data-theme="dark"] .btn-close {
|
||||||
|
filter: invert(1) grayscale(100%) brightness(200%);
|
||||||
|
}
|
||||||
|
|
||||||
|
[data-theme="dark"] .form-select {
|
||||||
|
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23dcddde' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") !important;
|
||||||
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
background: var(--bg);
|
background: var(--bg);
|
||||||
color: var(--text-main);
|
color: var(--text-main);
|
||||||
@@ -58,7 +83,6 @@
|
|||||||
color: var(--danger) !important;
|
color: var(--danger) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ── Cards ── */
|
|
||||||
.discord-card {
|
.discord-card {
|
||||||
background: var(--card-bg);
|
background: var(--card-bg);
|
||||||
border: 1px solid var(--border);
|
border: 1px solid var(--border);
|
||||||
@@ -66,7 +90,6 @@
|
|||||||
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
|
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ── Inputs ── */
|
|
||||||
.form-control,
|
.form-control,
|
||||||
.form-control:focus {
|
.form-control:focus {
|
||||||
background: var(--input-bg);
|
background: var(--input-bg);
|
||||||
@@ -83,7 +106,6 @@
|
|||||||
color: var(--text-muted);
|
color: var(--text-muted);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ── Buttons ── */
|
|
||||||
.btn-accent {
|
.btn-accent {
|
||||||
background: var(--accent);
|
background: var(--accent);
|
||||||
color: #fff;
|
color: #fff;
|
||||||
@@ -124,10 +146,7 @@
|
|||||||
margin-top: 2px;
|
margin-top: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
[data-theme="dark"] .table {
|
|
||||||
--bs-table-color: var(--text-main);
|
|
||||||
color: var(--text-main);
|
|
||||||
}
|
|
||||||
|
|
||||||
.table thead th {
|
.table thead th {
|
||||||
background: var(--table-head);
|
background: var(--table-head);
|
||||||
@@ -205,27 +224,6 @@
|
|||||||
filter: var(--bs-theme-placeholder, invert(0.7) grayscale(100%) brightness(200%));
|
filter: var(--bs-theme-placeholder, invert(0.7) grayscale(100%) brightness(200%));
|
||||||
}
|
}
|
||||||
|
|
||||||
[data-theme="dark"] .btn-close {
|
|
||||||
filter: invert(1) grayscale(100%) brightness(200%);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Add this inside your <style> tag */
|
|
||||||
[data-theme="dark"] .text-muted {
|
|
||||||
color: var(--text-muted) !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
[data-theme="dark"] .modal-body .text-muted {
|
|
||||||
color: #f6f6f7 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.btn-close {
|
|
||||||
filter: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
[data-theme="dark"] .btn-close {
|
|
||||||
filter: invert(1) grayscale(100%) brightness(200%);
|
|
||||||
}
|
|
||||||
|
|
||||||
.form-select {
|
.form-select {
|
||||||
background-color: var(--input-bg) !important;
|
background-color: var(--input-bg) !important;
|
||||||
color: var(--text-main) !important;
|
color: var(--text-main) !important;
|
||||||
@@ -236,6 +234,32 @@
|
|||||||
background-size: 16px 12px !important;
|
background-size: 16px 12px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
[data-theme="dark"] .form-select {
|
.login-box {
|
||||||
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23dcddde' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") !important;
|
max-width: 400px;
|
||||||
|
margin: 100px auto;
|
||||||
|
padding: 40px;
|
||||||
|
background: var(--card-bg);
|
||||||
|
border: 1px solid var(--border);
|
||||||
|
border-radius: 8px;
|
||||||
|
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-login {
|
||||||
|
background: var(--accent);
|
||||||
|
color: #fff;
|
||||||
|
font-weight: 600;
|
||||||
|
padding: 10px;
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-login:hover {
|
||||||
|
background: var(--accent-hover);
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.error-alert {
|
||||||
|
background: var(--danger);
|
||||||
|
color: #fff;
|
||||||
|
border-radius: 4px;
|
||||||
|
font-size: 0.9rem;
|
||||||
}
|
}
|
||||||
@@ -5,9 +5,10 @@
|
|||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title>SekiPOS Login</title>
|
<title>SekiPOS Login</title>
|
||||||
<link rel="shortcut icon" href="./static/favicon.png" type="image/x-icon">
|
<link rel="shortcut icon" href="{{ url_for('static', filename='favicon.png') }}" type="image/x-icon">
|
||||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
|
||||||
<link rel="stylesheet" href="./static/style.css">
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css" rel="stylesheet">
|
||||||
|
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
@@ -29,71 +30,9 @@
|
|||||||
</button>
|
</button>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
<script src="{{ url_for('static', filename='cookieStuff.js') }}"></script>
|
||||||
|
<script src="{{ url_for('static', filename='themeStuff.js') }}"></script>
|
||||||
|
|
||||||
<script>
|
|
||||||
/* ── Theme Management ── */
|
|
||||||
|
|
||||||
// Helper to set a cookie
|
|
||||||
function setCookie(name, value, days = 365) {
|
|
||||||
const d = new Date();
|
|
||||||
d.setTime(d.getTime() + (days * 24 * 60 * 60 * 1000));
|
|
||||||
let expires = "expires=" + d.toUTCString();
|
|
||||||
document.cookie = name + "=" + value + ";" + expires + ";path=/;SameSite=Lax";
|
|
||||||
}
|
|
||||||
|
|
||||||
// Helper to get a cookie
|
|
||||||
function getCookie(name) {
|
|
||||||
let nameEQ = name + "=";
|
|
||||||
let ca = document.cookie.split(';');
|
|
||||||
for (let i = 0; i < ca.length; i++) {
|
|
||||||
let c = ca[i];
|
|
||||||
while (c.charAt(0) == ' ') c = c.substring(1, c.length);
|
|
||||||
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length);
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
function applyTheme(t) {
|
|
||||||
document.documentElement.setAttribute('data-theme', t);
|
|
||||||
const isDark = t === 'dark';
|
|
||||||
const themeIcon = document.getElementById('theme-icon');
|
|
||||||
const themeLabel = document.getElementById('theme-label');
|
|
||||||
|
|
||||||
if (themeIcon) themeIcon.className = isDark ? 'bi bi-sun me-2' : 'bi bi-moon-stars me-2';
|
|
||||||
if (themeLabel) themeLabel.innerText = isDark ? 'Modo Claro' : 'Modo Oscuro';
|
|
||||||
|
|
||||||
setCookie('theme', t);
|
|
||||||
}
|
|
||||||
|
|
||||||
function toggleTheme() {
|
|
||||||
const current = document.documentElement.getAttribute('data-theme');
|
|
||||||
const next = current === 'dark' ? 'light' : 'dark';
|
|
||||||
applyTheme(next);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Initialization Logic
|
|
||||||
function initTheme() {
|
|
||||||
const savedTheme = getCookie('theme');
|
|
||||||
|
|
||||||
if (savedTheme) {
|
|
||||||
// Use user preference if it exists
|
|
||||||
applyTheme(savedTheme);
|
|
||||||
} else {
|
|
||||||
// Otherwise, detect OS preference
|
|
||||||
const prefersDark = window.matchMedia('(prefers-color-scheme: dark)').matches;
|
|
||||||
applyTheme(prefersDark ? 'dark' : 'light');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Listen for OS theme changes in real-time if no cookie is set
|
|
||||||
window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', e => {
|
|
||||||
if (!getCookie('theme')) {
|
|
||||||
applyTheme(e.matches ? 'dark' : 'light');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
initTheme();
|
|
||||||
</script>
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
Reference in New Issue
Block a user