refactor: remove duplicated route and UI code
This commit is contained in:
+4
-140
@@ -4,146 +4,7 @@
|
||||
<title>{% block title %}供水管道健康评估系统{% endblock %}</title>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<script src="https://cdn.tailwindcss.com?plugins=forms,container-queries"></script>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Manrope:wght@700;800&display=swap" rel="stylesheet" />
|
||||
<link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:wght,FILL@100..700,0..1&display=swap" rel="stylesheet" />
|
||||
<script>
|
||||
tailwind.config = {
|
||||
theme: {
|
||||
extend: {
|
||||
colors: {
|
||||
primary: '#005EB8',
|
||||
primaryDeep: '#0c4188',
|
||||
page: '#f3f5f8',
|
||||
card: '#ffffff',
|
||||
line: '#e2e8f0',
|
||||
textMain: '#0f172a',
|
||||
textSub: '#64748b',
|
||||
blueSoft: '#eaf3ff',
|
||||
outline: '#c7ced8',
|
||||
successSoft: '#e9f8ee',
|
||||
successText: '#16a34a',
|
||||
dangerSoft: '#fff0f0',
|
||||
dangerText: '#dc2626'
|
||||
},
|
||||
fontFamily: {
|
||||
headline: ['Manrope', 'Inter', 'sans-serif'],
|
||||
body: ['Inter', 'sans-serif']
|
||||
},
|
||||
boxShadow: {
|
||||
soft: '0 18px 34px rgba(15, 23, 42, .06)',
|
||||
panel: '0 1px 2px rgba(15, 23, 42, .04)'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
body { font-family: 'Inter', sans-serif; }
|
||||
h1, h2, h3, h4 { font-family: 'Manrope', 'Inter', sans-serif; }
|
||||
.material-symbols-outlined {
|
||||
font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.ui-btn {
|
||||
box-sizing: border-box;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: .5rem;
|
||||
min-height: 44px;
|
||||
height: 44px;
|
||||
border-radius: .375rem;
|
||||
border: 1px solid transparent;
|
||||
padding: 0 1rem;
|
||||
font-size: .875rem;
|
||||
font-weight: 700;
|
||||
line-height: 1;
|
||||
white-space: nowrap;
|
||||
transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
|
||||
}
|
||||
.ui-btn-sm {
|
||||
min-height: 40px;
|
||||
height: 40px;
|
||||
padding: 0 .75rem;
|
||||
}
|
||||
.ui-btn-primary {
|
||||
background: #005EB8;
|
||||
color: #fff;
|
||||
box-shadow: 0 18px 34px rgba(15, 23, 42, .06);
|
||||
}
|
||||
.ui-btn-primary:hover { background: #0c4188; }
|
||||
.ui-btn-secondary {
|
||||
border-color: #e2e8f0;
|
||||
background: #fff;
|
||||
color: #334155;
|
||||
box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
|
||||
}
|
||||
.ui-btn-secondary:hover {
|
||||
border-color: #005EB8;
|
||||
color: #005EB8;
|
||||
}
|
||||
.ui-btn:disabled,
|
||||
.ui-btn[aria-disabled="true"] {
|
||||
cursor: not-allowed;
|
||||
box-shadow: none;
|
||||
opacity: .7;
|
||||
}
|
||||
.ui-btn-primary:disabled { background: #cbd5e1; }
|
||||
.ui-btn-icon,
|
||||
.ui-btn .material-symbols-outlined {
|
||||
display: inline-flex;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
flex: 0 0 20px;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 20px;
|
||||
line-height: 1;
|
||||
}
|
||||
.ui-icon-btn {
|
||||
box-sizing: border-box;
|
||||
display: inline-flex;
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
flex: 0 0 28px;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-radius: .375rem;
|
||||
line-height: 1;
|
||||
transition: background-color .15s ease, color .15s ease;
|
||||
}
|
||||
.ui-action-row {
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
min-height: 44px;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: .75rem;
|
||||
border-radius: .375rem;
|
||||
border: 1px solid #e2e8f0;
|
||||
padding: 0 .75rem;
|
||||
font-size: .875rem;
|
||||
font-weight: 700;
|
||||
line-height: 1;
|
||||
transition: border-color .15s ease, color .15s ease;
|
||||
}
|
||||
.ui-action-row:hover {
|
||||
border-color: #005EB8;
|
||||
color: #005EB8;
|
||||
}
|
||||
.spinner {
|
||||
display: inline-flex;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
flex: 0 0 20px;
|
||||
border-radius: 9999px;
|
||||
border: 2px solid rgba(255,255,255,.35);
|
||||
border-top-color: #fff;
|
||||
animation: spin .75s linear infinite;
|
||||
}
|
||||
@keyframes spin { to { transform: rotate(360deg); } }
|
||||
</style>
|
||||
<link href="{{ url_for('static', filename='css/app.css') }}" rel="stylesheet" />
|
||||
{% block head_extra %}{% endblock %}
|
||||
</head>
|
||||
<body class="flex min-h-screen flex-col bg-page text-textMain antialiased">
|
||||
@@ -206,6 +67,9 @@
|
||||
<script>
|
||||
window.__flashMessages = {{ flashed_messages|tojson }};
|
||||
</script>
|
||||
<div class="sr-only" aria-hidden="true">
|
||||
{% for category, message in flashed_messages %}{{ message }}{% endfor %}
|
||||
</div>
|
||||
{% endwith %}
|
||||
|
||||
<main class="mx-auto w-full max-w-7xl flex-1 px-4 py-6 sm:px-6 lg:px-8 lg:py-8">
|
||||
|
||||
+1
-109
@@ -4,108 +4,8 @@
|
||||
<title>{{ '注册' if mode == 'register' else '登录' }} | 供水管道健康评估系统</title>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<script src="https://cdn.tailwindcss.com?plugins=forms,container-queries"></script>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Manrope:wght@700;800&display=swap" rel="stylesheet" />
|
||||
<link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:wght,FILL@100..700,0..1&display=swap" rel="stylesheet" />
|
||||
<script>
|
||||
tailwind.config = {
|
||||
darkMode: 'class',
|
||||
theme: {
|
||||
extend: {
|
||||
colors: {
|
||||
primary: '#005EB8',
|
||||
primaryDeep: '#0c4188',
|
||||
page: '#f3f5f8',
|
||||
card: '#ffffff',
|
||||
line: '#e5e7eb',
|
||||
textMain: '#0f172a',
|
||||
textSub: '#64748b',
|
||||
blueSoft: '#eaf3ff',
|
||||
bluePanel: '#1d4f9a',
|
||||
outline: '#c7ced8',
|
||||
successSoft: '#e9f8ee',
|
||||
successText: '#16a34a',
|
||||
warnSoft: '#fff4e8',
|
||||
warnText: '#c2410c',
|
||||
dangerSoft: '#fff0f0',
|
||||
dangerText: '#dc2626',
|
||||
lowCard: '#f8fafc'
|
||||
},
|
||||
fontFamily: {
|
||||
headline: ['Manrope', 'Inter', 'sans-serif'],
|
||||
body: ['Inter', 'sans-serif']
|
||||
},
|
||||
boxShadow: {
|
||||
soft: '0 24px 24px -12px rgba(24,28,30,.06)',
|
||||
card: '0 10px 25px rgba(15, 23, 42, .06)'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<link href="{{ url_for('static', filename='css/app.css') }}" rel="stylesheet" />
|
||||
<style>
|
||||
.material-symbols-outlined {
|
||||
font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.ui-btn {
|
||||
box-sizing: border-box;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: .5rem;
|
||||
min-height: 44px;
|
||||
height: 44px;
|
||||
border-radius: .375rem;
|
||||
border: 1px solid transparent;
|
||||
padding: 0 1rem;
|
||||
font-size: .875rem;
|
||||
font-weight: 700;
|
||||
line-height: 1;
|
||||
white-space: nowrap;
|
||||
transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
|
||||
}
|
||||
.ui-btn-lg {
|
||||
min-height: 52px;
|
||||
height: 52px;
|
||||
font-size: .875rem;
|
||||
}
|
||||
.ui-btn-field {
|
||||
min-height: 50px;
|
||||
height: 50px;
|
||||
}
|
||||
.ui-btn-primary {
|
||||
background: #005EB8;
|
||||
color: #fff;
|
||||
box-shadow: 0 18px 34px rgba(15, 23, 42, .06);
|
||||
}
|
||||
.ui-btn-primary:hover { background: #0c4188; }
|
||||
.ui-btn-secondary {
|
||||
border-color: #e2e8f0;
|
||||
background: #fff;
|
||||
color: #334155;
|
||||
box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
|
||||
}
|
||||
.ui-btn-secondary:hover {
|
||||
border-color: #005EB8;
|
||||
color: #005EB8;
|
||||
}
|
||||
.ui-btn:disabled {
|
||||
cursor: not-allowed;
|
||||
box-shadow: none;
|
||||
opacity: .7;
|
||||
}
|
||||
.ui-btn-primary:disabled { background: #cbd5e1; }
|
||||
.ui-btn .material-symbols-outlined {
|
||||
display: inline-flex;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
flex: 0 0 20px;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 20px;
|
||||
line-height: 1;
|
||||
}
|
||||
.password-toggle {
|
||||
position: absolute;
|
||||
right: .75rem;
|
||||
@@ -144,8 +44,6 @@
|
||||
background: #fff7f7 !important;
|
||||
box-shadow: 0 0 0 3px rgba(220, 38, 38, .12) !important;
|
||||
}
|
||||
body { font-family: 'Inter', sans-serif; }
|
||||
h1, h2, h3, h4 { font-family: 'Manrope', 'Inter', sans-serif; }
|
||||
.dot-grid {
|
||||
background-image: radial-gradient(circle at 1px 1px, rgba(148,163,184,.30) 1.2px, transparent 0);
|
||||
background-size: 42px 42px;
|
||||
@@ -157,11 +55,6 @@
|
||||
.gradient-board {
|
||||
background: linear-gradient(180deg, #2455a3 0%, #123e7d 100%);
|
||||
}
|
||||
.spinner {
|
||||
width: 18px; height: 18px; border-radius: 9999px;
|
||||
border: 2px solid rgba(255,255,255,.35); border-top-color: #fff;
|
||||
animation: spin .75s linear infinite;
|
||||
}
|
||||
.auth-alert {
|
||||
pointer-events: none;
|
||||
opacity: 0;
|
||||
@@ -203,7 +96,6 @@
|
||||
transform: translateX(0);
|
||||
}
|
||||
}
|
||||
@keyframes spin { to { transform: rotate(360deg); } }
|
||||
</style>
|
||||
</head>
|
||||
<body class="bg-page min-h-screen text-textMain">
|
||||
|
||||
Reference in New Issue
Block a user