RodzDXebec commited on
Commit
6fb6601
·
verified ·
1 Parent(s): 61513fc

Título do Projeto: Sistema de Gestão de Condomínio Residencial

Browse files

Objetivo: Desenvolver um aplicativo completo e responsivo (desktop, mobile e tablet) para a gestão de um condomínio com 2 torres de 23 andares, cada uma com 8 apartamentos por andar. O sistema deve facilitar a comunicação, o gerenciamento de encomendas e o controle de acesso para diferentes perfis de usuário.

Funcionalidades por Perfil de Usuário:

Morador:

Tela de login com opção de cadastro para novos moradores.

Visualização de encomendas e correspondências recebidas.

Recebimento de notificações instantâneas ao registrar uma nova encomenda.

Notificações de lembrete a cada 30 minutos após 12 horas da chegada da encomenda.

Admin/Colaborador (Porteiro, Recepcionista, etc.):

Acesso seguro através de tela de login.

Cadastro de novos moradores, vinculando-os a uma torre e apartamento específicos.

Cadastro de novos funcionários com seus respectivos cargos (Recepcionista, Porteiro, Ronda Diurno/Noturno, Zelador).

Sistema de registro de encomendas e correspondências com campos para morador, data, tipo de item (carta, caixa, etc.) e upload de uma imagem para fácil identificação.

Requisitos de Interface e Experiência do Usuário (UI/UX):

Design Responsivo: O layout deve se adaptar e ser totalmente funcional em telas de desktop, tablets e smartphones.

Acessibilidade: Interface intuitiva e com fluxos de trabalho claros para todas as tarefas, especialmente o cadastro de encomendas.

Imagens: O formulário de cadastro de encomendas deve permitir o envio de fotos do item para agilizar o processo.

Notificações: O sistema deve ter um mecanismo robusto de notificação para alertar os moradores sobre suas encomendas.

Tecnologias: O app deve ser construído com tecnologias modernas de desenvolvimento web para garantir desempenho, segurança e escalabilidade.
A documentação deve ser feita com swagger
O banco de dados deve ser capaz de suportar um grande volume de dados de moradores, encomendas e colaboradores em tempo real.

Forneça instruções para que eu consiga instalar e executar localmente o sistema para testes no meu notebook e outros dispositivos para testes.

Files changed (6) hide show
  1. README.md +8 -5
  2. components/footer.js +30 -0
  3. components/navbar.js +115 -0
  4. index.html +143 -19
  5. script.js +79 -0
  6. style.css +38 -18
README.md CHANGED
@@ -1,10 +1,13 @@
1
  ---
2
- title: Condocomm Manager
3
- emoji: 🐢
4
- colorFrom: indigo
5
- colorTo: pink
6
  sdk: static
7
  pinned: false
 
 
8
  ---
9
 
10
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
1
  ---
2
+ title: CondoComm Manager 🏢🔑
3
+ colorFrom: blue
4
+ colorTo: gray
5
+ emoji: 🐳
6
  sdk: static
7
  pinned: false
8
+ tags:
9
+ - deepsite-v3
10
  ---
11
 
