futranbg commited on
Commit
20301ae
·
verified ·
1 Parent(s): 62c419a

Create templates/base.html

Browse files
Files changed (1) hide show
  1. templates/base.html +52 -0
templates/base.html ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="vi">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>{{ title | default('Ứng dụng Flask Supabase') }}</title>
7
+ <style>
8
+ body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; margin: 20px; background-color: #f4f7f6; color: #333; }
9
+ .container { max-width: 800px; margin: auto; background: #fff; padding: 20px 30px; border-radius: 8px; box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
10
+ h1, h2 { color: #0056b3; border-bottom: 2px solid #eee; padding-bottom: 10px; margin-bottom: 20px; }
11
+ nav { margin-bottom: 20px; }
12
+ nav a { margin-right: 15px; text-decoration: none; color: #007bff; font-weight: bold; }
13
+ nav a:hover { color: #0056b3; text-decoration: underline; }
14
+ form { background: #f9f9f9; padding: 20px; border-radius: 5px; margin-bottom: 20px; }
15
+ label { display: block; margin-bottom: 8px; font-weight: bold; }
16
+ input[type="text"], input[type="email"], input[type="password"] {
17
+ width: calc(100% - 22px); padding: 10px; margin-bottom: 15px; border: 1px solid #ccc; border-radius: 4px;
18
+ }
19
+ button { background-color: #28a745; color: white; padding: 12px 20px; border: none; border-radius: 5px; cursor: pointer; font-size: 16px; }
20
+ button:hover { background-color: #218838; }
21
+ .flash-messages { margin-bottom: 20px; }
22
+ .flash-messages .success { background-color: #d4edda; color: #155724; border: 1px solid #c3e6cb; padding: 10px; border-radius: 5px; margin-bottom: 10px; }
23
+ .flash-messages .error { background-color: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; padding: 10px; border-radius: 5px; margin-bottom: 10px; }
24
+ ul { list-style-type: none; padding: 0; }
25
+ li { background: #e9ecef; margin-bottom: 8px; padding: 10px; border-radius: 4px; }
26
+ </style>
27
+ </head>
28
+ <body>
29
+ <div class="container">
30
+ <nav>
31
+ <a href="{{ url_for('home') }}">Trang chủ</a>
32
+ <a href="{{ url_for('test_db') }}">Kiểm tra DB</a>
33
+ <a href="{{ url_for('create_table') }}">Tạo Bảng</a>
34
+ <a href="{{ url_for('add_user') }}">Thêm Người dùng</a>
35
+ <a href="{{ url_for('users') }}">Danh sách Người dùng</a>
36
+ <a href="{{ url_for('login') }}">Đăng nhập Người dùng</a>
37
+ </nav>
38
+
39
+ <div class="flash-messages">
40
+ {% with messages = get_flashed_messages(with_categories=true) %}
41
+ {% if messages %}
42
+ {% for category, message in messages %}
43
+ <div class="{{ category }}">{{ message }}</div>
44
+ {% endfor %}
45
+ {% endif %}
46
+ {% endwith %}
47
+ </div>
48
+
49
+ {% block content %}{% endblock %}
50
+ </div>
51
+ </body>
52
+ </html>