Files
SignatureSystem/templates/base.html

153 lines
6.4 KiB
HTML
Raw Normal View History

2026-07-20 13:16:17 +08:00
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{% block title %}自动签名系统{% endblock %}</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.0/font/bootstrap-icons.css" rel="stylesheet">
<style>
:root { --header-height: 56px; }
* { box-sizing: border-box; }
body { margin: 0; padding: 0; font-family: "Microsoft YaHei", "Segoe UI", sans-serif; background: #f0f2f5; overflow: hidden; height: 100vh; }
.app-header {
height: var(--header-height);
background: linear-gradient(135deg, #1a237e 0%, #283593 100%);
color: #fff;
display: flex;
align-items: center;
padding: 0 20px;
box-shadow: 0 2px 8px rgba(0,0,0,0.15);
z-index: 100;
}
.app-header h1 { font-size: 18px; margin: 0; font-weight: 600; white-space: nowrap; }
.app-header .status-dot { width: 8px; height: 8px; border-radius: 50%; background: #4caf50; display: inline-block; margin-left: 10px; }
.app-header .nav-links { margin-left: auto; display: flex; gap: 4px; }
.app-header .nav-links a {
color: rgba(255,255,255,0.8); text-decoration: none; padding: 5px 12px;
border-radius: 6px; font-size: 13px; transition: all 0.2s;
}
.app-header .nav-links a:hover, .app-header .nav-links a.active { background: rgba(255,255,255,0.15); color: #fff; }
.app-body {
height: calc(100vh - var(--header-height));
overflow: hidden;
}
.main-content {
height: 100%;
overflow-y: auto;
padding: 16px 24px;
}
.card-section {
background: #fff;
border-radius: 8px;
padding: 16px;
margin-bottom: 12px;
box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.card-section h6 {
font-size: 14px; font-weight: 600; color: #1a237e;
margin-bottom: 12px; padding-bottom: 8px; border-bottom: 2px solid #e8eaf6;
}
.form-label { font-size: 13px; font-weight: 500; margin-bottom: 4px; }
.form-control, .form-select { font-size: 13px; }
.btn-primary { background: #1a237e; border-color: #1a237e; }
.btn-primary:hover { background: #283593; border-color: #283593; }
.stamp-item {
background: #f5f5f5; border: 1px solid #e0e0e0;
border-radius: 6px; padding: 12px; margin-bottom: 8px;
}
.stamp-item .stamp-header {
display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px;
}
.preview-container { display: flex; gap: 12px; align-items: flex-start; }
.preview-box {
border: 1px dashed #bdbdbd; border-radius: 6px; padding: 8px;
text-align: center; min-height: 100px; min-width: 120px;
background: repeating-conic-gradient(#f5f5f5 0% 25%, #fff 0% 50%) 50% / 16px 16px;
}
.preview-box img { max-width: 200px; max-height: 150px; }
.preview-box .label { font-size: 11px; color: #757575; margin-top: 4px; }
.highlight-error {
animation: highlight-pulse 1.5s ease-in-out;
border-color: #c62828 !important;
box-shadow: 0 0 0 2px rgba(198, 40, 40, 0.3) !important;
}
@keyframes highlight-pulse {
0%, 100% { box-shadow: 0 0 0 2px rgba(198, 40, 40, 0.3); }
50% { box-shadow: 0 0 0 4px rgba(198, 40, 40, 0.5); }
}
.table { font-size: 13px; }
.table th { font-weight: 600; background: #e8eaf6; color: #1a237e; }
.json-preview {
background: #263238; color: #aed581; padding: 12px; border-radius: 6px;
font-family: "Consolas", monospace; font-size: 12px;
max-height: 300px; overflow-y: auto; white-space: pre-wrap; word-break: break-all;
}
.log-toolbar {
display: flex; align-items: center; gap: 8px;
padding: 8px 16px; background: #fff; border-bottom: 1px solid #e0e0e0; flex-shrink: 0;
}
.log-toolbar .btn { font-size: 12px; padding: 4px 10px; }
.log-toolbar .form-select { font-size: 12px; padding: 4px 8px; width: auto; }
.log-toolbar .form-control { font-size: 12px; padding: 4px 8px; }
.log-content {
flex: 1; overflow-y: auto; padding: 8px 12px;
font-family: "Consolas", "Courier New", monospace; font-size: 12px; line-height: 1.6;
}
.log-entry {
padding: 2px 4px; border-radius: 2px; white-space: pre-wrap; word-break: break-all;
}
.log-entry:hover { background: #e3f2fd; cursor: pointer; }
.log-entry.level-INFO { color: #333; }
.log-entry.level-WARN { color: #e65100; }
.log-entry.level-ERROR { color: #c62828; background: #ffebee; }
.log-source-frontend { color: #757575; font-size: 11px; }
.log-source-api { color: #1565c0; font-size: 11px; }
.log-timestamp { color: #9e9e9e; font-size: 11px; }
.two-col { display: flex; gap: 16px; }
.two-col .col-left { flex: 1; min-width: 0; }
.two-col .col-right { flex: 1; min-width: 0; }
.pagination-area { display: flex; justify-content: center; padding: 8px 0; }
</style>
{% block extra_css %}{% endblock %}
</head>
<body>
<header class="app-header">
<h1><i class="bi bi-pen-fill"></i> 自动签名系统</h1>
<span class="status-dot" id="serviceStatus"></span>
<nav class="nav-links">
<a href="/" class="{{ 'active' if request.path == '/' else '' }}">签章</a>
<a href="/db-manager" class="{{ 'active' if request.path == '/db-manager' else '' }}">数据库管理</a>
<a href="/logs" class="{{ 'active' if request.path == '/logs' else '' }}">日志</a>
</nav>
</header>
<div class="app-body">
{% block content %}{% endblock %}
</div>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
<script>
function escapeHtml(text) {
const div = document.createElement('div');
div.textContent = text;
return div.innerHTML;
}
</script>
{% block extra_js %}{% endblock %}
</body>
</html>