mirror of
https://github.com/pacnpal/thrillwiki_django_no_react.git
synced 2025-12-22 11:11:10 -05:00
Add JavaScript functionality for dynamic UI updates and filtering
- Implemented font color configuration based on numeric values in various sections. - Added resizing functionality for input fields to accommodate text length. - Initialized filters on document ready for improved user interaction. - Created visualization for profile data using fetched dot format. - Enhanced SQL detail page with click event handling for row navigation. - Ensured consistent highlighting for code blocks across multiple pages.
This commit is contained in:
@@ -1,187 +0,0 @@
|
||||
/* Inline editing styles */
|
||||
.editable-container {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
[data-editable] {
|
||||
position: relative;
|
||||
padding: 0.25rem;
|
||||
border-radius: 0.25rem;
|
||||
transition: background-color 0.2s;
|
||||
}
|
||||
|
||||
[data-editable]:hover {
|
||||
background-color: rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
|
||||
.dark [data-editable]:hover {
|
||||
background-color: rgba(255, 255, 255, 0.05);
|
||||
}
|
||||
|
||||
[data-edit-button] {
|
||||
opacity: 0;
|
||||
position: absolute;
|
||||
right: 0.5rem;
|
||||
top: 0.5rem;
|
||||
transition: opacity 0.2s;
|
||||
padding: 0.5rem;
|
||||
border-radius: 0.375rem;
|
||||
background-color: rgba(255, 255, 255, 0.9);
|
||||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.dark [data-edit-button] {
|
||||
background-color: rgba(31, 41, 55, 0.9);
|
||||
}
|
||||
|
||||
.editable-container:hover [data-edit-button] {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.form-input, .form-textarea, .form-select {
|
||||
width: 100%;
|
||||
padding: 0.5rem;
|
||||
border: 1px solid #e2e8f0;
|
||||
border-radius: 0.375rem;
|
||||
background-color: white;
|
||||
transition: border-color 0.2s, box-shadow 0.2s;
|
||||
}
|
||||
|
||||
.dark .form-input, .dark .form-textarea, .dark .form-select {
|
||||
background-color: #1f2937;
|
||||
border-color: #374151;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.form-input:focus, .form-textarea:focus, .form-select:focus {
|
||||
outline: none;
|
||||
border-color: #4f46e5;
|
||||
box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
|
||||
}
|
||||
|
||||
.dark .form-input:focus, .dark .form-textarea:focus, .dark .form-select:focus {
|
||||
border-color: #6366f1;
|
||||
box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
|
||||
}
|
||||
|
||||
/* Notifications */
|
||||
.notification {
|
||||
position: fixed;
|
||||
bottom: 1rem;
|
||||
right: 1rem;
|
||||
padding: 1rem;
|
||||
border-radius: 0.5rem;
|
||||
color: white;
|
||||
max-width: 24rem;
|
||||
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
|
||||
z-index: 50;
|
||||
animation: slide-in 0.3s ease-out;
|
||||
}
|
||||
|
||||
.notification-success {
|
||||
background-color: #059669;
|
||||
}
|
||||
|
||||
.dark .notification-success {
|
||||
background-color: #047857;
|
||||
}
|
||||
|
||||
.notification-error {
|
||||
background-color: #dc2626;
|
||||
}
|
||||
|
||||
.dark .notification-error {
|
||||
background-color: #b91c1c;
|
||||
}
|
||||
|
||||
.notification-info {
|
||||
background-color: #3b82f6;
|
||||
}
|
||||
|
||||
.dark .notification-info {
|
||||
background-color: #2563eb;
|
||||
}
|
||||
|
||||
@keyframes slide-in {
|
||||
from {
|
||||
transform: translateX(100%);
|
||||
opacity: 0;
|
||||
}
|
||||
to {
|
||||
transform: translateX(0);
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
/* Add/Edit Form Styles */
|
||||
.form-section {
|
||||
@apply space-y-6;
|
||||
}
|
||||
|
||||
.form-group {
|
||||
@apply space-y-2;
|
||||
}
|
||||
|
||||
.form-label {
|
||||
@apply block text-sm font-medium text-gray-700 dark:text-gray-300;
|
||||
}
|
||||
|
||||
.form-error {
|
||||
@apply mt-1 text-sm text-red-600 dark:text-red-400;
|
||||
}
|
||||
|
||||
.form-help {
|
||||
@apply mt-1 text-sm text-gray-500 dark:text-gray-400;
|
||||
}
|
||||
|
||||
/* Button Styles */
|
||||
.btn {
|
||||
@apply inline-flex items-center justify-center px-4 py-2 font-medium transition-colors rounded-lg;
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
@apply text-white bg-blue-600 hover:bg-blue-700 dark:bg-blue-500 dark:hover:bg-blue-600;
|
||||
}
|
||||
|
||||
.btn-secondary {
|
||||
@apply text-gray-700 bg-gray-200 hover:bg-gray-300 dark:bg-gray-600 dark:text-gray-200 dark:hover:bg-gray-500;
|
||||
}
|
||||
|
||||
.btn-danger {
|
||||
@apply text-white bg-red-600 hover:bg-red-700 dark:bg-red-500 dark:hover:bg-red-600;
|
||||
}
|
||||
|
||||
/* Status Badges */
|
||||
.status-badge {
|
||||
@apply inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium;
|
||||
}
|
||||
|
||||
.status-operating {
|
||||
@apply text-green-800 bg-green-100 dark:bg-green-900 dark:text-green-200;
|
||||
}
|
||||
|
||||
.status-closed {
|
||||
@apply text-red-800 bg-red-100 dark:bg-red-900 dark:text-red-200;
|
||||
}
|
||||
|
||||
.status-construction {
|
||||
@apply text-yellow-800 bg-yellow-100 dark:bg-yellow-900 dark:text-yellow-200;
|
||||
}
|
||||
|
||||
/* Navigation Links */
|
||||
.nav-link {
|
||||
@apply flex items-center px-3 py-2 text-gray-700 transition-colors rounded-lg dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700;
|
||||
}
|
||||
|
||||
.nav-link i {
|
||||
@apply mr-2;
|
||||
}
|
||||
|
||||
/* Menu Items */
|
||||
.menu-item {
|
||||
@apply flex items-center w-full px-4 py-2 text-sm text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700;
|
||||
}
|
||||
|
||||
.menu-item i {
|
||||
@apply mr-3;
|
||||
}
|
||||
@@ -1,15 +1,20 @@
|
||||
@tailwind base;
|
||||
@tailwind components;
|
||||
@tailwind utilities;
|
||||
@import "tailwindcss";
|
||||
|
||||
@theme {
|
||||
--color-primary: #4f46e5;
|
||||
--color-secondary: #e11d48;
|
||||
--color-accent: #8b5cf6;
|
||||
--font-family-sans: Poppins, sans-serif;
|
||||
}
|
||||
|
||||
@layer components {
|
||||
/* Button Styles */
|
||||
.btn-primary {
|
||||
@apply inline-flex items-center px-6 py-2.5 border border-transparent rounded-full shadow-md text-sm font-medium text-white bg-gradient-to-r from-primary to-secondary hover:from-primary/90 hover:to-secondary/90 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary/50 transform hover:scale-105 transition-all;
|
||||
@apply inline-flex items-center px-6 py-2.5 border border-transparent rounded-full shadow-md text-sm font-medium text-white bg-gradient-to-r from-primary to-secondary hover:from-primary/90 hover:to-secondary/90 focus:outline-hidden focus:ring-3 focus:ring-offset-2 focus:ring-primary/50 transform hover:scale-105 transition-all;
|
||||
}
|
||||
|
||||
.btn-secondary {
|
||||
@apply inline-flex items-center px-6 py-2.5 border border-gray-200 dark:border-gray-700 rounded-full shadow-md text-sm font-medium text-gray-700 dark:text-gray-200 bg-white dark:bg-gray-800 hover:bg-gray-50 dark:hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary/50 transform hover:scale-105 transition-all;
|
||||
@apply inline-flex items-center px-6 py-2.5 border border-gray-200 dark:border-gray-700 rounded-full shadow-md text-sm font-medium text-gray-700 dark:text-gray-200 bg-white dark:bg-gray-800 hover:bg-gray-50 dark:hover:bg-gray-700 focus:outline-hidden focus:ring-3 focus:ring-offset-2 focus:ring-primary/50 transform hover:scale-105 transition-all;
|
||||
}
|
||||
/* [Previous styles remain unchanged until mobile menu section...] */
|
||||
|
||||
@@ -65,7 +70,7 @@
|
||||
|
||||
#theme-toggle:checked+.theme-toggle-btn i::before {
|
||||
content: "\f185";
|
||||
color: theme('colors.yellow.400');
|
||||
@apply text-yellow-400;
|
||||
}
|
||||
|
||||
/* Navigation Components */
|
||||
@@ -138,7 +143,7 @@
|
||||
|
||||
@media (min-width: 1024px) {
|
||||
#mobileMenu {
|
||||
@apply hidden !important;
|
||||
@apply !hidden;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -153,7 +158,7 @@
|
||||
|
||||
/* Form Components */
|
||||
.form-input {
|
||||
@apply w-full px-4 py-3 text-gray-900 transition-all border border-gray-200 rounded-lg shadow-sm dark:border-gray-700 bg-white/70 dark:bg-gray-800/70 backdrop-blur-sm dark:text-white focus:ring-2 focus:ring-primary/50 focus:border-primary;
|
||||
@apply w-full px-4 py-3 text-gray-900 transition-all border border-gray-200 rounded-lg shadow-xs dark:border-gray-700 bg-white/70 dark:bg-gray-800/70 backdrop-blur-xs dark:text-white focus:ring-3 focus:ring-primary/50 focus:border-primary;
|
||||
}
|
||||
|
||||
.form-label {
|
||||
@@ -187,7 +192,7 @@
|
||||
|
||||
/* Auth Components */
|
||||
.auth-card {
|
||||
@apply w-full max-w-md p-8 mx-auto border shadow-xl bg-white/90 dark:bg-gray-800/90 rounded-2xl backdrop-blur-sm border-gray-200/50 dark:border-gray-700/50;
|
||||
@apply w-full max-w-md p-8 mx-auto border shadow-xl bg-white/90 dark:bg-gray-800/90 rounded-2xl backdrop-blur-xs border-gray-200/50 dark:border-gray-700/50;
|
||||
}
|
||||
|
||||
.auth-title {
|
||||
@@ -217,7 +222,7 @@
|
||||
|
||||
/* Social Login Buttons */
|
||||
.btn-social {
|
||||
@apply w-full flex items-center justify-center px-6 py-3 border border-gray-200 dark:border-gray-700 rounded-lg shadow-sm text-sm font-medium text-gray-700 dark:text-gray-200 bg-white dark:bg-gray-800 hover:bg-gray-50 dark:hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary/50 transform hover:scale-[1.02] transition-all mb-3;
|
||||
@apply w-full flex items-center justify-center px-6 py-3 border border-gray-200 dark:border-gray-700 rounded-lg shadow-xs text-sm font-medium text-gray-700 dark:text-gray-200 bg-white dark:bg-gray-800 hover:bg-gray-50 dark:hover:bg-gray-700 focus:outline-hidden focus:ring-3 focus:ring-offset-2 focus:ring-primary/50 transform hover:scale-[1.02] transition-all mb-3;
|
||||
}
|
||||
|
||||
.btn-discord {
|
||||
@@ -230,7 +235,7 @@
|
||||
|
||||
/* Alert Components */
|
||||
.alert {
|
||||
@apply p-4 mb-4 shadow-lg rounded-xl backdrop-blur-sm;
|
||||
@apply p-4 mb-4 shadow-lg rounded-xl backdrop-blur-xs;
|
||||
}
|
||||
|
||||
.alert-success {
|
||||
@@ -262,6 +267,122 @@
|
||||
@apply grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-3;
|
||||
}
|
||||
|
||||
/* Adaptive Grid System - White Space Solutions */
|
||||
.grid-adaptive {
|
||||
@apply grid gap-6;
|
||||
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
|
||||
}
|
||||
|
||||
.grid-adaptive-sm {
|
||||
@apply grid gap-4;
|
||||
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
|
||||
}
|
||||
|
||||
.grid-adaptive-lg {
|
||||
@apply grid gap-8;
|
||||
grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
|
||||
}
|
||||
|
||||
/* Stats Grid - Always Even Layout */
|
||||
.grid-stats {
|
||||
@apply grid gap-4;
|
||||
/* Default: Force 2+3 layout for small screens */
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
}
|
||||
|
||||
.grid-stats-wide {
|
||||
@apply grid gap-4;
|
||||
grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
|
||||
}
|
||||
|
||||
/* Enhanced Responsive Grid */
|
||||
.grid-responsive {
|
||||
@apply grid grid-cols-1 gap-6;
|
||||
@apply sm:grid-cols-2;
|
||||
@apply md:grid-cols-3;
|
||||
@apply lg:grid-cols-4;
|
||||
@apply xl:grid-cols-5;
|
||||
@apply 2xl:grid-cols-6;
|
||||
}
|
||||
|
||||
.grid-responsive-cards {
|
||||
@apply grid grid-cols-1 gap-6;
|
||||
@apply md:grid-cols-2;
|
||||
@apply lg:grid-cols-3;
|
||||
@apply xl:grid-cols-4;
|
||||
@apply 2xl:grid-cols-5;
|
||||
}
|
||||
|
||||
/* Tablet-specific optimizations for 768px breakpoint */
|
||||
@media (min-width: 768px) and (max-width: 1023px) {
|
||||
.grid-adaptive-sm {
|
||||
grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
|
||||
}
|
||||
/* Force 2+3 even layout for tablets */
|
||||
.grid-stats {
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
}
|
||||
.grid-adaptive {
|
||||
grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
|
||||
}
|
||||
}
|
||||
|
||||
/* Content-aware grid adjustments */
|
||||
@media (min-width: 1024px) and (max-width: 1279px) {
|
||||
.grid-adaptive {
|
||||
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
|
||||
}
|
||||
.grid-adaptive-lg {
|
||||
grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
|
||||
}
|
||||
/* Force 3+2 even layout for intermediate sizes */
|
||||
.grid-stats {
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 1280px) {
|
||||
.grid-adaptive {
|
||||
grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
|
||||
}
|
||||
.grid-adaptive-lg {
|
||||
grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
|
||||
}
|
||||
/* Force 5-column even layout for large screens */
|
||||
.grid-stats {
|
||||
grid-template-columns: repeat(5, 1fr);
|
||||
}
|
||||
}
|
||||
|
||||
/* Priority Card - Operator/Owner Full-Width Responsive Behavior */
|
||||
.card-stats-priority {
|
||||
/* Full width by default (small screens) */
|
||||
grid-column: 1 / -1;
|
||||
}
|
||||
|
||||
/* Medium screens - still full width for emphasis */
|
||||
@media (min-width: 768px) and (max-width: 1023px) {
|
||||
.card-stats-priority {
|
||||
grid-column: 1 / -1;
|
||||
}
|
||||
}
|
||||
|
||||
/* Large screens - normal grid behavior */
|
||||
@media (min-width: 1024px) {
|
||||
.card-stats-priority {
|
||||
grid-column: auto;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 1536px) {
|
||||
.grid-adaptive {
|
||||
grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
|
||||
}
|
||||
.grid-adaptive-lg {
|
||||
grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
|
||||
}
|
||||
}
|
||||
|
||||
/* Typography */
|
||||
.heading-1 {
|
||||
@apply mb-6 text-3xl font-bold text-gray-900 dark:text-white;
|
||||
@@ -279,4 +400,56 @@
|
||||
.turnstile {
|
||||
@apply flex items-center justify-center my-4;
|
||||
}
|
||||
|
||||
/* Layout Optimization - Phase 1 Critical Fixes */
|
||||
/* Optimized Padding System */
|
||||
.p-compact {
|
||||
@apply p-5; /* 20px - replaces excessive p-6 (24px) */
|
||||
}
|
||||
|
||||
.p-optimized {
|
||||
@apply p-4; /* 16px - replaces p-6 (24px) for 33% reduction */
|
||||
}
|
||||
|
||||
.p-minimal {
|
||||
@apply p-3; /* 12px - replaces p-2 (8px) for consistency */
|
||||
}
|
||||
|
||||
/* Consistent Card Heights */
|
||||
.card-standard {
|
||||
@apply min-h-[120px];
|
||||
}
|
||||
|
||||
.card-large {
|
||||
@apply min-h-[200px];
|
||||
}
|
||||
|
||||
.card-stats {
|
||||
@apply min-h-[80px];
|
||||
}
|
||||
|
||||
/* Mobile Responsive Padding Adjustments */
|
||||
@media (max-width: 768px) {
|
||||
.p-compact {
|
||||
@apply p-4; /* 16px on mobile */
|
||||
}
|
||||
.p-optimized {
|
||||
@apply p-3.5; /* 14px on mobile */
|
||||
}
|
||||
.p-minimal {
|
||||
@apply p-2.5; /* 10px on mobile */
|
||||
}
|
||||
|
||||
.card-standard {
|
||||
@apply min-h-[100px];
|
||||
}
|
||||
|
||||
.card-large {
|
||||
@apply min-h-[160px];
|
||||
}
|
||||
|
||||
.card-stats {
|
||||
@apply min-h-[80px];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user