138 lines
6.0 KiB
HTML
138 lines
6.0 KiB
HTML
<!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>
|
|
{% if settings and settings.logo_type == 'image' and settings.logo_image %}
|
|
<link rel="icon" href="{{ settings.logo_image }}">
|
|
{% else %}
|
|
<link rel="icon" href="/static/favicon.png">
|
|
{% endif %}
|
|
<link rel="stylesheet" href="/static/css/bootstrap.min.css">
|
|
<link rel="stylesheet" href="/static/css/all.min.css">
|
|
<style>
|
|
body {
|
|
padding-top: 0px;
|
|
padding-bottom: 40px;
|
|
}
|
|
.navbar {
|
|
margin-bottom: 20px;
|
|
position: sticky;
|
|
top: 0;
|
|
z-index: 1020;
|
|
}
|
|
.footer {
|
|
margin-top: 40px;
|
|
padding: 20px 0;
|
|
border-top: 1px solid #eee;
|
|
text-align: center;
|
|
color: #777;
|
|
}
|
|
.nav-item .nav-link.active {
|
|
font-weight: bold;
|
|
color: #0d6efd !important;
|
|
border-bottom: 2px solid #0d6efd;
|
|
}
|
|
.badge .badge {
|
|
padding: 0.2em 0.4em;
|
|
font-size: 0.75em;
|
|
line-height: 1;
|
|
}
|
|
.bg-primary {
|
|
--bs-bg-opacity: 1;
|
|
background-color: rgb(106 113 124) !important;
|
|
}
|
|
|
|
.bg-light {
|
|
--bs-bg-opacity: 1;
|
|
background-color: rgb(220 224 227) !important;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="container">
|
|
<nav class="navbar navbar-expand-lg navbar-light bg-light rounded">
|
|
<div class="container-fluid">
|
|
{% if settings and settings.show_logo %}
|
|
{% if settings.logo_type == 'image' and settings.logo_image %}
|
|
<a class="navbar-brand" href="{{ url_for('navigation') }}">
|
|
<img src="{{ settings.logo_image }}" height="30" class="d-inline-block align-top me-2" alt="Logo">
|
|
{{ settings.site_title if settings.site_title else '前往导航' }}
|
|
</a>
|
|
{% elif settings.logo_type == 'icon' and settings.logo_icon %}
|
|
<a class="navbar-brand" href="{{ url_for('navigation') }}">
|
|
<i class="{{ settings.logo_icon }} me-2"></i>
|
|
{{ settings.site_title if settings.site_title else '前往导航' }}
|
|
</a>
|
|
{% else %}
|
|
<a class="navbar-brand" href="{{ url_for('navigation') }}">
|
|
{{ settings.site_title if settings.site_title else '前往导航' }}
|
|
</a>
|
|
{% endif %}
|
|
{% else %}
|
|
<a class="navbar-brand" href="{{ url_for('navigation') }}">
|
|
{{ settings.site_title if settings.site_title else '前往导航' }}
|
|
</a>
|
|
{% endif %}
|
|
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav">
|
|
<span class="navbar-toggler-icon"></span>
|
|
</button>
|
|
<div class="collapse navbar-collapse" id="navbarNav">
|
|
<ul class="navbar-nav me-auto">
|
|
{% if 'username' in session %}
|
|
<li class="nav-item">
|
|
<a class="nav-link {% if request.endpoint == 'index' %}active{% endif %}" href="{{ url_for('index') }}">应用管理</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a class="nav-link {% if request.endpoint == 'manage_categories' %}active{% endif %}" href="{{ url_for('manage_categories') }}">分类管理</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a class="nav-link {% if request.endpoint == 'manage_attachments' %}active{% endif %}" href="{{ url_for('manage_attachments') }}">附件管理</a>
|
|
</li>
|
|
{% endif %}
|
|
</ul>
|
|
<ul class="navbar-nav">
|
|
{% if 'username' in session %}
|
|
<li class="nav-item dropdown">
|
|
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-bs-toggle="dropdown">
|
|
<i class="fas fa-user"></i> {{ session['username'] }}
|
|
</a>
|
|
<ul class="dropdown-menu dropdown-menu-end">
|
|
<li><a class="dropdown-item {% if request.endpoint == 'system_settings' %}active{% endif %}" href="{{ url_for('system_settings') }}">系统设置</a></li>
|
|
<li><hr class="dropdown-divider"></li>
|
|
<li><a class="dropdown-item" href="{{ url_for('logout') }}">退出登录</a></li>
|
|
</ul>
|
|
</li>
|
|
{% else %}
|
|
<li class="nav-item">
|
|
<a class="nav-link {% if request.endpoint == 'login' %}active{% endif %}" href="{{ url_for('login') }}">登录</a>
|
|
</li>
|
|
{% endif %}
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</nav>
|
|
|
|
{% with messages = get_flashed_messages(with_categories=true) %}
|
|
{% if messages %}
|
|
{% for category, message in messages %}
|
|
<div class="alert alert-{{ category }} 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 %}
|
|
|
|
<footer class="footer">
|
|
{% include 'footer.html' %}
|
|
</footer>
|
|
</div>
|
|
|
|
<script src="/static/js/bootstrap.bundle.min.js"></script>
|
|
{% block scripts %}{% endblock %}
|
|
</body>
|
|
</html> |