560 lines
16 KiB
HTML
560 lines
16 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="pt-BR">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>{% block title %}{% endblock %} - Controles OCI</title>
|
|
|
|
<!-- Bootstrap 5 CSS -->
|
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css?v=1" rel="stylesheet">
|
|
<!-- Font Awesome 6 -->
|
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css?v=1">
|
|
<!-- Componentes CSS -->
|
|
<link rel="stylesheet" href="{{ url_for('static', filename='css/components.css') }}">
|
|
|
|
<style>
|
|
:root {
|
|
--primary-color: #dc3545;
|
|
--primary-light: #e35d6a;
|
|
--secondary-color: #6c757d;
|
|
--secondary-light: #868e96;
|
|
--success-color: #198754;
|
|
--danger-color: #dc3545;
|
|
--warning-color: #ffc107;
|
|
--info-color: #0dcaf0;
|
|
--background-gradient: linear-gradient(135deg, var(--primary-color) 40%, white 100%);
|
|
--navbar-stripe: 4px solid var(--primary-color);
|
|
--table-header-bg: #d8dde2;
|
|
}
|
|
|
|
body {
|
|
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
|
background-color: #f8f9fa;
|
|
margin: 0;
|
|
padding: 0;
|
|
min-height: 100vh;
|
|
}
|
|
|
|
.navbar {
|
|
background: #343a40 !important;
|
|
padding: 0.5rem;
|
|
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
|
|
border-bottom: var(--navbar-stripe);
|
|
}
|
|
|
|
.navbar > .container-fluid {
|
|
width: 100%;
|
|
max-width: 1140px;
|
|
margin: 0 auto;
|
|
padding: 0.5rem 1rem;
|
|
}
|
|
|
|
@media (max-width: 1200px) {
|
|
.navbar > .container-fluid {
|
|
max-width: 960px;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 992px) {
|
|
.navbar > .container-fluid {
|
|
max-width: 720px;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 768px) {
|
|
.navbar > .container-fluid {
|
|
max-width: 540px;
|
|
padding: 0.5rem;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 576px) {
|
|
.navbar > .container-fluid {
|
|
width: 100%;
|
|
padding: 0.5rem;
|
|
}
|
|
}
|
|
|
|
.navbar-brand {
|
|
font-weight: bold;
|
|
color: var(--primary-color) !important;
|
|
display: flex;
|
|
align-items: center;
|
|
margin-right: 3rem;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.navbar-brand img {
|
|
height: 40px;
|
|
margin-right: 10px;
|
|
}
|
|
|
|
#navbarNav {
|
|
display: flex;
|
|
justify-content: center;
|
|
flex-grow: 1;
|
|
}
|
|
|
|
.navbar-nav.mx-auto {
|
|
margin: 0 auto !important;
|
|
}
|
|
|
|
.navbar-nav:last-child {
|
|
margin-left: auto;
|
|
}
|
|
|
|
.nav-link {
|
|
color: #fff !important;
|
|
transition: color 0.3s ease;
|
|
padding: 0.5rem 1rem;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.nav-link:hover {
|
|
color: rgba(255, 255, 255, 0.8) !important;
|
|
}
|
|
|
|
.nav-link.active {
|
|
color: rgba(255, 255, 255, 0.9) !important;
|
|
font-weight: 500;
|
|
}
|
|
|
|
.dropdown-menu {
|
|
border: none;
|
|
box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.15);
|
|
}
|
|
|
|
.dropdown-item {
|
|
padding: 0.5rem 1.5rem;
|
|
transition: background-color 0.2s ease;
|
|
}
|
|
|
|
.dropdown-item:hover {
|
|
background-color: #f8f9fa;
|
|
}
|
|
|
|
.dropdown-item i {
|
|
margin-right: 0.5rem;
|
|
width: 1.25rem;
|
|
text-align: center;
|
|
}
|
|
|
|
.container {
|
|
max-width: 1320px !important;
|
|
margin: 0 auto !important;
|
|
}
|
|
|
|
@media (max-width: 1400px) {
|
|
.container {
|
|
max-width: 1140px !important;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 1200px) {
|
|
.container {
|
|
max-width: 960px !important;
|
|
}
|
|
.page-wrapper {
|
|
padding: 1.5rem 0.75rem;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 992px) {
|
|
.container {
|
|
max-width: 720px !important;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 768px) {
|
|
.container {
|
|
max-width: 540px !important;
|
|
}
|
|
.page-wrapper {
|
|
padding: 1rem 0.5rem;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 576px) {
|
|
.page-wrapper {
|
|
padding: 0.75rem 0.25rem;
|
|
}
|
|
}
|
|
|
|
/* Cards da Dashboard */
|
|
.card {
|
|
border: none;
|
|
border-radius: 0.5rem;
|
|
box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
|
|
height: 100%;
|
|
}
|
|
|
|
.card-header {
|
|
background-color: #f8f9fa;
|
|
border-bottom: 1px solid #e9ecef;
|
|
padding: 1rem;
|
|
}
|
|
|
|
.card-header .card-title {
|
|
margin: 0;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.5rem;
|
|
}
|
|
|
|
.card-header h5 {
|
|
margin: 0;
|
|
display: flex;
|
|
align-items: center;
|
|
font-size: 1.1rem;
|
|
}
|
|
|
|
.card-header h5 i {
|
|
margin-right: 0.75rem;
|
|
color: var(--primary-color);
|
|
}
|
|
|
|
.card-body {
|
|
padding: 1.5rem;
|
|
}
|
|
|
|
.card-footer {
|
|
background: none;
|
|
border-top: 1px solid rgba(0,0,0,0.05);
|
|
padding: 1rem 1.5rem;
|
|
}
|
|
|
|
/* Estatísticas da Dashboard */
|
|
.stats-card {
|
|
position: relative;
|
|
padding: 1.5rem;
|
|
border-radius: 0.5rem;
|
|
color: white;
|
|
box-shadow: 0 0.25rem 0.5rem rgba(0,0,0,0.1);
|
|
transition: transform 0.2s ease, box-shadow 0.2s ease;
|
|
overflow: hidden;
|
|
min-height: 140px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: space-between;
|
|
}
|
|
|
|
.stats-card:hover {
|
|
transform: translateY(-3px);
|
|
box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.15);
|
|
}
|
|
|
|
.stats-card.blue {
|
|
background: linear-gradient(45deg, var(--primary-color), var(--primary-light));
|
|
}
|
|
|
|
.stats-card.green {
|
|
background: linear-gradient(45deg, #1cc88a, #13855c);
|
|
}
|
|
|
|
.stats-card.cyan {
|
|
background: linear-gradient(45deg, #36b9cc, #258391);
|
|
}
|
|
|
|
.stats-card.yellow {
|
|
background: linear-gradient(45deg, #f6c23e, #dda20a);
|
|
}
|
|
|
|
.stats-card .title {
|
|
font-size: 0.9rem;
|
|
font-weight: bold;
|
|
text-transform: uppercase;
|
|
margin-bottom: 0.5rem;
|
|
}
|
|
|
|
.stats-card .value {
|
|
font-size: 2rem;
|
|
font-weight: bold;
|
|
margin-bottom: 0.5rem;
|
|
}
|
|
|
|
.stats-card .icon {
|
|
position: absolute;
|
|
right: 1rem;
|
|
top: 1rem;
|
|
font-size: 2rem;
|
|
opacity: 0.2;
|
|
}
|
|
|
|
/* Tabelas */
|
|
.table {
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
.table th {
|
|
border-top: none;
|
|
background-color: #f8f9fa;
|
|
font-weight: 600;
|
|
text-transform: uppercase;
|
|
font-size: 0.8rem;
|
|
letter-spacing: 0.5px;
|
|
}
|
|
|
|
.table td {
|
|
vertical-align: middle;
|
|
}
|
|
|
|
/* Botões */
|
|
.btn {
|
|
font-weight: 500;
|
|
padding: 0.5rem 1rem;
|
|
border-radius: 0.25rem;
|
|
transition: all 0.2s ease;
|
|
}
|
|
|
|
.btn-primary {
|
|
background-color: var(--primary-color);
|
|
border-color: var(--primary-color);
|
|
}
|
|
|
|
.btn-primary:hover {
|
|
background-color: var(--primary-light);
|
|
border-color: var(--primary-light);
|
|
}
|
|
|
|
.btn-outline-primary {
|
|
color: var(--primary-color);
|
|
border-color: var(--primary-color);
|
|
}
|
|
|
|
.btn-outline-primary:hover {
|
|
background-color: var(--primary-color);
|
|
border-color: var(--primary-color);
|
|
}
|
|
|
|
/* Alertas */
|
|
.alert {
|
|
border: none;
|
|
border-radius: 0.5rem;
|
|
padding: 1rem;
|
|
margin-bottom: 1rem;
|
|
}
|
|
|
|
.alert-success {
|
|
background-color: #d4edda;
|
|
color: #155724;
|
|
}
|
|
|
|
.alert-danger {
|
|
background-color: #f8d7da;
|
|
color: #721c24;
|
|
}
|
|
|
|
.alert-warning {
|
|
background-color: #fff3cd;
|
|
color: #856404;
|
|
}
|
|
|
|
.alert-info {
|
|
background-color: #d1ecf1;
|
|
color: #0c5460;
|
|
}
|
|
|
|
/* Formulários */
|
|
.form-control {
|
|
border-radius: 0.25rem;
|
|
border: 1px solid #ced4da;
|
|
padding: 0.5rem 0.75rem;
|
|
}
|
|
|
|
.form-control:focus {
|
|
border-color: var(--primary-color);
|
|
box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
|
|
}
|
|
|
|
.form-label {
|
|
font-weight: 500;
|
|
margin-bottom: 0.5rem;
|
|
}
|
|
|
|
/* Modais */
|
|
.modal-content {
|
|
border: none;
|
|
border-radius: 0.5rem;
|
|
box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.15);
|
|
}
|
|
|
|
.modal-header {
|
|
border-bottom: 1px solid #e9ecef;
|
|
padding: 1rem 1.5rem;
|
|
}
|
|
|
|
.modal-body {
|
|
padding: 1.5rem;
|
|
}
|
|
|
|
.modal-footer {
|
|
border-top: 1px solid #e9ecef;
|
|
padding: 1rem 1.5rem;
|
|
}
|
|
|
|
/* Responsividade */
|
|
@media (max-width: 768px) {
|
|
.navbar-brand {
|
|
margin-right: 1rem;
|
|
}
|
|
|
|
.navbar-brand img {
|
|
height: 30px;
|
|
}
|
|
|
|
.nav-link {
|
|
padding: 0.5rem;
|
|
}
|
|
|
|
.stats-card {
|
|
min-height: 120px;
|
|
}
|
|
|
|
.stats-card .value {
|
|
font-size: 1.5rem;
|
|
}
|
|
|
|
.stats-card .icon {
|
|
font-size: 1.5rem;
|
|
}
|
|
}
|
|
|
|
.page-wrapper {
|
|
padding: 2rem 1rem;
|
|
min-height: calc(100vh - 70px);
|
|
}
|
|
|
|
.table thead {
|
|
background-color: var(--table-header-bg) !important;
|
|
}
|
|
|
|
.btn-outline-primary {
|
|
color: #0d6efd;
|
|
border-color: #0d6efd;
|
|
}
|
|
|
|
.btn-outline-primary:hover {
|
|
color: #fff;
|
|
background-color: #0d6efd;
|
|
border-color: #0d6efd;
|
|
}
|
|
</style>
|
|
{% block extra_css %}{% endblock %}
|
|
</head>
|
|
<body>
|
|
<!-- Navbar -->
|
|
<nav class="navbar navbar-expand-lg navbar-dark">
|
|
<div class="container-fluid">
|
|
<a class="navbar-brand" href="{{ url_for('home') }}">
|
|
<img src="{{ url_for('static', filename='img/logo.png') }}" alt="Logo">
|
|
Controles OCI
|
|
</a>
|
|
<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 mx-auto">
|
|
<li class="nav-item">
|
|
<a class="nav-link {% if request.endpoint == 'home' %}active{% endif %}" href="{{ url_for('home') }}">
|
|
<i class="fas fa-home"></i> Início
|
|
</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a class="nav-link {% if request.endpoint == 'listar_militantes' %}active{% endif %}" href="{{ url_for('listar_militantes') }}">
|
|
<i class="fas fa-users"></i> Militantes
|
|
</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a class="nav-link {% if request.endpoint == 'listar_materiais' %}active{% endif %}" href="{{ url_for('listar_materiais') }}">
|
|
<i class="fas fa-box"></i> Materiais
|
|
</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a class="nav-link {% if request.endpoint == 'listar_pagamentos' %}active{% endif %}" href="{{ url_for('listar_pagamentos') }}">
|
|
<i class="fas fa-money-bill"></i> Pagamentos
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
<ul class="navbar-nav">
|
|
<li class="nav-item dropdown">
|
|
<a class="nav-link dropdown-toggle" href="#" id="userDropdown" role="button" data-bs-toggle="dropdown">
|
|
<i class="fas fa-user"></i> {{ current_user.username }}
|
|
</a>
|
|
<ul class="dropdown-menu dropdown-menu-end">
|
|
<li>
|
|
<a class="dropdown-item" href="{{ url_for('logout') }}">
|
|
<i class="fas fa-sign-out-alt"></i> Sair
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</nav>
|
|
|
|
<<<<<<< HEAD
|
|
<!-- Conteúdo -->
|
|
<div class="container mt-4">
|
|
{% with messages = get_flashed_messages(with_categories=true) %}
|
|
{% if messages %}
|
|
{% for category, message in messages %}
|
|
<div class="alert alert-{{ category }} alert-dismissible fade show">
|
|
{{ message }}
|
|
<button type="button" class="btn-close" data-bs-dismiss="alert"></button>
|
|
</div>
|
|
{% endfor %}
|
|
{% endif %}
|
|
{% endwith %}
|
|
=======
|
|
<div class="page-wrapper">
|
|
<div class="container py-4">
|
|
{% 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"></button>
|
|
</div>
|
|
{% endfor %}
|
|
{% endif %}
|
|
{% endwith %}
|
|
{% block content %}{% endblock %}
|
|
</div>
|
|
</div>
|
|
>>>>>>> 2499ae1 (style: melhora layout e espaçamento das interfaces - Ajusta margens e padding do container principal - Adiciona page-wrapper com espaçamento consistente - Corrige cores do menu para melhor legibilidade - Implementa responsividade para diferentes tamanhos de tela - Mantém estrutura consistente em todas as páginas)
|
|
|
|
{% block content %}{% endblock %}
|
|
</div>
|
|
|
|
<!-- Scripts -->
|
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"></script>
|
|
<script>
|
|
// Auto-dismiss alerts after 5 seconds
|
|
document.addEventListener('DOMContentLoaded', function() {
|
|
setTimeout(function() {
|
|
var alerts = document.querySelectorAll('.alert');
|
|
alerts.forEach(function(alert) {
|
|
var bsAlert = new bootstrap.Alert(alert);
|
|
bsAlert.close();
|
|
});
|
|
}, 5000);
|
|
});
|
|
|
|
// Check session timeout
|
|
function checkSession() {
|
|
fetch('/check_session')
|
|
.then(response => response.json())
|
|
.then(data => {
|
|
if (data.status !== 'active') {
|
|
window.location.href = '/login';
|
|
}
|
|
});
|
|
}
|
|
|
|
// Check session every minute
|
|
setInterval(checkSession, 60000);
|
|
</script>
|
|
{% block scripts %}{% endblock %}
|
|
</body>
|
|
</html> |