Ungenutzte Hilfsfunktion, ungenutzter Konfigurationswert und drei CSS-Regeln ohne Verwendung im Markup. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -25,8 +25,6 @@ SMTP_STARTTLS=1
|
|||||||
REMINDER_TO=
|
REMINDER_TO=
|
||||||
|
|
||||||
# --- Sonstiges --------------------------------------------------------------
|
# --- Sonstiges --------------------------------------------------------------
|
||||||
DATA_DIR=/data
|
|
||||||
PORT=8080
|
|
||||||
# Fuer den Link in der Erinnerungsmail.
|
# Fuer den Link in der Erinnerungsmail.
|
||||||
PUBLIC_BASE_URL=https://business-card-scanner.lucas-orth.de
|
PUBLIC_BASE_URL=https://business-card-scanner.lucas-orth.de
|
||||||
# Ortsnamen ueber Nominatim aufloesen (0 schaltet es ab).
|
# Ortsnamen ueber Nominatim aufloesen (0 schaltet es ab).
|
||||||
|
|||||||
@@ -25,8 +25,6 @@ DATA_DIR = Path(_s("DATA_DIR", "./data"))
|
|||||||
IMAGE_DIR = DATA_DIR / "images"
|
IMAGE_DIR = DATA_DIR / "images"
|
||||||
DB_PATH = DATA_DIR / "cards.db"
|
DB_PATH = DATA_DIR / "cards.db"
|
||||||
|
|
||||||
PORT = _i("PORT", 8080)
|
|
||||||
|
|
||||||
# Leeres Passwort schaltet die Anmeldung ab - nur fuer die lokale Entwicklung.
|
# Leeres Passwort schaltet die Anmeldung ab - nur fuer die lokale Entwicklung.
|
||||||
APP_PASSWORD = _s("APP_PASSWORD")
|
APP_PASSWORD = _s("APP_PASSWORD")
|
||||||
SECRET_KEY = _s("SECRET_KEY", "dev-only-insecure-secret")
|
SECRET_KEY = _s("SECRET_KEY", "dev-only-insecure-secret")
|
||||||
|
|||||||
@@ -79,13 +79,3 @@ def encode_jpeg(rgb_or_bgr: np.ndarray, quality: int = 88, bgr: bool = True) ->
|
|||||||
Image.fromarray(array).save(buffer, format="JPEG", quality=quality, optimize=True)
|
Image.fromarray(array).save(buffer, format="JPEG", quality=quality, optimize=True)
|
||||||
return buffer.getvalue()
|
return buffer.getvalue()
|
||||||
|
|
||||||
|
|
||||||
def fit_within(image: np.ndarray, max_edge: int) -> np.ndarray:
|
|
||||||
height, width = image.shape[:2]
|
|
||||||
longest = max(height, width)
|
|
||||||
if longest <= max_edge:
|
|
||||||
return image
|
|
||||||
scale = max_edge / longest
|
|
||||||
pil = Image.fromarray(image[:, :, ::-1])
|
|
||||||
pil = pil.resize((round(width * scale), round(height * scale)), Image.LANCZOS)
|
|
||||||
return np.asarray(pil)[:, :, ::-1].copy()
|
|
||||||
|
|||||||
@@ -185,18 +185,6 @@ main { flex: 1; display: flex; flex-direction: column; }
|
|||||||
.btn:disabled { opacity: 0.35; cursor: not-allowed; }
|
.btn:disabled { opacity: 0.35; cursor: not-allowed; }
|
||||||
.btn .arrow { font-weight: 400; font-size: 17px; }
|
.btn .arrow { font-weight: 400; font-size: 17px; }
|
||||||
|
|
||||||
.btn-row { display: flex; gap: 10px; }
|
|
||||||
.btn-row .btn { flex: 1; }
|
|
||||||
|
|
||||||
.btn-small {
|
|
||||||
padding: 9px 12px;
|
|
||||||
font-size: 11px;
|
|
||||||
letter-spacing: 0.1em;
|
|
||||||
border-width: 2px;
|
|
||||||
width: auto;
|
|
||||||
justify-content: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.btn-danger { border-color: var(--fg); color: var(--fg); }
|
.btn-danger { border-color: var(--fg); color: var(--fg); }
|
||||||
|
|
||||||
/* --------------------------------------------------------------------- Formular */
|
/* --------------------------------------------------------------------- Formular */
|
||||||
@@ -286,9 +274,6 @@ main { flex: 1; display: flex; flex-direction: column; }
|
|||||||
background: var(--wash);
|
background: var(--wash);
|
||||||
}
|
}
|
||||||
|
|
||||||
.thumbs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
|
|
||||||
.thumbs img { width: 100%; border: 2px solid var(--fg); display: block; }
|
|
||||||
|
|
||||||
/* -------------------------------------------------------------------- Navigation */
|
/* -------------------------------------------------------------------- Navigation */
|
||||||
|
|
||||||
.tabs {
|
.tabs {
|
||||||
@@ -331,8 +316,6 @@ main { flex: 1; display: flex; flex-direction: column; }
|
|||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
}
|
}
|
||||||
|
|
||||||
.badge-solid { background: var(--fg); color: var(--bg); }
|
|
||||||
|
|
||||||
.overlay {
|
.overlay {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
inset: 0;
|
inset: 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user