|
|
<!DOCTYPE html> |
|
|
<html lang="vi"> |
|
|
<head> |
|
|
<meta charset="UTF-8"> |
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
|
|
<title>{{ title | default('Ứng dụng Flask Supabase') }}</title> |
|
|
<style> |
|
|
|
|
|
nav .nav-links a { margin-right: 15px; text-decoration: none; color: #007bff; font-weight: bold; } |
|
|
nav .nav-links a:hover { color: #0056b3; text-decoration: underline; } |
|
|
|
|
|
.nav-links a.active { color: #0056b3; text-decoration: underline; } |
|
|
</style> |
|
|
</head> |
|
|
<body> |
|
|
<div class="container"> |
|
|
<nav> |
|
|
<div class="nav-links"> |
|
|
<a href="{{ url_for('home') }}">Trang chủ</a> |
|
|
<a href="{{ url_for('test_db') }}">Kiểm tra DB</a> |
|
|
<a href="{{ url_for('create_table') }}">Tạo Bảng</a> |
|
|
<a href="{{ url_for('add_user') }}">Thêm Người dùng</a> |
|
|
<a href="{{ url_for('get_users') }}">Danh sách Người dùng</a> |
|
|
<a href="{{ url_for('login') }}">Đăng nhập Người dùng</a> |
|
|
<a href="{{ url_for('solar_flow') }}">Điện mặt trời</a> {# <-- Thêm liên kết mới #} |
|
|
</div> |
|
|
<div class="auth-status"> |
|
|
{% if session.get('page_logged_in') %} |
|
|
<span>Đã xác thực</span> | <a href="{{ url_for('page_logout') }}">Đăng xuất</a> |
|
|
{% else %} |
|
|
<span>Chưa xác thực</span> | <a href="{{ url_for('page_password_form', next=request.path) }}">Đăng nhập</a> |
|
|
{% endif %} |
|
|
</div> |
|
|
</nav> |
|
|
|
|
|
<div class="flash-messages"> |
|
|
{% with messages = get_flashed_messages(with_categories=true) %} |
|
|
{% if messages %} |
|
|
{% for category, message in messages %} |
|
|
<div class="{{ category }}">{{ message }}</div> |
|
|
{% endfor %} |
|
|
{% endif %} |
|
|
{% endwith %} |
|
|
</div> |
|
|
|
|
|
{% block content %}{% endblock %} |
|
|
</div> |
|
|
</body> |
|
|
</html> |