feat: add core application constants, ownership verification, and repository utilities

- Introduced application-wide constants for file uploads, image processing, pagination, and authentication in `constants.py`.
- Implemented synchronous and asynchronous board ownership verification functions in `ownership.py`.
- Created a base repository class with common CRUD operations in `repository.py`.
- Added standard response utilities for error and success messages in `responses.py`.
- Refactored image validation to utilize constants for file size and MIME types.
- Enhanced frontend components with consistent styling and validation utilities for forms.
- Established global styles for buttons, forms, loading indicators, and messages to ensure a cohesive UI experience.
This commit is contained in:
Danilo Reyes
2025-11-02 13:44:10 -06:00
parent ca81729c50
commit f85ae4d417
17 changed files with 1163 additions and 237 deletions

View File

@@ -0,0 +1,75 @@
/**
* Shared form styles
* Used across all forms to maintain consistency and reduce duplication
*/
/* Form containers */
.form-group {
display: flex;
flex-direction: column;
gap: 0.5rem;
margin-bottom: 1.5rem;
}
/* Labels */
.form-label {
display: block;
font-weight: 500;
color: #374151;
margin-bottom: 0.5rem;
font-size: 0.95rem;
}
.form-label .required {
color: #ef4444;
}
/* Inputs and textareas */
.form-input,
.form-textarea {
width: 100%;
padding: 0.75rem;
border: 1px solid #d1d5db;
border-radius: 8px;
font-size: 1rem;
font-family: inherit;
transition: all 0.2s;
}
.form-input:focus,
.form-textarea:focus {
outline: none;
border-color: #667eea;
box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}
.form-input.error,
.form-textarea.error {
border-color: #ef4444;
}
.form-input:disabled,
.form-textarea:disabled {
background-color: #f9fafb;
cursor: not-allowed;
}
.form-textarea {
resize: vertical;
min-height: 100px;
}
/* Help and error text */
.form-help-text {
display: block;
color: #6b7280;
font-size: 0.875rem;
margin-top: 0.25rem;
}
.form-error-text {
display: block;
color: #ef4444;
font-size: 0.875rem;
margin-top: 0.25rem;
}