Introduce an embedded-locale i18n package exposing a T() template function. UI strings across all templates and catalog category/item names are now translatable via locale JSON files, selectable through the new server.language config option. Falls back to English when a locale is missing or fails to load. Co-Authored-By: Claude Opus 4.6 <[email protected]>
46 lines
1.9 KiB
HTML
46 lines
1.9 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="{{.Lang}}">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>{{T "app.title.login"}}</title>
|
|
<link rel="stylesheet" href="/static/css/styles.css">
|
|
</head>
|
|
<body class="login-container">
|
|
<div class="login-card">
|
|
<div class="login-header">
|
|
<div class="brand">
|
|
<div class="brand-logo">S</div>
|
|
<span class="brand-name">Solis</span>
|
|
</div>
|
|
<h2 style="font-weight:700;font-size:1.5rem;letter-spacing:-0.01em;">{{T "login.title"}}</h2>
|
|
<p style="color:var(--color-text-muted);font-size:0.9rem;margin-top:0.25rem;">{{T "login.subtitle"}}</p>
|
|
</div>
|
|
|
|
{{if .Error}}
|
|
<div style="background-color:#fee2e2; border:1px solid #fca5a5; color:#b91c1c; padding:0.75rem 1rem; border-radius:6px; font-size:0.9rem; margin-bottom:1.5rem; font-weight:500; text-align:center;">
|
|
{{.Error}}
|
|
</div>
|
|
{{end}}
|
|
|
|
<form action="/admin/login" method="POST">
|
|
<input type="hidden" name="csrf_token" value="{{.CSRFToken}}">
|
|
|
|
<div class="form-group">
|
|
<label for="username" class="form-label">{{T "login.username"}}</label>
|
|
<input type="text" id="username" name="username" class="form-control" placeholder="e.g. admin" required autofocus>
|
|
</div>
|
|
|
|
<div class="form-group" style="margin-bottom: 2rem;">
|
|
<label for="password" class="form-label">{{T "login.password"}}</label>
|
|
<input type="password" id="password" name="password" class="form-control" placeholder="••••••••" required>
|
|
</div>
|
|
|
|
<button type="submit" class="btn btn-primary" style="width: 100%; padding: 0.75rem 1.25rem; font-size: 1rem;">
|
|
{{T "login.submit"}}
|
|
</button>
|
|
</form>
|
|
</div>
|
|
</body>
|
|
</html>
|