| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178 |
- <!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>
- <!-- Local Bootstrap CSS -->
- <link href="{{ url_for('static', filename='css/bootstrap.min.css') }}" rel="stylesheet">
- <!-- Local Bootstrap Icons CSS -->
- <link href="{{ url_for('static', filename='css/bootstrap-icons.min.css') }}" rel="stylesheet">
- <style>
- body { font-family: 'Microsoft YaHei', sans-serif; }
- .sidebar { min-height: 100vh; background-color: #343a40; color: white; }
- .sidebar a { color: rgba(255,255,255,.8); text-decoration: none; padding: 10px 20px; display: block; }
- .sidebar a:hover { background-color: #495057; color: white; }
- .sidebar a.active { background-color: #0d6efd; color: white; }
- .content-area { padding: 20px; }
-
- /* Watermark styles */
- .watermark-container {
- position: fixed;
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
- pointer-events: none;
- z-index: 9999;
- overflow: hidden;
- opacity: 0.08;
- }
-
- .watermark-text {
- position: absolute;
- font-size: 18px;
- color: #999;
- transform: rotate(-15deg);
- white-space: nowrap;
- font-weight: 500;
- letter-spacing: 2px;
- }
-
- .watermark-corner {
- position: fixed;
- bottom: 15px;
- right: 15px;
- font-size: 12px;
- color: #999;
- opacity: 0.4;
- text-align: right;
- z-index: 1000;
- pointer-events: none;
- }
- </style>
- {% block extra_css %}{% endblock %}
- </head>
- <body class="bg-light">
- <div class="container-fluid">
- <div class="row">
- {% if session.get('user_id') %}
- <!-- Sidebar -->
- <div class="col-md-2 sidebar d-none d-md-block">
- <div class="py-4 text-center border-bottom mb-4">
- <h4>家谱管理</h4>
- </div>
- <nav>
- <a href="{{ url_for('home') }}" class="{% if request.endpoint == 'home' %}active{% endif %}">
- <i class="bi bi-house me-2"></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 me-2"></i> 家谱管理
- </a>
- {% endif %}
- <a href="{{ url_for('index') }}" class="{% if request.endpoint == 'index' %}active{% endif %}">
- <i class="bi bi-file-earmark-arrow-up me-2"></i> 扫描件管理
- </a>
- <a href="{{ url_for('members') }}" class="{% if request.endpoint == 'members' %}active{% endif %}">
- <i class="bi bi-people me-2"></i> 成员列表
- </a>
- <a href="{{ url_for('tree') }}" class="{% if request.endpoint == 'tree' %}active{% endif %}">
- <i class="bi bi-diagram-3 me-2"></i> 关系树状图
- </a>
- <a href="{{ url_for('lineage_query') }}" class="{% if request.endpoint == 'lineage_query' %}active{% endif %}">
- <i class="bi bi-tree me-2"></i> 世系查询
- </a>
- <div class="mt-5 border-top pt-3">
- <p class="px-3 small text-muted">用户: {{ session['username'] }}</p>
- <a href="{{ url_for('logout') }}" class="text-danger">
- <i class="bi bi-box-arrow-right me-2"></i> 退出登录
- </a>
- </div>
- </nav>
- </div>
- {% endif %}
- <!-- Watermark -->
- <div class="watermark-container" id="watermarkContainer"></div>
- <div class="watermark-corner" id="watermarkCorner"></div>
-
- <!-- Main Content -->
- <div class="col-md-{% if session.get('user_id') %}10{% else %}12{% endif %} content-area">
- {% with messages = get_flashed_messages() %}
- {% if messages %}
- {% for message in messages %}
- <div class="alert alert-info alert-dismissible fade show" role="alert">
- {{ message }}
- <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
- </div>
- {% endfor %}
- {% endif %}
- {% endwith %}
- {% block content %}{% endblock %}
- </div>
- </div>
- </div>
- <!-- Local Bootstrap JS -->
- <script src="{{ url_for('static', filename='js/bootstrap.bundle.min.js') }}"></script>
-
- <!-- Watermark 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}`;
- }
-
- // Generate tiled watermark
- 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);
- }
-
- // Update corner watermark
- function updateCornerWatermark() {
- if (corner && username) {
- corner.textContent = formatWatermarkText();
- }
- }
-
- updateCornerWatermark();
- setInterval(updateCornerWatermark, 1000);
- });
- </script>
-
- {% block extra_js %}{% endblock %}
- </body>
- </html>
|