feat: Integrate HTML templates with FastAPI
- Created template_helpers.py for centralized template rendering - Added ux_features.css for enhanced UX styling - Implemented JavaScript modules for: - Keyboard shortcuts (Ctrl+K, Ctrl+R navigation) - User preferences persistence - Undo/redo functionality (Ctrl+Z/Ctrl+Y) - Mobile responsive features - Touch gesture support - Accessibility features (ARIA, focus management) - Screen reader support - Color contrast compliance (WCAG) - Multi-screen support - Updated page_controller.py and error_controller.py to use template helpers - Created comprehensive template integration tests - All templates verified: index.html, login.html, setup.html, queue.html, error.html - Maintained responsive layout and theme switching - Updated instructions.md (removed completed task) - Updated infrastructure.md with template integration details
This commit is contained in:
202
src/server/web/static/css/ux_features.css
Normal file
202
src/server/web/static/css/ux_features.css
Normal file
@@ -0,0 +1,202 @@
|
||||
/**
|
||||
* UX Features CSS
|
||||
* Additional styling for enhanced user experience features
|
||||
*/
|
||||
|
||||
/* Drag and drop indicators */
|
||||
.drag-over {
|
||||
border: 2px dashed var(--color-accent);
|
||||
background-color: var(--color-bg-tertiary);
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
.dragging {
|
||||
opacity: 0.5;
|
||||
cursor: move;
|
||||
}
|
||||
|
||||
/* Bulk operation selection */
|
||||
.bulk-select-mode .series-card {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.bulk-select-mode .series-card.selected {
|
||||
border: 2px solid var(--color-accent);
|
||||
background-color: var(--color-surface-hover);
|
||||
}
|
||||
|
||||
/* Keyboard navigation focus indicators */
|
||||
.keyboard-focus {
|
||||
outline: 2px solid var(--color-accent);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
/* Touch gestures feedback */
|
||||
.touch-feedback {
|
||||
animation: touchPulse 0.3s ease-out;
|
||||
}
|
||||
|
||||
@keyframes touchPulse {
|
||||
0% {
|
||||
transform: scale(1);
|
||||
}
|
||||
50% {
|
||||
transform: scale(0.95);
|
||||
}
|
||||
100% {
|
||||
transform: scale(1);
|
||||
}
|
||||
}
|
||||
|
||||
/* Mobile responsive enhancements */
|
||||
@media (max-width: 768px) {
|
||||
.mobile-hide {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.mobile-full-width {
|
||||
width: 100% !important;
|
||||
}
|
||||
}
|
||||
|
||||
/* Accessibility high contrast mode */
|
||||
@media (prefers-contrast: high) {
|
||||
:root {
|
||||
--color-border: #000000;
|
||||
--color-text-primary: #000000;
|
||||
--color-bg-primary: #ffffff;
|
||||
}
|
||||
|
||||
[data-theme="dark"] {
|
||||
--color-border: #ffffff;
|
||||
--color-text-primary: #ffffff;
|
||||
--color-bg-primary: #000000;
|
||||
}
|
||||
}
|
||||
|
||||
/* Screen reader only content */
|
||||
.sr-only {
|
||||
position: absolute;
|
||||
width: 1px;
|
||||
height: 1px;
|
||||
padding: 0;
|
||||
margin: -1px;
|
||||
overflow: hidden;
|
||||
clip: rect(0, 0, 0, 0);
|
||||
white-space: nowrap;
|
||||
border-width: 0;
|
||||
}
|
||||
|
||||
/* Multi-screen support */
|
||||
.window-controls {
|
||||
display: flex;
|
||||
gap: var(--spacing-sm);
|
||||
padding: var(--spacing-sm);
|
||||
}
|
||||
|
||||
.window-control-btn {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
border-radius: 4px;
|
||||
border: 1px solid var(--color-border);
|
||||
background: var(--color-surface);
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
|
||||
.window-control-btn:hover {
|
||||
background: var(--color-surface-hover);
|
||||
}
|
||||
|
||||
/* Undo/Redo notification */
|
||||
.undo-notification {
|
||||
position: fixed;
|
||||
bottom: 20px;
|
||||
right: 20px;
|
||||
background: var(--color-surface);
|
||||
border: 1px solid var(--color-border);
|
||||
border-radius: 8px;
|
||||
padding: var(--spacing-md);
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
||||
z-index: 1000;
|
||||
animation: slideInUp 0.3s ease-out;
|
||||
}
|
||||
|
||||
@keyframes slideInUp {
|
||||
from {
|
||||
transform: translateY(100%);
|
||||
opacity: 0;
|
||||
}
|
||||
to {
|
||||
transform: translateY(0);
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
/* Advanced search panel */
|
||||
.advanced-search-panel {
|
||||
background: var(--color-surface);
|
||||
border: 1px solid var(--color-border);
|
||||
border-radius: 8px;
|
||||
padding: var(--spacing-lg);
|
||||
margin-top: var(--spacing-md);
|
||||
display: none;
|
||||
}
|
||||
|
||||
.advanced-search-panel.active {
|
||||
display: block;
|
||||
}
|
||||
|
||||
/* Loading states */
|
||||
.loading-skeleton {
|
||||
background: linear-gradient(
|
||||
90deg,
|
||||
var(--color-bg-tertiary) 25%,
|
||||
var(--color-surface-hover) 50%,
|
||||
var(--color-bg-tertiary) 75%
|
||||
);
|
||||
background-size: 200% 100%;
|
||||
animation: loading 1.5s ease-in-out infinite;
|
||||
}
|
||||
|
||||
@keyframes loading {
|
||||
0% {
|
||||
background-position: 200% 0;
|
||||
}
|
||||
100% {
|
||||
background-position: -200% 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* Tooltip enhancements */
|
||||
.tooltip {
|
||||
position: absolute;
|
||||
background: var(--color-surface);
|
||||
border: 1px solid var(--color-border);
|
||||
border-radius: 4px;
|
||||
padding: var(--spacing-sm);
|
||||
font-size: var(--font-size-caption);
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
|
||||
z-index: 1000;
|
||||
pointer-events: none;
|
||||
opacity: 0;
|
||||
transition: opacity 0.2s ease;
|
||||
}
|
||||
|
||||
.tooltip.show {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
/* Reduced motion support */
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
*,
|
||||
*::before,
|
||||
*::after {
|
||||
animation-duration: 0.01ms !important;
|
||||
animation-iteration-count: 1 !important;
|
||||
transition-duration: 0.01ms !important;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user