12
+ # Welcome to your new DeepSite project!
13
+ This project was created with [DeepSite](https://huggingface.co/deepsite).
components/footer.js ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ class CustomFooter extends HTMLElement {
2
+ connectedCallback() {
3
+ this.attachShadow({ mode: 'open' });
4
+ this.shadowRoot.innerHTML = `
5
+ <style>
6
+ .footer-link:hover {
7
+ color: #4F46E5;
8
+ }
9
+ </style>
10
+ <footer class="bg-white border-t border-gray-200">
11
+ <div class="max-w-7xl mx-auto py-6 px-4 sm:px-6 lg:px-8">
12
+ <div class="flex flex-col md:flex-row justify-between items-center">
13
+ <div class="flex items-center">
14
+ <i data-feather="home" class="text-primary-500 w-5 h-5"></i>
15
+ <span class="ml-2 text-sm text-gray-500">&copy; 2023 CondoComm Manager. Todos os direitos reservados.</span>
16
+ </div>
17
+ <div class="mt-4 md:mt-0 flex space-x-6">
18
+ <a href="/about" class="footer-link text-sm text-gray-500 hover:text-gray-700">Sobre</a>
19
+ <a href="/privacy" class="footer-link text-sm text-gray-500 hover:text-gray-700">Privacidade</a>
20
+ <a href="/terms" class="footer-link text-sm text-gray-500 hover:text-gray-700">Termos</a>
21
+ <a href="/contact" class="footer-link text-sm text-gray-500 hover:text-gray-700">Contato</a>
22
+ </div>
23
+ </div>
24
+ </div>
25
+ </footer>
26
+ `;
27
+ }
28
+ }
29
+
30
+ customElements.define('custom-footer', CustomFooter);
components/navbar.js ADDED
@@ -0,0 +1,115 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ class CustomNavbar extends HTMLElement {
2
+ connectedCallback() {
3
+ this.attachShadow({ mode: 'open' });
4
+ this.shadowRoot.innerHTML = `
5
+ <style>
6
+ .nav-link:hover {
7
+ color: #4F46E5;
8
+ }
9
+ .nav-link.active {
10
+ color: #4F46E5;
11
+ border-bottom: 2px solid #4F46E5;
12
+ }
13
+ @media (max-width: 768px) {
14
+ .mobile-menu {
15
+ transition: all 0.3s ease-in-out;
16
+ }
17
+ }
18
+ </style>
19
+ <nav class="bg-white shadow-sm">
20
+ <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
21
+ <div class="flex justify-between h-16">
22
+ <div class="flex">
23
+ <div class="flex-shrink-0 flex items-center">
24
+ <a href="/">
25
+ <div class="flex items-center">
26
+ <i data-feather="home" class="text-primary-500 w-6 h-6"></i>
27
+ <span class="ml-2 text-xl font-bold text-gray-900">CondoComm</span>
28
+ </div>
29
+ </a>
30
+ </div>
31
+ <div class="hidden sm:ml-6 sm:flex sm:space-x-8">
32
+ <a href="/" class="nav-link active border-primary-500 text-gray-900 inline-flex items-center px-1 pt-1 border-b-2 text-sm font-medium">
33
+ Dashboard
34
+ </a>
35
+ <a href="/packages" class="nav-link border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700 inline-flex items-center px-1 pt-1 border-b-2 text-sm font-medium">
36
+ Encomendas
37
+ </a>
38
+ <a href="/residents" class="nav-link border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700 inline-flex items-center px-1 pt-1 border-b-2 text-sm font-medium">
39
+ Moradores
40
+ </a>
41
+ <a href="/staff" class="nav-link border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700 inline-flex items-center px-1 pt-1 border-b-2 text-sm font-medium">
42
+ Colaboradores
43
+ </a>
44
+ </div>
45
+ </div>
46
+ <div class="hidden sm:ml-6 sm:flex sm:items-center">
47
+ <button type="button" class="bg-white p-1 rounded-full text-gray-400 hover:text-gray-500 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary-500">
48
+ <span class="sr-only">Notificações</span>
49
+ <div class="relative">
50
+ <i data-feather="bell" class="h-6 w-6"></i>
51
+ <span class="absolute top-0 right-0 block h-2 w-2 rounded-full bg-red-400 ring-2 ring-white"></span>
52
+ </div>
53
+ </button>
54
+
55
+ <div class="ml-3 relative">
56
+ <div>
57
+ <button type="button" class="bg-white rounded-full flex text-sm focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary-500" id="user-menu-button" aria-expanded="false" aria-haspopup="true">
58
+ <span class="sr-only">Abrir menu</span>
59
+ <img class="h-8 w-8 rounded-full" src="http://static.photos/people/200x200/1" alt="User profile">
60
+ </button>
61
+ </div>
62
+ <div class="origin-top-right absolute right-0 mt-2 w-48 rounded-md shadow-lg py-1 bg-white ring-1 ring-black ring-opacity-5 focus:outline-none hidden" role="menu" aria-orientation="vertical" aria-labelledby="user-menu-button" tabindex="-1">
63
+ <a href="/profile" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100" role="menuitem" tabindex="-1" id="user-menu-item-0">Seu perfil</a>
64
+ <a href="/settings" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100" role="menuitem" tabindex="-1" id="user-menu-item-1">Configurações</a>
65
+ <a href="/logout" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100" role="menuitem" tabindex="-1" id="user-menu-item-2">Sair</a>
66
+ </div>
67
+ </div>
68
+ </div>
69
+ <div class="-mr-2 flex items-center sm:hidden">
70
+ <button type="button" id="mobile-menu-button" class="inline-flex items-center justify-center p-2 rounded-md text-gray-400 hover:text-gray-500 hover:bg-gray-100 focus:outline-none focus:ring-2 focus:ring-inset focus:ring-primary-500" aria-controls="mobile-menu" aria-expanded="false">
71
+ <span class="sr-only">Abrir menu</span>
72
+ <i data-feather="menu" class="block h-6 w-6"></i>
73
+ <i data-feather="x" class="hidden h-6 w-6"></i>
74
+ </button>
75
+ </div>
76
+ </div>
77
+ </div>
78
+
79
+ <div class="hidden sm:hidden mobile-menu" id="mobile-menu">
80
+ <div class="pt-2 pb-3 space-y-1">
81
+ <a href="/" class="bg-primary-50 border-primary-500 text-primary-700 block pl-3 pr-4 py-2 border-l-4 text-base font-medium">Dashboard</a>
82
+ <a href="/packages" class="border-transparent text-gray-500 hover:bg-gray-50 hover:border-gray-300 hover:text-gray-700 block pl-3 pr-4 py-2 border-l-4 text-base font-medium">Encomendas</a>
83
+ <a href="/residents" class="border-transparent text-gray-500 hover:bg-gray-50 hover:border-gray-300 hover:text-gray-700 block pl-3 pr-4 py-2 border-l-4 text-base font-medium">Moradores</a>
84
+ <a href="/staff" class="border-transparent text-gray-500 hover:bg-gray-50 hover:border-gray-300 hover:text-gray-700 block pl-3 pr-4 py-2 border-l-4 text-base font-medium">Colaboradores</a>
85
+ </div>
86
+ <div class="pt-4 pb-3 border-t border-gray-200">
87
+ <div class="flex items-center px-4">
88
+ <div class="flex-shrink-0">
89
+ <img class="h-10 w-10 rounded-full" src="http://static.photos/people/200x200/1" alt="User profile">
90
+ </div>
91
+ <div class="ml-3">
92
+ <div class="text-base font-medium text-gray-800">Administrador</div>
93
+ <div class="text-sm font-medium text-gray-500">admin@condocomm.com</div>
94
+ </div>
95
+ <button type="button" class="ml-auto bg-white flex-shrink-0 p-1 rounded-full text-gray-400 hover:text-gray-500 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary-500">
96
+ <span class="sr-only">Notificações</span>
97
+ <div class="relative">
98
+ <i data-feather="bell" class="h-6 w-6"></i>
99
+ <span class="absolute top-0 right-0 block h-2 w-2 rounded-full bg-red-400 ring-2 ring-white"></span>
100
+ </div>
101
+ </button>
102
+ </div>
103
+ <div class="mt-3 space-y-1">
104
+ <a href="/profile" class="block px-4 py-2 text-base font-medium text-gray-500 hover:text-gray-800 hover:bg-gray-100">Seu perfil</a>
105
+ <a href="/settings" class="block px-4 py-2 text-base font-medium text-gray-500 hover:text-gray-800 hover:bg-gray-100">Configurações</a>
106
+ <a href="/logout" class="block px-4 py-2 text-base font-medium text-gray-500 hover:text-gray-800 hover:bg-gray-100">Sair</a>
107
+ </div>
108
+ </div>
109
+ </div>
110
+ </nav>
111
+ `;
112
+ }
113
+ }
114
+
115
+ customElements.define('custom-navbar', CustomNavbar);
index.html CHANGED
@@ -1,19 +1,143 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
19
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="pt-BR">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>CondoComm Manager | Dashboard</title>
7
+ <link rel="stylesheet" href="style.css">
8
+ <script src="https://cdn.tailwindcss.com"></script>
9
+ <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
10
+ <script src="https://unpkg.com/feather-icons"></script>
11
+ <script>
12
+ tailwind.config = {
13
+ theme: {
14
+ extend: {
15
+ colors: {
16
+ primary: '#4F46E5',
17
+ secondary: '#10B981',
18
+ }
19
+ }
20
+ }
21
+ }
22
+ </script>
23
+ </head>
24
+ <body class="bg-gray-50">
25
+ <custom-navbar></custom-navbar>
26
+
27
+ <main class="container mx-auto px-4 py-6">
28
+ <div class="grid grid-cols-1 md:grid-cols-3 gap-6">
29
+ <!-- Resident Summary Card -->
30
+ <div class="bg-white rounded-lg shadow p-6">
31
+ <div class="flex items-center justify-between">
32
+ <h3 class="text-lg font-medium text-gray-900">Moradores</h3>
33
+ <span class="bg-primary-100 text-primary-800 text-xs font-medium px-2.5 py-0.5 rounded">Total</span>
34
+ </div>
35
+ <div class="mt-4 flex items-center justify-between">
36
+ <div>
37
+ <p class="text-3xl font-bold text-gray-900">368</p>
38
+ <p class="text-sm text-gray-500">2 torres</p>
39
+ </div>
40
+ <i data-feather="users" class="text-primary-500 w-8 h-8"></i>
41
+ </div>
42
+ </div>
43
+
44
+ <!-- Packages Card -->
45
+ <div class="bg-white rounded-lg shadow p-6">
46
+ <div class="flex items-center justify-between">
47
+ <h3 class="text-lg font-medium text-gray-900">Encomendas</h3>
48
+ <span class="bg-secondary-100 text-secondary-800 text-xs font-medium px-2.5 py-0.5 rounded">Hoje</span>
49
+ </div>
50
+ <div class="mt-4 flex items-center justify-between">
51
+ <div>
52
+ <p class="text-3xl font-bold text-gray-900">12</p>
53
+ <p class="text-sm text-gray-500">2 pendentes</p>
54
+ </div>
55
+ <i data-feather="package" class="text-secondary-500 w-8 h-8"></i>
56
+ </div>
57
+ </div>
58
+
59
+ <!-- Staff Card -->
60
+ <div class="bg-white rounded-lg shadow p-6">
61
+ <div class="flex items-center justify-between">
62
+ <h3 class="text-lg font-medium text-gray-900">Colaboradores</h3>
63
+ <span class="bg-yellow-100 text-yellow-800 text-xs font-medium px-2.5 py-0.5 rounded">Ativos</span>
64
+ </div>
65
+ <div class="mt-4 flex items-center justify-between">
66
+ <div>
67
+ <p class="text-3xl font-bold text-gray-900">8</p>
68
+ <p class="text-sm text-gray-500">4 turnos</p>
69
+ </div>
70
+ <i data-feather="briefcase" class="text-yellow-500 w-8 h-8"></i>
71
+ </div>
72
+ </div>
73
+ </div>
74
+
75
+ <div class="mt-8 grid grid-cols-1 lg:grid-cols-2 gap-6">
76
+ <!-- Recent Packages -->
77
+ <div class="bg-white rounded-lg shadow overflow-hidden">
78
+ <div class="px-6 py-4 border-b border-gray-200">
79
+ <h3 class="text-lg font-medium text-gray-900">Encomendas Recentes</h3>
80
+ </div>
81
+ <div class="divide-y divide-gray-200">
82
+ <div class="px-6 py-4 flex items-center justify-between hover:bg-gray-50">
83
+ <div class="flex items-center space-x-4">
84
+ <img src="http://static.photos/package/200x200/1" alt="Package" class="w-12 h-12 rounded-md object-cover">
85
+ <div>
86
+ <p class="text-sm font-medium text-gray-900">Caixa pequena</p>
87
+ <p class="text-sm text-gray-500">Torre A - 1204</p>
88
+ </div>
89
+ </div>
90
+ <span class="text-xs bg-green-100 text-green-800 px-2 py-1 rounded-full">Entregue</span>
91
+ </div>
92
+ <div class="px-6 py-4 flex items-center justify-between hover:bg-gray-50">
93
+ <div class="flex items-center space-x-4">
94
+ <img src="http://static.photos/package/200x200/2" alt="Package" class="w-12 h-12 rounded-md object-cover">
95
+ <div>
96
+ <p class="text-sm font-medium text-gray-900">Envelope</p>
97
+ <p class="text-sm text-gray-500">Torre B - 504</p>
98
+ </div>
99
+ </div>
100
+ <span class="text-xs bg-yellow-100 text-yellow-800 px-2 py-1 rounded-full">Pendente</span>
101
+ </div>
102
+ </div>
103
+ <div class="px-6 py-3 bg-gray-50 text-right">
104
+ <a href="/packages" class="text-sm font-medium text-primary-600 hover:text-primary-500">Ver todos</a>
105
+ </div>
106
+ </div>
107
+
108
+ <!-- Quick Actions -->
109
+ <div class="bg-white rounded-lg shadow p-6">
110
+ <h3 class="text-lg font-medium text-gray-900 mb-4">Ações Rápidas</h3>
111
+ <div class="grid grid-cols-2 gap-4">
112
+ <a href="/register-package" class="p-4 bg-secondary-50 rounded-lg flex flex-col items-center justify-center hover:bg-secondary-100 transition-colors">
113
+ <i data-feather="package" class="text-secondary-500 w-6 h-6 mb-2"></i>
114
+ <span class="text-sm font-medium text-gray-900">Nova Encomenda</span>
115
+ </a>
116
+ <a href="/register-resident" class="p-4 bg-primary-50 rounded-lg flex flex-col items-center justify-center hover:bg-primary-100 transition-colors">
117
+ <i data-feather="user-plus" class="text-primary-500 w-6 h-6 mb-2"></i>
118
+ <span class="text-sm font-medium text-gray-900">Novo Morador</span>
119
+ </a>
120
+ <a href="/staff" class="p-4 bg-yellow-50 rounded-lg flex flex-col items-center justify-center hover:bg-yellow-100 transition-colors">
121
+ <i data-feather="users" class="text-yellow-500 w-6 h-6 mb-2"></i>
122
+ <span class="text-sm font-medium text-gray-900">Colaboradores</span>
123
+ </a>
124
+ <a href="/notifications" class="p-4 bg-purple-50 rounded-lg flex flex-col items-center justify-center hover:bg-purple-100 transition-colors">
125
+ <i data-feather="bell" class="text-purple-500 w-6 h-6 mb-2"></i>
126
+ <span class="text-sm font-medium text-gray-900">Notificações</span>
127
+ </a>
128
+ </div>
129
+ </div>
130
+ </div>
131
+ </main>
132
+
133
+ <custom-footer></custom-footer>
134
+
135
+ <script src="components/navbar.js"></script>
136
+ <script src="components/footer.js"></script>
137
+ <script src="script.js"></script>
138
+ <script>
139
+ feather.replace();
140
+ </script>
141
+ <script src="https://huggingface.co/deepsite/deepsite-badge.js"></script>
142
+ </body>
143
+ </html>
script.js ADDED
@@ -0,0 +1,79 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // Global functions and event listeners
2
+ document.addEventListener('DOMContentLoaded', function() {
3
+ // Initialize tooltips
4
+ const tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]'));
5
+ tooltipTriggerList.map(function (tooltipTriggerEl) {
6
+ return new bootstrap.Tooltip(tooltipTriggerEl);
7
+ });
8
+
9
+ // Handle mobile menu toggle
10
+ const mobileMenuButton = document.getElementById('mobile-menu-button');
11
+ const mobileMenu = document.getElementById('mobile-menu');
12
+
13
+ if (mobileMenuButton && mobileMenu) {
14
+ mobileMenuButton.addEventListener('click', function() {
15
+ mobileMenu.classList.toggle('hidden');
16
+ });
17
+ }
18
+
19
+ // Handle dark mode toggle
20
+ const darkModeToggle = document.getElementById('dark-mode-toggle');
21
+ if (darkModeToggle) {
22
+ darkModeToggle.addEventListener('click', function() {
23
+ document.documentElement.classList.toggle('dark');
24
+ localStorage.setItem('darkMode', document.documentElement.classList.contains('dark'));
25
+ });
26
+
27
+ // Check for saved user preference
28
+ if (localStorage.getItem('darkMode') === 'true') {
29
+ document.documentElement.classList.add('dark');
30
+ }
31
+ }
32
+ });
33
+
34
+ // API functions
35
+ async function fetchRecentPackages() {
36
+ try {
37
+ const response = await fetch('/api/packages/recent');
38
+ if (!response.ok) throw new Error('Network response was not ok');
39
+ return await response.json();
40
+ } catch (error) {
41
+ console.error('Error fetching packages:', error);
42
+ return [];
43
+ }
44
+ }
45
+
46
+ async function registerNewPackage(packageData) {
47
+ try {
48
+ const response = await fetch('/api/packages', {
49
+ method: 'POST',
50
+ headers: {
51
+ 'Content-Type': 'application/json',
52
+ },
53
+ body: JSON.stringify(packageData),
54
+ });
55
+ return await response.json();
56
+ } catch (error) {
57
+ console.error('Error registering package:', error);
58
+ return { success: false, error: error.message };
59
+ }
60
+ }
61
+
62
+ // Notification functions
63
+ function showNotification(message, type = 'info') {
64
+ const notification = document.createElement('div');
65
+ notification.className = `fixed bottom-4 right-4 px-4 py-2 rounded-md shadow-lg text-white bg-${type}-500 z-50`;
66
+ notification.textContent = message;
67
+ document.body.appendChild(notification);
68
+
69
+ setTimeout(() => {
70
+ notification.classList.add('opacity-0', 'transition-opacity', 'duration-300');
71
+ setTimeout(() => notification.remove(), 300);
72
+ }, 3000);
73
+ }
74
+
75
+ // Utility functions
76
+ function formatDate(dateString) {
77
+ const options = { year: 'numeric', month: 'short', day: 'numeric' };
78
+ return new Date(dateString).toLocaleDateString('pt-BR', options);
79
+ }
style.css CHANGED
@@ -1,28 +1,48 @@
 
 
 
 
 
 
1
  body {
2
- padding: 2rem;
3
- font-family: -apple-system, BlinkMacSystemFont, "Arial", sans-serif;
 
 
 
 
 
 
 
 
 
 
 
4
  }
