| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162 |
- <!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="{{ url_for('static', filename='css/bootstrap.min.css') }}" rel="stylesheet">
- <link href="{{ url_for('static', filename='css/bootstrap-icons.min.css') }}" rel="stylesheet">
- <link href="{{ url_for('static', filename='css/main.css') }}" rel="stylesheet">
- {% block extra_css %}{% endblock %}
- </head>
- <body>
- <div class="page-container">
- {% if session.get('user_id') %}
- <aside class="sidebar">
- <div class="sidebar-header">
- <picture>
- <source srcset="{{ url_for('static', filename='images/home/logo.webp') }}" type="image/webp">
- <img src="{{ url_for('static', filename='images/home/logo.png') }}" alt="留" class="sidebar-logo">
- </picture>
- <div class="sidebar-title">家谱管理系统</div>
- </div>
-
- <nav class="sidebar-nav">
- <a href="{{ url_for('home') }}" class="{% if request.endpoint == 'home' %}active{% endif %}">
- <i class="bi bi-house"></i> 系统首页
- </a>
- {% if session.get('is_super_admin') %}
- <a href="{{ url_for('pdf_management') }}" class="{% if request.endpoint == 'pdf_management' %}active{% endif %}">
- <i class="bi bi-book"></i> 家谱管理
- </a>
- {% endif %}
- <a href="{{ url_for('index') }}" class="{% if request.endpoint == 'index' %}active{% endif %}">
- <i class="bi bi-file-earmark-arrow-up"></i> 扫描件管理
- </a>
- <a href="{{ url_for('members') }}" class="{% if request.endpoint == 'members' %}active{% endif %}">
- <i class="bi bi-people"></i> 成员列表
- </a>
- <a href="{{ url_for('batch_genealogy') }}" class="{% if request.endpoint == 'batch_genealogy' %}active{% endif %}">
- <i class="bi bi-file-text"></i> 批量处理族谱原文
- </a>
- <a href="{{ url_for('tree') }}" class="{% if request.endpoint == 'tree' %}active{% endif %}">
- <i class="bi bi-diagram-3"></i> 家谱世系树状图
- </a>
- <a href="{{ url_for('tree_gen') }}" class="{% if request.endpoint == 'tree_gen' %}active{% endif %}">
- <i class="bi bi-layout-three-columns"></i> 世代分层树
- </a>
- <a href="{{ url_for('lineage_query') }}" class="{% if request.endpoint == 'lineage_query' %}active{% endif %}">
- <i class="bi bi-tree"></i> 世系查询
- </a>
- <a href="{{ url_for('settlements') }}" class="{% if request.endpoint == 'settlements' %}active{% endif %}">
- <i class="bi bi-globe"></i> 聚落地图
- </a>
- <a href="{{ url_for('generation_check_page') }}" class="{% if request.endpoint == 'generation_check_page' %}active{% endif %}">
- <i class="bi bi-clipboard2-check"></i> 代数核查
- </a>
- <a href="{{ url_for('suspected_errors') }}" class="{% if request.endpoint == 'suspected_errors' %}active{% endif %}">
- <i class="bi bi-exclamation-triangle"></i> 疑似错误汇总
- </a>
- </nav>
-
- <div class="sidebar-footer">
- <div class="sidebar-user">
- <div class="sidebar-user-icon">{{ session['username'][0] if session['username'] else '用' }}</div>
- <span class="sidebar-user-name">{{ session['username'] }}</span>
- </div>
- <a href="{{ url_for('logout') }}" class="sidebar-logout">
- <i class="bi bi-box-arrow-right"></i> 退出登录
- </a>
- </div>
- </aside>
- {% endif %}
- <div class="watermark-container" id="watermarkContainer"></div>
- <div class="watermark-corner" id="watermarkCorner"></div>
- <main class="main-content">
- {% with messages = get_flashed_messages(with_categories=true) %}
- {% if messages %}
- {% for category, message in messages %}
- {% if category == 'warning' %}
- <div class="alert alert-warning alert-dismissible fade show mb-4" role="alert">
- <i class="bi bi-exclamation-triangle me-2"></i>{{ message }}
- <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
- </div>
- {% elif category == 'error' %}
- <div class="alert alert-danger alert-dismissible fade show mb-4" role="alert">
- <i class="bi bi-x-circle me-2"></i>{{ message }}
- <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
- </div>
- {% else %}
- <div class="alert alert-info alert-dismissible fade show mb-4" role="alert">
- <i class="bi bi-info-circle me-2"></i>{{ message }}
- <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
- </div>
- {% endif %}
- {% endfor %}
- {% endif %}
- {% endwith %}
- {% block content %}{% endblock %}
- </main>
- </div>
- <script src="{{ url_for('static', filename='js/bootstrap.bundle.min.js') }}"></script>
-
- <script>
- document.addEventListener('DOMContentLoaded', function() {
- const username = "{{ session.get('username', '') }}";
- const container = document.getElementById('watermarkContainer');
- const corner = document.getElementById('watermarkCorner');
-
- function formatWatermarkText() {
- if (!username) return '';
- const now = new Date();
- const year = now.getFullYear();
- const month = String(now.getMonth() + 1).padStart(2, '0');
- const day = String(now.getDate()).padStart(2, '0');
- const hour = String(now.getHours()).padStart(2, '0');
- const minute = String(now.getMinutes()).padStart(2, '0');
- return `${username}_${year}${month}${day}_${hour}${minute}`;
- }
-
- if (container && username) {
- const cols = 6;
- const rows = 8;
- const cellWidth = window.innerWidth / cols;
- const cellHeight = window.innerHeight / rows;
-
- function updateTiledWatermark() {
- container.innerHTML = '';
- const watermarkText = formatWatermarkText();
- for (let i = 0; i < rows; i++) {
- for (let j = 0; j < cols; j++) {
- const span = document.createElement('span');
- span.className = 'watermark-text';
- span.textContent = watermarkText;
- span.style.left = (j * cellWidth + 20) + 'px';
- span.style.top = (i * cellHeight + 20) + 'px';
- container.appendChild(span);
- }
- }
- }
-
- updateTiledWatermark();
- setInterval(updateTiledWatermark, 60000);
- }
-
- function updateCornerWatermark() {
- if (corner && username) {
- corner.textContent = formatWatermarkText();
- }
- }
-
- updateCornerWatermark();
- setInterval(updateCornerWatermark, 1000);
- });
- </script>
-
- {% block extra_js %}{% endblock %}
- </body>
- </html>
|