Spaces:
Runtime error
Runtime error
Commit ·
a040d63
1
Parent(s): c6fd125
Final
Browse files
src/static/css/subject_form.css
CHANGED
|
@@ -1,19 +1,20 @@
|
|
| 1 |
.form-container {
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
|
|
|
| 7 |
}
|
| 8 |
|
| 9 |
.form-header {
|
| 10 |
-
border-bottom: 2px solid var(--
|
| 11 |
padding-bottom: 1rem;
|
| 12 |
margin-bottom: 2rem;
|
| 13 |
}
|
| 14 |
|
| 15 |
.form-header h2 {
|
| 16 |
-
color:
|
| 17 |
font-weight: 700;
|
| 18 |
margin: 0;
|
| 19 |
}
|
|
@@ -24,67 +25,179 @@
|
|
| 24 |
|
| 25 |
.form-label {
|
| 26 |
font-weight: 600;
|
| 27 |
-
color:
|
| 28 |
margin-bottom: 0.5rem;
|
| 29 |
display: block;
|
| 30 |
}
|
| 31 |
|
| 32 |
.form-control {
|
| 33 |
-
border: 2px solid
|
| 34 |
border-radius: 0.5rem;
|
| 35 |
padding: 0.75rem;
|
| 36 |
width: 100%;
|
| 37 |
font-size: 1rem;
|
| 38 |
-
|
|
|
|
|
|
|
| 39 |
}
|
| 40 |
|
| 41 |
.form-control:focus {
|
| 42 |
outline: none;
|
| 43 |
-
border-color:
|
| 44 |
-
box-shadow: 0 0 0 3px
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 45 |
}
|
| 46 |
|
| 47 |
.btn-primary {
|
| 48 |
-
background: linear-gradient(135deg,
|
| 49 |
border: none;
|
| 50 |
padding: 0.75rem 2rem;
|
| 51 |
border-radius: 0.5rem;
|
| 52 |
font-weight: 600;
|
| 53 |
color: white;
|
| 54 |
transition: transform 0.2s ease, box-shadow 0.2s ease;
|
|
|
|
| 55 |
}
|
| 56 |
|
| 57 |
.btn-primary:hover {
|
| 58 |
transform: translateY(-1px);
|
| 59 |
-
box-shadow: 0 4px 12px
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 60 |
}
|
| 61 |
|
| 62 |
.btn-secondary {
|
| 63 |
-
background:
|
| 64 |
border: none;
|
| 65 |
padding: 0.75rem 2rem;
|
| 66 |
border-radius: 0.5rem;
|
| 67 |
font-weight: 600;
|
| 68 |
-
color:
|
| 69 |
text-decoration: none;
|
| 70 |
display: inline-block;
|
| 71 |
-
transition: background-color 0.2s ease;
|
|
|
|
| 72 |
}
|
| 73 |
|
| 74 |
.btn-secondary:hover {
|
| 75 |
-
background:
|
| 76 |
-
color:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 77 |
text-decoration: none;
|
| 78 |
}
|
| 79 |
|
| 80 |
.help-text {
|
| 81 |
-
color:
|
| 82 |
font-size: 0.875rem;
|
| 83 |
margin-top: 0.25rem;
|
|
|
|
| 84 |
}
|
| 85 |
|
| 86 |
.error-message {
|
| 87 |
-
color: #dc2626;
|
| 88 |
font-size: 0.875rem;
|
| 89 |
margin-top: 0.25rem;
|
| 90 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
.form-container {
|
| 2 |
+
background: var(--card-bg);
|
| 3 |
+
border-radius: 1rem;
|
| 4 |
+
box-shadow: var(--shadow-lg);
|
| 5 |
+
padding: 2rem;
|
| 6 |
+
margin: 2rem 0;
|
| 7 |
+
border: 1px solid var(--border-color);
|
| 8 |
}
|
| 9 |
|
| 10 |
.form-header {
|
| 11 |
+
border-bottom: 2px solid var(--border-color);
|
| 12 |
padding-bottom: 1rem;
|
| 13 |
margin-bottom: 2rem;
|
| 14 |
}
|
| 15 |
|
| 16 |
.form-header h2 {
|
| 17 |
+
color: var(--text-primary);
|
| 18 |
font-weight: 700;
|
| 19 |
margin: 0;
|
| 20 |
}
|
|
|
|
| 25 |
|
| 26 |
.form-label {
|
| 27 |
font-weight: 600;
|
| 28 |
+
color: var(--text-primary);
|
| 29 |
margin-bottom: 0.5rem;
|
| 30 |
display: block;
|
| 31 |
}
|
| 32 |
|
| 33 |
.form-control {
|
| 34 |
+
border: 2px solid var(--border-color);
|
| 35 |
border-radius: 0.5rem;
|
| 36 |
padding: 0.75rem;
|
| 37 |
width: 100%;
|
| 38 |
font-size: 1rem;
|
| 39 |
+
background: var(--background-primary);
|
| 40 |
+
color: var(--text-primary);
|
| 41 |
+
transition: border-color 0.2s ease, box-shadow 0.2s ease;
|
| 42 |
}
|
| 43 |
|
| 44 |
.form-control:focus {
|
| 45 |
outline: none;
|
| 46 |
+
border-color: var(--primary-color);
|
| 47 |
+
box-shadow: 0 0 0 3px var(--primary-color-alpha);
|
| 48 |
+
background: var(--background-primary);
|
| 49 |
+
}
|
| 50 |
+
|
| 51 |
+
.form-control::placeholder {
|
| 52 |
+
color: var(--text-secondary);
|
| 53 |
}
|
| 54 |
|
| 55 |
.btn-primary {
|
| 56 |
+
background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
|
| 57 |
border: none;
|
| 58 |
padding: 0.75rem 2rem;
|
| 59 |
border-radius: 0.5rem;
|
| 60 |
font-weight: 600;
|
| 61 |
color: white;
|
| 62 |
transition: transform 0.2s ease, box-shadow 0.2s ease;
|
| 63 |
+
cursor: pointer;
|
| 64 |
}
|
| 65 |
|
| 66 |
.btn-primary:hover {
|
| 67 |
transform: translateY(-1px);
|
| 68 |
+
box-shadow: 0 4px 12px var(--primary-color-alpha);
|
| 69 |
+
color: white;
|
| 70 |
+
}
|
| 71 |
+
|
| 72 |
+
.btn-primary:active {
|
| 73 |
+
transform: translateY(0);
|
| 74 |
}
|
| 75 |
|
| 76 |
.btn-secondary {
|
| 77 |
+
background: var(--text-secondary);
|
| 78 |
border: none;
|
| 79 |
padding: 0.75rem 2rem;
|
| 80 |
border-radius: 0.5rem;
|
| 81 |
font-weight: 600;
|
| 82 |
+
color: var(--background-primary);
|
| 83 |
text-decoration: none;
|
| 84 |
display: inline-block;
|
| 85 |
+
transition: background-color 0.2s ease, transform 0.2s ease;
|
| 86 |
+
cursor: pointer;
|
| 87 |
}
|
| 88 |
|
| 89 |
.btn-secondary:hover {
|
| 90 |
+
background: var(--text-primary);
|
| 91 |
+
color: var(--background-primary);
|
| 92 |
+
text-decoration: none;
|
| 93 |
+
transform: translateY(-1px);
|
| 94 |
+
}
|
| 95 |
+
|
| 96 |
+
.btn-outline-secondary {
|
| 97 |
+
background: transparent;
|
| 98 |
+
border: 2px solid var(--border-color);
|
| 99 |
+
padding: 0.75rem 2rem;
|
| 100 |
+
border-radius: 0.5rem;
|
| 101 |
+
font-weight: 600;
|
| 102 |
+
color: var(--text-primary);
|
| 103 |
+
text-decoration: none;
|
| 104 |
+
display: inline-block;
|
| 105 |
+
transition: all 0.2s ease;
|
| 106 |
+
cursor: pointer;
|
| 107 |
+
}
|
| 108 |
+
|
| 109 |
+
.btn-outline-secondary:hover {
|
| 110 |
+
background: var(--background-light);
|
| 111 |
+
border-color: var(--primary-color);
|
| 112 |
+
color: var(--text-primary);
|
| 113 |
text-decoration: none;
|
| 114 |
}
|
| 115 |
|
| 116 |
.help-text {
|
| 117 |
+
color: var(--text-secondary);
|
| 118 |
font-size: 0.875rem;
|
| 119 |
margin-top: 0.25rem;
|
| 120 |
+
line-height: 1.4;
|
| 121 |
}
|
| 122 |
|
| 123 |
.error-message {
|
| 124 |
+
color: var(--danger-color, #dc2626);
|
| 125 |
font-size: 0.875rem;
|
| 126 |
margin-top: 0.25rem;
|
| 127 |
+
line-height: 1.4;
|
| 128 |
+
}
|
| 129 |
+
|
| 130 |
+
.success-message {
|
| 131 |
+
color: var(--success-color, #059669);
|
| 132 |
+
font-size: 0.875rem;
|
| 133 |
+
margin-top: 0.25rem;
|
| 134 |
+
line-height: 1.4;
|
| 135 |
+
}
|
| 136 |
+
|
| 137 |
+
/* Form validation states */
|
| 138 |
+
.form-control.is-invalid {
|
| 139 |
+
border-color: var(--danger-color, #dc2626);
|
| 140 |
+
box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
|
| 141 |
+
}
|
| 142 |
+
|
| 143 |
+
.form-control.is-valid {
|
| 144 |
+
border-color: var(--success-color, #059669);
|
| 145 |
+
box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
|
| 146 |
+
}
|
| 147 |
+
|
| 148 |
+
/* Dark mode specific adjustments */
|
| 149 |
+
[data-theme="dark"] .form-container {
|
| 150 |
+
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
|
| 151 |
+
}
|
| 152 |
+
|
| 153 |
+
[data-theme="dark"] .form-control {
|
| 154 |
+
border-color: var(--border-color);
|
| 155 |
+
background: var(--background-secondary);
|
| 156 |
+
}
|
| 157 |
+
|
| 158 |
+
[data-theme="dark"] .form-control:focus {
|
| 159 |
+
background: var(--background-secondary);
|
| 160 |
+
}
|
| 161 |
+
|
| 162 |
+
/* Responsive adjustments */
|
| 163 |
+
@media (max-width: 576px) {
|
| 164 |
+
.form-container {
|
| 165 |
+
padding: 1.5rem;
|
| 166 |
+
margin: 1rem 0;
|
| 167 |
+
}
|
| 168 |
+
|
| 169 |
+
.btn-primary,
|
| 170 |
+
.btn-secondary,
|
| 171 |
+
.btn-outline-secondary {
|
| 172 |
+
width: 100%;
|
| 173 |
+
text-align: center;
|
| 174 |
+
margin-bottom: 0.5rem;
|
| 175 |
+
}
|
| 176 |
+
}
|
| 177 |
+
|
| 178 |
+
/* Loading state for buttons */
|
| 179 |
+
.btn-loading {
|
| 180 |
+
position: relative;
|
| 181 |
+
color: transparent !important;
|
| 182 |
+
}
|
| 183 |
+
|
| 184 |
+
.btn-loading::after {
|
| 185 |
+
content: "";
|
| 186 |
+
position: absolute;
|
| 187 |
+
width: 16px;
|
| 188 |
+
height: 16px;
|
| 189 |
+
top: 50%;
|
| 190 |
+
left: 50%;
|
| 191 |
+
margin-left: -8px;
|
| 192 |
+
margin-top: -8px;
|
| 193 |
+
border: 2px solid transparent;
|
| 194 |
+
border-top-color: currentColor;
|
| 195 |
+
border-radius: 50%;
|
| 196 |
+
animation: spin 1s linear infinite;
|
| 197 |
+
}
|
| 198 |
+
|
| 199 |
+
@keyframes spin {
|
| 200 |
+
to {
|
| 201 |
+
transform: rotate(360deg);
|
| 202 |
+
}
|
| 203 |
+
}
|
src/templates/rag_app/dashboard.html
CHANGED
|
@@ -251,93 +251,7 @@
|
|
| 251 |
</div>
|
| 252 |
</div>
|
| 253 |
|
| 254 |
-
|
| 255 |
-
<div class="dashboard-sidebar">
|
| 256 |
-
<!-- Quick Actions -->
|
| 257 |
-
<div class="sidebar-card">
|
| 258 |
-
<div class="sidebar-header">
|
| 259 |
-
<h3 class="sidebar-title">
|
| 260 |
-
<i class="fas fa-bolt"></i>
|
| 261 |
-
Quick Actions
|
| 262 |
-
</h3>
|
| 263 |
-
</div>
|
| 264 |
-
<div class="sidebar-content">
|
| 265 |
-
<a href="{% url 'rag_app:subject_create' %}" class="action-button">
|
| 266 |
-
<div class="action-icon" style="background: linear-gradient(135deg, var(--primary-color), var(--primary-dark)); color: white;">
|
| 267 |
-
<i class="fas fa-plus-circle"></i>
|
| 268 |
-
</div>
|
| 269 |
-
<div class="action-info">
|
| 270 |
-
<h6>Create New Subject</h6>
|
| 271 |
-
<small>Organize your study materials</small>
|
| 272 |
-
</div>
|
| 273 |
-
</a>
|
| 274 |
-
|
| 275 |
-
<a href="{% url 'rag_app:document_upload' %}" class="action-button">
|
| 276 |
-
<div class="action-icon" style="background: linear-gradient(135deg, var(--success-color), #047857); color: white;">
|
| 277 |
-
<i class="fas fa-upload"></i>
|
| 278 |
-
</div>
|
| 279 |
-
<div class="action-info">
|
| 280 |
-
<h6>Upload Document</h6>
|
| 281 |
-
<small>Add study materials</small>
|
| 282 |
-
</div>
|
| 283 |
-
</a>
|
| 284 |
-
|
| 285 |
-
<a href="{% url 'rag_app:generate_rag_quiz' %}" class="action-button">
|
| 286 |
-
<div class="action-icon" style="background: linear-gradient(135deg, var(--warning-color), #b45309); color: white;">
|
| 287 |
-
<i class="fas fa-magic"></i>
|
| 288 |
-
</div>
|
| 289 |
-
<div class="action-info">
|
| 290 |
-
<h6>Generate Quiz</h6>
|
| 291 |
-
<small>Create personalized tests</small>
|
| 292 |
-
</div>
|
| 293 |
-
</a>
|
| 294 |
-
|
| 295 |
-
<a href="{% url 'rag_app:slide_generate' %}" class="action-button">
|
| 296 |
-
<div class="action-icon" style="background: linear-gradient(135deg, var(--info-color), #5b21b6); color: white;">
|
| 297 |
-
<i class="fas fa-presentation"></i>
|
| 298 |
-
</div>
|
| 299 |
-
<div class="action-info">
|
| 300 |
-
<h6>Generate Slides</h6>
|
| 301 |
-
<small>Create presentations</small>
|
| 302 |
-
</div>
|
| 303 |
-
</a>
|
| 304 |
-
</div>
|
| 305 |
-
</div>
|
| 306 |
-
|
| 307 |
-
<!-- Recent Quiz Results -->
|
| 308 |
-
<div class="sidebar-card">
|
| 309 |
-
<div class="sidebar-header">
|
| 310 |
-
<h3 class="sidebar-title">
|
| 311 |
-
<i class="fas fa-chart-bar"></i>
|
| 312 |
-
Recent Quiz Results
|
| 313 |
-
</h3>
|
| 314 |
-
</div>
|
| 315 |
-
<div class="sidebar-content">
|
| 316 |
-
{% if quiz_attempts %}
|
| 317 |
-
{% for attempt in quiz_attempts %}
|
| 318 |
-
<div class="quiz-result-item">
|
| 319 |
-
<div class="quiz-info">
|
| 320 |
-
<h6>{{ attempt.quiz.title|truncatechars:30 }}</h6>
|
| 321 |
-
<div class="quiz-date">{{ attempt.completed_at|date:"M d, Y" }}</div>
|
| 322 |
-
</div>
|
| 323 |
-
<div class="quiz-score">{{ attempt.score|floatformat:0 }}%</div>
|
| 324 |
-
</div>
|
| 325 |
-
{% endfor %}
|
| 326 |
-
<div style="text-align: center; margin-top: 1rem;">
|
| 327 |
-
<a href="{% url 'rag_app:quiz_list' %}" class="btn-hero-action" style="padding: 0.5rem 1rem; font-size: 0.85rem;">
|
| 328 |
-
View All Results
|
| 329 |
-
</a>
|
| 330 |
-
</div>
|
| 331 |
-
{% else %}
|
| 332 |
-
<div class="empty-state" style="padding: 2rem 0;">
|
| 333 |
-
<div class="empty-icon">
|
| 334 |
-
<i class="fas fa-chart-bar"></i>
|
| 335 |
-
</div>
|
| 336 |
-
<div class="empty-title">No quiz attempts yet</div>
|
| 337 |
-
<div class="empty-description">Take your first quiz to see results here.</div>
|
| 338 |
-
</div>
|
| 339 |
-
{% endif %}
|
| 340 |
-
</div>
|
| 341 |
</div>
|
| 342 |
</div>
|
| 343 |
</div>
|
|
|
|
| 251 |
</div>
|
| 252 |
</div>
|
| 253 |
|
| 254 |
+
<!-- Recent Quiz Results -->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 255 |
</div>
|
| 256 |
</div>
|
| 257 |
</div>
|
src/templates/rag_app/subject_detail.html
CHANGED
|
@@ -66,7 +66,7 @@
|
|
| 66 |
</div>
|
| 67 |
<div class="col-lg-3 col-md-6 mb-3">
|
| 68 |
<div style="background: var(--background-light); border-radius: 0.75rem; padding: 1.5rem; text-align: center;">
|
| 69 |
-
<div style="font-size: 2rem; font-weight: 700; color: #f59e0b; margin-bottom: 0.5rem;">{{ subject.
|
| 70 |
<div style="color: var(--text-secondary); font-weight: 500;">Chat Sessions</div>
|
| 71 |
</div>
|
| 72 |
</div>
|
|
|
|
| 66 |
</div>
|
| 67 |
<div class="col-lg-3 col-md-6 mb-3">
|
| 68 |
<div style="background: var(--background-light); border-radius: 0.75rem; padding: 1.5rem; text-align: center;">
|
| 69 |
+
<div style="font-size: 2rem; font-weight: 700; color: #f59e0b; margin-bottom: 0.5rem;">{{ subject.subject_chats.count }}</div>
|
| 70 |
<div style="color: var(--text-secondary); font-weight: 500;">Chat Sessions</div>
|
| 71 |
</div>
|
| 72 |
</div>
|