5
 
6
- h1 {
7
- font-size: 16px;
8
- margin-top: 0;
9
  }
10
 
11
- p {
12
- color: rgb(107, 114, 128);
13
- font-size: 15px;
14
- margin-bottom: 10px;
15
- margin-top: 5px;
16
  }
17
 
18
- .card {
19
- max-width: 620px;
20
- margin: 0 auto;
21
- padding: 16px;
22
- border: 1px solid lightgray;
23
- border-radius: 16px;
24
  }
25
 
26
- .card p:last-child {
27
- margin-bottom: 0;
 
 
 
 
 
 
28
  }
 
 
 
 
 
1
+ @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
2
+
3
+ * {
4
+ font-family: 'Inter', sans-serif;
5
+ }
6
+
7
  body {
8
+ min-height: 100vh;
9
+ display: flex;
10
+ flex-direction: column;
11
+ }
12
+
13
+ main {
14
+ flex: 1;
15
+ }
16
+
17
+ /* Custom scrollbar */
18
+ ::-webkit-scrollbar {
19
+ width: 8px;
20
+ height: 8px;
21
  }
22
 
23
+ ::-webkit-scrollbar-track {
24
+ background: #f1f1f1;
 
25
  }
26
 
27
+ ::-webkit-scrollbar-thumb {
28
+ background: #888;
29
+ border-radius: 4px;
 
 
30
  }
31
 
32
+ ::-webkit-scrollbar-thumb:hover {
33
+ background: #555;
 
 
 
 
34
  }
35
 
36
+ /* Animation for notifications */
37
+ @keyframes pulse {
38
+ 0%, 100% {
39
+ opacity: 1;
40
+ }
41
+ 50% {
42
+ opacity: 0.5;
43
+ }
44
  }
45
+
46
+ .pulse {
47
+ animation: pulse 2s infinite;
48
+ }