mirror of
https://github.com/KingHWJ/WeReadBoard.git
synced 2026-11-03 18:24:58 +08:00
style: 格式化 CSS、JS 和 HTML 代码
This commit is contained in:
1 parent
40b00a8b40
commit
69bfe3ce0e
9 files changed
+3397
-230
No files matched your search
+43
-33
@@ -1,39 +1,49 @@
|
||||
<!doctype html>
|
||||
<html lang="zh-CN" data-theme="light">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="csrf-token" content="{{ csrf_token() }}">
|
||||
<title>登录 · 阅间</title>
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/styles.css') }}">
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="csrf-token" content="{{ csrf_token() }}">
|
||||
<title>登录 · 阅间</title>
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/styles.css') }}">
|
||||
</head>
|
||||
|
||||
<body class="login-page">
|
||||
<main class="login-shell">
|
||||
<div class="logo login-logo"><div class="logo-mark"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M4 4c4-1 6 0 8 2 2-2 4-3 8-2v15c-4-1-6 0-8 2-2-2-4-3-8-2zM12 6v15" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round"/></svg></div><div>阅间<small>READING SPACE</small></div></div>
|
||||
<section class="login-panel card">
|
||||
<div class="eyebrow">YOUR READING SPACE</div>
|
||||
<h1>{{ '服务暂不可用' if unavailable else ('首次设置' if not initialized else '欢迎回来') }}</h1>
|
||||
<p>{{ '请检查服务配置或数据库连接。' if unavailable else ('创建管理员账号以启用访问保护。' if not initialized else '登录后继续你的阅读旅程。') }}</p>
|
||||
{% if error %}<div class="login-error" role="alert">{{ error }}</div>{% endif %}
|
||||
{% if not unavailable and not initialized %}
|
||||
{% if not setup_enabled %}<div class="login-error" role="alert">尚未配置一次性初始化口令,请联系管理员。</div>{% endif %}
|
||||
<form method="post" action="{{ url_for('auth.initialize_account') }}" class="login-form">
|
||||
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
|
||||
<label>一次性初始化口令<input name="setup_token" type="password" autocomplete="off" required autofocus></label>
|
||||
<label>管理员账号<input name="username" maxlength="64" autocomplete="username" required></label>
|
||||
<label>设置密码<input name="password" type="password" minlength="12" maxlength="256" autocomplete="new-password" required></label>
|
||||
<button class="primary" type="submit" {% if not setup_enabled %}disabled{% endif %}>创建账号并进入</button>
|
||||
</form>
|
||||
{% elif not unavailable %}
|
||||
<form method="post" action="{{ url_for('auth.login') }}" class="login-form">
|
||||
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
|
||||
<label>账号<input name="username" maxlength="64" autocomplete="username" required autofocus></label>
|
||||
<label>密码<input name="password" type="password" autocomplete="current-password" required></label>
|
||||
<button class="primary" type="submit">登录</button>
|
||||
</form>
|
||||
{% endif %}
|
||||
</section>
|
||||
<p class="login-foot">阅间 · 与好书相伴,与自己相遇</p>
|
||||
</main>
|
||||
<main class="login-shell">
|
||||
<div class="logo login-logo">
|
||||
<div class="logo-mark"><svg viewBox="0 0 24 24" aria-hidden="true">
|
||||
<path d="M4 4c4-1 6 0 8 2 2-2 4-3 8-2v15c-4-1-6 0-8 2-2-2-4-3-8-2zM12 6v15" fill="none" stroke="currentColor"
|
||||
stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round" />
|
||||
</svg></div>
|
||||
<div>阅间<small>READING SPACE</small></div>
|
||||
</div>
|
||||
<section class="login-panel card">
|
||||
<div class="eyebrow">YOUR READING SPACE</div>
|
||||
<h1>{{ '服务暂不可用' if unavailable else ('首次设置' if not initialized else '欢迎回来') }}</h1>
|
||||
<p>{{ '请检查服务配置或数据库连接。' if unavailable else ('创建管理员账号以启用访问保护。' if not initialized else '登录后继续你的阅读旅程。') }}</p>
|
||||
{% if error %}<div class="login-error" role="alert">{{ error }}</div>{% endif %}
|
||||
{% if not unavailable and not initialized %}
|
||||
{% if not setup_enabled %}<div class="login-error" role="alert">尚未配置一次性初始化口令,请联系管理员。</div>{% endif %}
|
||||
<form method="post" action="{{ url_for('auth.initialize_account') }}" class="login-form">
|
||||
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
|
||||
<label>一次性初始化口令<input name="setup_token" type="password" autocomplete="off" required autofocus></label>
|
||||
<label>管理员账号<input name="username" maxlength="64" autocomplete="username" required></label>
|
||||
<label>设置密码<input name="password" type="password" minlength="12" maxlength="256" autocomplete="new-password"
|
||||
required></label>
|
||||
<button class="primary" type="submit" {% if not setup_enabled %}disabled{% endif %}>创建账号并进入</button>
|
||||
</form>
|
||||
{% elif not unavailable %}
|
||||
<form method="post" action="{{ url_for('auth.login') }}" class="login-form">
|
||||
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
|
||||
<label>账号<input name="username" maxlength="64" autocomplete="username" required autofocus></label>
|
||||
<label>密码<input name="password" type="password" autocomplete="current-password" required></label>
|
||||
<button class="primary" type="submit">登录</button>
|
||||
</form>
|
||||
{% endif %}
|
||||
</section>
|
||||
<p class="login-foot">阅间 · 与好书相伴,与自己相遇</p>
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
</html>
|
||||
Reference in new issue
Block a user