- Add type annotations for mypy compliance - Add nosec comment for intentional bind-all-interfaces configuration - Add explanatory comment for exception handling - Minor formatting improvements
548 lines
10 KiB
CSS
548 lines
10 KiB
CSS
/* UnitForge CSS Styles */
|
|
|
|
:root {
|
|
--primary-color: #0d6efd;
|
|
--secondary-color: #6c757d;
|
|
--success-color: #198754;
|
|
--danger-color: #dc3545;
|
|
--warning-color: #ffc107;
|
|
--info-color: #0dcaf0;
|
|
--light-color: #f8f9fa;
|
|
--dark-color: #212529;
|
|
--border-radius: 0.375rem;
|
|
--box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
|
|
--box-shadow-lg: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
|
|
}
|
|
|
|
/* General Styles */
|
|
body {
|
|
font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
|
|
line-height: 1.6;
|
|
color: var(--dark-color);
|
|
}
|
|
|
|
.hero-section {
|
|
background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
|
|
border-bottom: 1px solid #dee2e6;
|
|
}
|
|
|
|
/* Feature Icons */
|
|
.feature-icon {
|
|
width: 4rem;
|
|
height: 4rem;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: 1.5rem;
|
|
}
|
|
|
|
/* Card Hover Effects */
|
|
.hover-lift {
|
|
transition: all 0.3s ease;
|
|
}
|
|
|
|
.hover-lift:hover {
|
|
transform: translateY(-5px);
|
|
box-shadow: var(--box-shadow-lg);
|
|
}
|
|
|
|
/* Unit Type Badges */
|
|
.unit-type-badge {
|
|
background: var(--light-color);
|
|
border: 1px solid #dee2e6;
|
|
border-radius: var(--border-radius);
|
|
padding: 0.75rem 1rem;
|
|
text-align: center;
|
|
font-weight: 500;
|
|
color: var(--dark-color);
|
|
transition: all 0.2s ease;
|
|
}
|
|
|
|
.unit-type-badge:hover {
|
|
background: var(--primary-color);
|
|
color: white;
|
|
border-color: var(--primary-color);
|
|
}
|
|
|
|
/* Code Preview */
|
|
.code-preview {
|
|
border-radius: var(--border-radius);
|
|
box-shadow: var(--box-shadow-lg);
|
|
}
|
|
|
|
.code-preview pre {
|
|
margin: 0;
|
|
overflow-x: auto;
|
|
}
|
|
|
|
.code-preview code {
|
|
font-size: 0.875rem;
|
|
line-height: 1.4;
|
|
}
|
|
|
|
/* Fix contrast for dark backgrounds */
|
|
.bg-dark pre,
|
|
.bg-dark code {
|
|
color: #f8f9fa !important;
|
|
}
|
|
|
|
.card.bg-dark .card-body pre,
|
|
.card.bg-dark .card-body code {
|
|
color: #f8f9fa !important;
|
|
}
|
|
|
|
/* Override Bootstrap bg-dark for better contrast */
|
|
.bg-dark {
|
|
background-color: #1a202c !important;
|
|
color: #f7fafc !important;
|
|
}
|
|
|
|
.bg-dark pre,
|
|
.bg-dark code {
|
|
color: #f7fafc !important;
|
|
}
|
|
|
|
/* Fix text-muted contrast issues */
|
|
.text-muted {
|
|
color: #6c757d !important;
|
|
}
|
|
|
|
/* Better contrast for text-muted on dark backgrounds */
|
|
.bg-dark .text-muted,
|
|
.card.bg-dark .text-muted {
|
|
color: #cbd5e0 !important;
|
|
}
|
|
|
|
/* Better contrast for text-muted in cards */
|
|
.card .text-muted {
|
|
color: #495057 !important;
|
|
}
|
|
|
|
/* Ensure text-muted in footer has proper contrast */
|
|
footer.bg-dark .text-muted {
|
|
color: #9ca3af !important;
|
|
}
|
|
|
|
/* Fix text-muted in modals with dark backgrounds */
|
|
.modal.bg-dark .text-muted,
|
|
.modal-content.bg-dark .text-muted {
|
|
color: #cbd5e0 !important;
|
|
}
|
|
|
|
/* Better contrast for text-muted in forms on dark backgrounds */
|
|
.bg-dark .form-text.text-muted {
|
|
color: #a0aec0 !important;
|
|
}
|
|
|
|
/* Specific override for hero section text-muted */
|
|
.hero-section .text-muted {
|
|
color: #495057 !important;
|
|
}
|
|
|
|
/* Editor Specific Styles */
|
|
.unit-type-fields {
|
|
transition: all 0.3s ease;
|
|
}
|
|
|
|
.unit-type-fields.d-none {
|
|
display: none !important;
|
|
}
|
|
|
|
#editor {
|
|
font-family: "Courier New", Consolas, "Liberation Mono", monospace;
|
|
font-size: 0.875rem;
|
|
line-height: 1.5;
|
|
border: none !important;
|
|
resize: none;
|
|
outline: none;
|
|
box-shadow: none !important;
|
|
}
|
|
|
|
#editor:focus {
|
|
box-shadow: none !important;
|
|
border: none !important;
|
|
}
|
|
|
|
/* Validation Styles */
|
|
.validation-error {
|
|
background-color: #f8d7da;
|
|
border-color: #f5c6cb;
|
|
color: #721c24;
|
|
padding: 0.75rem;
|
|
margin-bottom: 0.5rem;
|
|
border-radius: var(--border-radius);
|
|
border-left: 4px solid var(--danger-color);
|
|
}
|
|
|
|
.validation-warning {
|
|
background-color: #fff3cd;
|
|
border-color: #ffeaa7;
|
|
color: #856404;
|
|
padding: 0.75rem;
|
|
margin-bottom: 0.5rem;
|
|
border-radius: var(--border-radius);
|
|
border-left: 4px solid var(--warning-color);
|
|
}
|
|
|
|
.validation-success {
|
|
background-color: #d1e7dd;
|
|
border-color: #badbcc;
|
|
color: #0f5132;
|
|
padding: 0.75rem;
|
|
margin-bottom: 0.5rem;
|
|
border-radius: var(--border-radius);
|
|
border-left: 4px solid var(--success-color);
|
|
}
|
|
|
|
.validation-info {
|
|
background-color: #cff4fc;
|
|
border-color: #b8daff;
|
|
color: #055160;
|
|
padding: 0.75rem;
|
|
margin-bottom: 0.5rem;
|
|
border-radius: var(--border-radius);
|
|
border-left: 4px solid var(--info-color);
|
|
}
|
|
|
|
/* Info Items */
|
|
.info-item {
|
|
padding: 0.25rem 0;
|
|
border-bottom: 1px solid #f1f3f4;
|
|
}
|
|
|
|
.info-item:last-child {
|
|
border-bottom: none;
|
|
}
|
|
|
|
/* Help Content */
|
|
.help-content {
|
|
font-size: 0.875rem;
|
|
}
|
|
|
|
.help-item {
|
|
padding: 0.25rem 0;
|
|
}
|
|
|
|
/* Template Cards */
|
|
.template-card {
|
|
transition: all 0.3s ease;
|
|
cursor: pointer;
|
|
height: 100%;
|
|
}
|
|
|
|
.template-card:hover {
|
|
transform: translateY(-3px);
|
|
box-shadow: var(--box-shadow-lg);
|
|
}
|
|
|
|
.template-card .card-header {
|
|
background: linear-gradient(135deg, var(--primary-color), #0b5ed7);
|
|
color: white;
|
|
border: none;
|
|
}
|
|
|
|
.template-tags {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 0.25rem;
|
|
margin-top: 0.5rem;
|
|
}
|
|
|
|
.template-tag {
|
|
background: var(--light-color);
|
|
color: var(--secondary-color);
|
|
padding: 0.125rem 0.5rem;
|
|
border-radius: 1rem;
|
|
font-size: 0.75rem;
|
|
font-weight: 500;
|
|
}
|
|
|
|
/* Navigation Pills */
|
|
.nav-pills .nav-link {
|
|
color: var(--secondary-color);
|
|
border-radius: var(--border-radius);
|
|
transition: all 0.2s ease;
|
|
}
|
|
|
|
.nav-pills .nav-link.active {
|
|
background-color: var(--primary-color);
|
|
color: white;
|
|
}
|
|
|
|
.nav-pills .nav-link:hover:not(.active) {
|
|
background-color: var(--light-color);
|
|
color: var(--dark-color);
|
|
}
|
|
|
|
/* Form Styles */
|
|
.form-control:focus {
|
|
border-color: var(--primary-color);
|
|
box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
|
|
}
|
|
|
|
.form-select:focus {
|
|
border-color: var(--primary-color);
|
|
box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
|
|
}
|
|
|
|
/* Button Styles */
|
|
.btn {
|
|
border-radius: var(--border-radius);
|
|
font-weight: 500;
|
|
transition: all 0.2s ease;
|
|
}
|
|
|
|
.btn-primary {
|
|
background-color: var(--primary-color);
|
|
border-color: var(--primary-color);
|
|
}
|
|
|
|
.btn-primary:hover {
|
|
background-color: #0b5ed7;
|
|
border-color: #0a58ca;
|
|
transform: translateY(-1px);
|
|
}
|
|
|
|
.btn-outline-primary:hover {
|
|
transform: translateY(-1px);
|
|
}
|
|
|
|
/* Modal Styles */
|
|
.modal-content {
|
|
border: none;
|
|
border-radius: var(--border-radius);
|
|
box-shadow: var(--box-shadow-lg);
|
|
}
|
|
|
|
.modal-header {
|
|
border-bottom: 1px solid #f1f3f4;
|
|
background: var(--light-color);
|
|
}
|
|
|
|
.modal-footer {
|
|
border-top: 1px solid #f1f3f4;
|
|
background: var(--light-color);
|
|
}
|
|
|
|
/* Loading States */
|
|
.spinner-border {
|
|
width: 3rem;
|
|
height: 3rem;
|
|
}
|
|
|
|
/* Parameter Form Styles */
|
|
.parameter-group {
|
|
margin-bottom: 1rem;
|
|
padding: 1rem;
|
|
background: var(--light-color);
|
|
border-radius: var(--border-radius);
|
|
border: 1px solid #e9ecef;
|
|
}
|
|
|
|
.parameter-label {
|
|
font-weight: 600;
|
|
color: var(--dark-color);
|
|
margin-bottom: 0.25rem;
|
|
}
|
|
|
|
.parameter-description {
|
|
font-size: 0.875rem;
|
|
color: var(--secondary-color);
|
|
margin-bottom: 0.5rem;
|
|
}
|
|
|
|
.parameter-required {
|
|
color: var(--danger-color);
|
|
font-weight: bold;
|
|
}
|
|
|
|
.parameter-optional {
|
|
color: var(--secondary-color);
|
|
font-style: italic;
|
|
}
|
|
|
|
/* Preview Code Block */
|
|
.preview-code {
|
|
background: #1a202c;
|
|
color: #f7fafc;
|
|
border-radius: var(--border-radius);
|
|
padding: 1rem;
|
|
font-family: "Courier New", Consolas, "Liberation Mono", monospace;
|
|
font-size: 0.875rem;
|
|
line-height: 1.5;
|
|
overflow-x: auto;
|
|
max-height: 400px;
|
|
overflow-y: auto;
|
|
}
|
|
|
|
/* Responsive Adjustments */
|
|
@media (max-width: 768px) {
|
|
.hero-section {
|
|
text-align: center;
|
|
}
|
|
|
|
.feature-icon {
|
|
width: 3rem;
|
|
height: 3rem;
|
|
font-size: 1.25rem;
|
|
}
|
|
|
|
.display-4 {
|
|
font-size: 2.5rem;
|
|
}
|
|
|
|
.nav-pills {
|
|
flex-direction: column;
|
|
}
|
|
|
|
.nav-pills .nav-link {
|
|
text-align: center;
|
|
margin-bottom: 0.25rem;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 576px) {
|
|
.container-fluid .row > div {
|
|
margin-bottom: 1rem;
|
|
}
|
|
|
|
.modal-dialog {
|
|
margin: 0.5rem;
|
|
}
|
|
|
|
.btn-group .btn {
|
|
padding: 0.25rem 0.5rem;
|
|
font-size: 0.875rem;
|
|
}
|
|
}
|
|
|
|
/* Animation Classes */
|
|
.fade-in {
|
|
animation: fadeIn 0.5s ease-in;
|
|
}
|
|
|
|
@keyframes fadeIn {
|
|
from {
|
|
opacity: 0;
|
|
transform: translateY(20px);
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
transform: translateY(0);
|
|
}
|
|
}
|
|
|
|
.slide-up {
|
|
animation: slideUp 0.3s ease-out;
|
|
}
|
|
|
|
@keyframes slideUp {
|
|
from {
|
|
opacity: 0;
|
|
transform: translateY(30px);
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
transform: translateY(0);
|
|
}
|
|
}
|
|
|
|
/* Utility Classes */
|
|
.text-monospace {
|
|
font-family: "Courier New", Consolas, "Liberation Mono", monospace;
|
|
}
|
|
|
|
.bg-gradient {
|
|
background-image: linear-gradient(
|
|
180deg,
|
|
rgba(255, 255, 255, 0.15),
|
|
rgba(255, 255, 255, 0)
|
|
);
|
|
}
|
|
|
|
.border-start-primary {
|
|
border-left: 4px solid var(--primary-color) !important;
|
|
}
|
|
|
|
.border-start-success {
|
|
border-left: 4px solid var(--success-color) !important;
|
|
}
|
|
|
|
.border-start-warning {
|
|
border-left: 4px solid var(--warning-color) !important;
|
|
}
|
|
|
|
.border-start-danger {
|
|
border-left: 4px solid var(--danger-color) !important;
|
|
}
|
|
|
|
/* Dark Theme Support */
|
|
@media (prefers-color-scheme: dark) {
|
|
.card {
|
|
background-color: #2d3748;
|
|
border-color: #4a5568;
|
|
color: #f7fafc;
|
|
}
|
|
|
|
.card pre,
|
|
.card code {
|
|
color: #f7fafc !important;
|
|
}
|
|
|
|
.card .text-muted {
|
|
color: #cbd5e0 !important;
|
|
}
|
|
|
|
.text-muted {
|
|
color: #a0aec0 !important;
|
|
}
|
|
|
|
/* Better text-muted for dark theme forms */
|
|
.form-text.text-muted {
|
|
color: #9ca3af !important;
|
|
}
|
|
|
|
.modal-content {
|
|
background-color: #2d3748;
|
|
color: #f7fafc;
|
|
}
|
|
|
|
.form-control {
|
|
background-color: var(--bg-secondary);
|
|
border-color: #4a5568;
|
|
color: #333;
|
|
}
|
|
|
|
.form-control:focus {
|
|
background-color: var(--bg-secondary);
|
|
border-color: var(--primary-color);
|
|
color: #333;
|
|
}
|
|
}
|
|
|
|
/* Print Styles */
|
|
@media print {
|
|
.navbar,
|
|
.modal,
|
|
.btn,
|
|
footer {
|
|
display: none !important;
|
|
}
|
|
|
|
.container {
|
|
width: 100% !important;
|
|
max-width: none !important;
|
|
}
|
|
|
|
.card {
|
|
border: 1px solid #000 !important;
|
|
box-shadow: none !important;
|
|
}
|
|
|
|
pre,
|
|
code {
|
|
white-space: pre-wrap !important;
|
|
word-break: break-all !important;
|
|
}
|
|
}
|