04/29 Modified page footer, update year automatically

This commit is contained in:
2026-04-29 15:53:21 -04:00
parent 96a343f284
commit 87fd3bc568
2 changed files with 203 additions and 225 deletions
+1
View File
@@ -153,6 +153,7 @@ def create_app() -> Flask:
return { return {
'COMPANY_NAME': os.environ.get('COMPANY_NAME', 'QR Code Management System'), 'COMPANY_NAME': os.environ.get('COMPANY_NAME', 'QR Code Management System'),
'THEME_NAME': os.environ.get('THEME_NAME', ''), 'THEME_NAME': os.environ.get('THEME_NAME', ''),
'CURRENT_YEAR': datetime.utcnow().year,
} }
@app.context_processor @app.context_processor
+15 -38
View File
@@ -1,38 +1,24 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="UTF-8" /> <meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>{% block title %}{{ COMPANY_NAME }}{% endblock %}</title> <title>{% block title %}{{ COMPANY_NAME }}{% endblock %}</title>
<!-- Main CSS --> <!-- Main CSS -->
<link <link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}" />
rel="stylesheet"
href="{{ url_for('static', filename='css/style.css') }}"
/>
<!-- Font Awesome --> <!-- Font Awesome -->
<link <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" rel="stylesheet" />
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css"
rel="stylesheet"
/>
<!-- Theme override — loaded before page-specific CSS so per-page sheets
can still override theme values; use !important in theme CSS where needed -->
{% if THEME_NAME %}
<link rel="stylesheet" href="{{ url_for('static', filename='css/theme-' + THEME_NAME + '.css') }}" />
{% endif %}
<!-- Page-specific CSS --> <!-- Page-specific CSS -->
{% block extra_head %}{% endblock %} {% block extra_head %}{% endblock %}
<!-- Favicon --> <!-- Favicon -->
<link <link rel="icon" type="image/x-icon" href="{{ url_for('static', filename='favicon.ico') }}" />
rel="icon"
type="image/x-icon"
href="{{ url_for('static', filename='favicon.ico') }}"
/>
</head> </head>
<body class="has-sidebar"> <body class="has-sidebar">
<!-- Authenticated Layout with Sidebar --> <!-- Authenticated Layout with Sidebar -->
<div class="app-layout"> <div class="app-layout">
@@ -60,10 +46,8 @@
<i class="fas fa-plus"></i> <i class="fas fa-plus"></i>
<span class="menu-text">Create QR</span> <span class="menu-text">Create QR</span>
</a> </a>
<a <a href="{{ url_for('projects.projects') }}"
href="{{ url_for('projects.projects') }}" class="menu-item {% if request.endpoint in ['projects', 'create_project', 'edit_project'] %}active{% endif %}">
class="menu-item {% if request.endpoint in ['projects', 'create_project', 'edit_project'] %}active{% endif %}"
>
<i class="fas fa-folder"></i> <i class="fas fa-folder"></i>
<span class="menu-text">Projects</span> <span class="menu-text">Projects</span>
</a> </a>
@@ -93,17 +77,13 @@
<i class="fas fa-calculator"></i> <i class="fas fa-calculator"></i>
<span class="menu-text">Payroll</span> <span class="menu-text">Payroll</span>
</a> </a>
<a <a href="{{ url_for('statistics.qr_statistics') }}"
href="{{ url_for('statistics.qr_statistics') }}" class="menu-item {% if request.endpoint == 'qr_statistics' %}active{% endif %}">
class="menu-item {% if request.endpoint == 'qr_statistics' %}active{% endif %}"
>
<i class="fas fa-chart-pie"></i> <i class="fas fa-chart-pie"></i>
<span class="menu-text">Statistics</span> <span class="menu-text">Statistics</span>
</a> </a>
<a <a href="{{ url_for('admin.admin_logs') }}"
href="{{ url_for('admin.admin_logs') }}" class="menu-item {% if request.endpoint == 'admin_logs' %}active{% endif %}">
class="menu-item {% if request.endpoint == 'admin_logs' %}active{% endif %}"
>
<i class="fas fa-clipboard-list"></i> <i class="fas fa-clipboard-list"></i>
<span class="menu-text">System Logs</span> <span class="menu-text">System Logs</span>
</a> </a>
@@ -197,13 +177,9 @@
{% for category, message in messages %} {% for category, message in messages %}
<div class="alert alert-{{ category }}"> <div class="alert alert-{{ category }}">
<i <i
class="fas {% if category == 'success' %}fa-check-circle{% elif category == 'error' %}fa-exclamation-circle{% elif category == 'info' %}fa-info-circle{% else %}fa-exclamation-triangle{% endif %}" class="fas {% if category == 'success' %}fa-check-circle{% elif category == 'error' %}fa-exclamation-circle{% elif category == 'info' %}fa-info-circle{% else %}fa-exclamation-triangle{% endif %}"></i>
></i>
{{ message }} {{ message }}
<button <button class="alert-close" onclick="this.parentElement.style.display='none'">
class="alert-close"
onclick="this.parentElement.style.display='none'"
>
<i class="fas fa-times"></i> <i class="fas fa-times"></i>
</button> </button>
</div> </div>
@@ -219,7 +195,7 @@
<footer class="footer"> <footer class="footer">
<div class="container"> <div class="container">
<div class="footer-content"> <div class="footer-content">
<p>&copy; 2025 QR Code Management System. All rights reserved.</p> <p>&copy; {{ CURRENT_YEAR }} {{ COMPANY_NAME }}. All rights reserved.</p>
<div class="footer-links"> <div class="footer-links">
<a href="#" class="footer-link">Privacy Policy</a> <a href="#" class="footer-link">Privacy Policy</a>
<a href="#" class="footer-link">Terms of Service</a> <a href="#" class="footer-link">Terms of Service</a>
@@ -248,4 +224,5 @@
}; };
</script> </script>
</body> </body>
</html> </html>