mirror of
https://github.com/aldo-g/obsidian-llm-test.git
synced 2026-07-22 05:42:19 +00:00
657 lines
No EOL
12 KiB
CSS
657 lines
No EOL
12 KiB
CSS
/* Common Styles for Test Plugin */
|
|
.test-dashboard-container,
|
|
.test-document-container {
|
|
max-width: 800px;
|
|
margin: 0 auto;
|
|
padding: 20px;
|
|
font-family: var(--font-text, inherit);
|
|
}
|
|
|
|
/* Dashboard Specific Styles */
|
|
.dashboard-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
margin-bottom: 24px;
|
|
padding-bottom: 12px;
|
|
border-bottom: 1px solid var(--background-modifier-border);
|
|
}
|
|
|
|
.dashboard-title {
|
|
margin: 0;
|
|
font-size: 1.5em;
|
|
font-weight: bold;
|
|
color: var(--text-normal);
|
|
}
|
|
|
|
.dashboard-actions {
|
|
display: flex;
|
|
gap: 8px;
|
|
}
|
|
|
|
.file-list {
|
|
list-style: none;
|
|
padding: 0;
|
|
margin: 0;
|
|
}
|
|
|
|
.file-item {
|
|
display: flex;
|
|
align-items: center;
|
|
padding: 10px;
|
|
margin-bottom: 8px;
|
|
border-radius: 6px;
|
|
background-color: var(--background-secondary);
|
|
transition: background-color 0.2s ease;
|
|
}
|
|
|
|
.file-item:hover {
|
|
background-color: var(--background-secondary-alt);
|
|
}
|
|
|
|
.file-checkbox {
|
|
margin-right: 10px;
|
|
}
|
|
|
|
.file-path {
|
|
flex: 1;
|
|
margin-right: 10px;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.status-icon button {
|
|
background: none;
|
|
border: none;
|
|
cursor: pointer;
|
|
display: flex;
|
|
align-items: center;
|
|
padding: 4px 8px;
|
|
border-radius: 4px;
|
|
transition: background-color 0.2s;
|
|
}
|
|
|
|
.status-icon button:hover {
|
|
background-color: var(--background-modifier-hover);
|
|
}
|
|
|
|
.status-badge {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
padding: 4px 8px;
|
|
border-radius: 12px;
|
|
font-size: 12px;
|
|
font-weight: 600;
|
|
color: var(--text-on-accent);
|
|
min-width: 60px;
|
|
transition: all 0.2s ease;
|
|
}
|
|
|
|
.status-badge.none {
|
|
background-color: var(--background-modifier-border);
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.status-badge.in-progress {
|
|
background-color: #f59e0b; /* Amber color */
|
|
color: #fff;
|
|
}
|
|
|
|
.status-badge.partial {
|
|
background: linear-gradient(90deg, #f59e0b 50%, #84cc16 50%);
|
|
color: #fff;
|
|
}
|
|
|
|
.status-badge.complete {
|
|
background-color: #22c55e; /* Green color */
|
|
color: #fff;
|
|
}
|
|
|
|
.badge-icon {
|
|
margin-right: 6px;
|
|
}
|
|
|
|
.progress-ring {
|
|
transform: rotate(-90deg);
|
|
transform-origin: 50% 50%;
|
|
margin-right: 6px;
|
|
}
|
|
|
|
.progress-ring-circle {
|
|
stroke: var(--background-primary);
|
|
stroke-width: 2;
|
|
fill: transparent;
|
|
}
|
|
|
|
.progress-ring-progress {
|
|
stroke-linecap: round;
|
|
stroke-width: 2;
|
|
fill: transparent;
|
|
transition: stroke-dashoffset 0.3s ease;
|
|
}
|
|
|
|
.dashboard-button,
|
|
.test-button {
|
|
padding: 6px 12px;
|
|
border-radius: 4px;
|
|
font-weight: 600;
|
|
cursor: pointer;
|
|
transition: background-color 0.2s, transform 0.1s;
|
|
border: none;
|
|
font-size: 14px;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
}
|
|
|
|
.dashboard-button:hover,
|
|
.test-button:hover {
|
|
transform: translateY(-1px);
|
|
}
|
|
|
|
.dashboard-button:active,
|
|
.test-button:active {
|
|
transform: translateY(1px);
|
|
}
|
|
|
|
.dashboard-button.primary,
|
|
.mark-button {
|
|
background-color: var(--interactive-accent);
|
|
color: var(--text-on-accent);
|
|
}
|
|
|
|
.dashboard-button.primary:hover,
|
|
.mark-button:hover {
|
|
background-color: var(--interactive-accent-hover);
|
|
}
|
|
|
|
.dashboard-button.secondary,
|
|
.reset-button {
|
|
background-color: var(--background-modifier-border);
|
|
color: var(--text-normal);
|
|
}
|
|
|
|
.dashboard-button.secondary:hover,
|
|
.reset-button:hover {
|
|
background-color: var(--background-modifier-border-hover);
|
|
}
|
|
|
|
.empty-state {
|
|
text-align: center;
|
|
padding: 40px 20px;
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
/* Question Document View Styles */
|
|
.test-description {
|
|
font-style: italic;
|
|
margin-bottom: 2em;
|
|
color: var(--text-muted);
|
|
border-left: 3px solid var(--interactive-accent);
|
|
padding-left: 10px;
|
|
line-height: 1.5;
|
|
}
|
|
|
|
.question-item {
|
|
margin-bottom: 2em;
|
|
padding: 16px;
|
|
border-radius: 8px;
|
|
background-color: var(--background-secondary);
|
|
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
|
transition: box-shadow 0.3s ease;
|
|
}
|
|
|
|
.question-item:hover {
|
|
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
|
|
}
|
|
|
|
.question-label {
|
|
display: block;
|
|
font-weight: bold;
|
|
margin-bottom: 0.8em;
|
|
font-size: 1.1em;
|
|
}
|
|
|
|
.question-number {
|
|
display: inline-block;
|
|
background-color: var(--interactive-accent);
|
|
color: var(--text-on-accent);
|
|
width: 24px;
|
|
height: 24px;
|
|
text-align: center;
|
|
border-radius: 50%;
|
|
margin-right: 8px;
|
|
font-size: 0.9em;
|
|
line-height: 24px;
|
|
}
|
|
|
|
.answer-input {
|
|
width: 100%;
|
|
padding: 10px;
|
|
border: 1px solid var(--background-modifier-border);
|
|
border-radius: 4px;
|
|
background-color: var(--background-primary);
|
|
font-family: inherit;
|
|
transition: border 0.2s ease;
|
|
min-height: 60px;
|
|
resize: vertical;
|
|
line-height: 1.5;
|
|
overflow-y: hidden;
|
|
}
|
|
|
|
.answer-input:focus {
|
|
border-color: var(--interactive-accent);
|
|
outline: none;
|
|
box-shadow: 0 0 0 2px rgba(var(--interactive-accent-rgb), 0.2);
|
|
}
|
|
|
|
.answer-input.correct {
|
|
border: 2px solid #4caf50;
|
|
background-color: rgba(76, 175, 80, 0.05);
|
|
}
|
|
|
|
.answer-input.incorrect {
|
|
border: 2px solid #f44336;
|
|
background-color: rgba(244, 67, 54, 0.05);
|
|
}
|
|
|
|
.feedback {
|
|
margin-top: 0.5em;
|
|
font-weight: 500;
|
|
border-radius: 4px;
|
|
padding: 6px 10px;
|
|
font-size: 0.9em;
|
|
display: none;
|
|
}
|
|
|
|
.feedback.visible {
|
|
display: block;
|
|
}
|
|
|
|
.feedback.correct {
|
|
color: #2e7d32;
|
|
background-color: rgba(76, 175, 80, 0.1);
|
|
}
|
|
|
|
.feedback.incorrect {
|
|
color: #c62828;
|
|
background-color: rgba(244, 67, 54, 0.1);
|
|
}
|
|
|
|
.test-document-actions {
|
|
margin-top: 2em;
|
|
display: flex;
|
|
justify-content: center;
|
|
gap: 1em;
|
|
}
|
|
|
|
.score-summary {
|
|
margin-top: 2em;
|
|
padding: 12px;
|
|
border-radius: 6px;
|
|
font-weight: bold;
|
|
text-align: center;
|
|
font-size: 1.1em;
|
|
background-color: var(--background-primary-alt);
|
|
border: 1px solid var(--background-modifier-border);
|
|
}
|
|
|
|
.spinner-overlay-question {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
background-color: rgba(0, 0, 0, 0.7);
|
|
pointer-events: all;
|
|
}
|
|
|
|
.spinner-fixed {
|
|
position: fixed;
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
padding: 20px;
|
|
border-radius: 10px;
|
|
background-color: rgba(0, 0, 0, 0.5);
|
|
backdrop-filter: blur(4px);
|
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
|
|
}
|
|
|
|
.spinner {
|
|
width: 40px;
|
|
height: 40px;
|
|
border: 4px solid rgba(255, 255, 255, 0.3);
|
|
border-radius: 50%;
|
|
border-top-color: var(--interactive-accent);
|
|
animation: spin 1s linear infinite;
|
|
margin: 0 auto;
|
|
}
|
|
|
|
.loading-text {
|
|
margin-top: 16px;
|
|
color: white;
|
|
font-size: 16px;
|
|
font-weight: 500;
|
|
text-align: center;
|
|
}
|
|
|
|
@keyframes spin {
|
|
to { transform: rotate(360deg); }
|
|
}
|
|
|
|
.error-message {
|
|
background-color: rgba(220, 38, 38, 0.1);
|
|
color: #dc2626;
|
|
padding: 12px 16px;
|
|
margin-bottom: 20px;
|
|
border-radius: 6px;
|
|
border: 1px solid #dc2626;
|
|
position: relative;
|
|
}
|
|
|
|
.error-message h3 {
|
|
margin: 0 0 8px 0;
|
|
color: #dc2626;
|
|
font-size: 1.1em;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.error-message p {
|
|
margin: 0 0 8px 0;
|
|
font-size: 0.95em;
|
|
}
|
|
|
|
.error-message p:last-child {
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
.error-message .suggestion {
|
|
margin-top: 8px;
|
|
padding-top: 8px;
|
|
border-top: 1px solid rgba(220, 38, 38, 0.3);
|
|
font-style: italic;
|
|
}
|
|
|
|
/* Partial mark styling */
|
|
.answer-input.partial {
|
|
border: 2px solid #f59e0b;
|
|
background-color: rgba(245, 158, 11, 0.05);
|
|
}
|
|
|
|
.feedback.partial {
|
|
color: #92400e;
|
|
background-color: rgba(245, 158, 11, 0.1);
|
|
}
|
|
|
|
/* Marks display styling */
|
|
.marks-display {
|
|
font-weight: 600;
|
|
margin-bottom: 6px;
|
|
padding: 2px 8px;
|
|
display: inline-block;
|
|
border-radius: 4px;
|
|
}
|
|
|
|
.feedback.correct .marks-display {
|
|
background-color: rgba(76, 175, 80, 0.2);
|
|
}
|
|
|
|
.feedback.partial .marks-display {
|
|
background-color: rgba(245, 158, 11, 0.2);
|
|
}
|
|
|
|
.feedback.incorrect .marks-display {
|
|
background-color: rgba(244, 67, 54, 0.2);
|
|
}
|
|
|
|
.feedback-text {
|
|
margin-top: 4px;
|
|
}
|
|
|
|
.file-tree-container {
|
|
margin-top: 16px;
|
|
max-height: calc(100vh - 150px);
|
|
overflow-y: auto;
|
|
border-radius: 8px;
|
|
background-color: var(--background-secondary);
|
|
}
|
|
|
|
.file-tree {
|
|
padding: 8px 0;
|
|
}
|
|
|
|
.file-tree-item {
|
|
overflow: hidden;
|
|
}
|
|
|
|
.folder-row,
|
|
.file-row {
|
|
display: flex;
|
|
align-items: center;
|
|
padding: 6px 10px;
|
|
border-radius: 4px;
|
|
margin: 2px 8px;
|
|
transition: background-color 0.2s ease;
|
|
cursor: pointer;
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
|
|
.folder-row:hover,
|
|
.file-row:hover {
|
|
background-color: var(--background-modifier-hover);
|
|
}
|
|
|
|
.folder-toggle {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
width: 20px;
|
|
height: 20px;
|
|
margin-right: 4px;
|
|
color: var(--text-muted);
|
|
transition: transform 0.2s ease;
|
|
}
|
|
|
|
.folder-toggle.expanded svg {
|
|
transform: rotate(0deg);
|
|
}
|
|
|
|
.folder-toggle.collapsed svg {
|
|
transform: rotate(-90deg);
|
|
}
|
|
|
|
.folder-icon,
|
|
.file-icon {
|
|
display: flex;
|
|
align-items: center;
|
|
margin-right: 8px;
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.folder-name,
|
|
.file-name {
|
|
flex: 1;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
|
|
.file-checkbox {
|
|
margin-right: 8px;
|
|
}
|
|
|
|
.file-row .status-badge {
|
|
font-size: 11px;
|
|
padding: 2px 6px;
|
|
margin-left: 8px;
|
|
min-width: 50px;
|
|
display: flex;
|
|
align-items: center;
|
|
}
|
|
|
|
.file-row .badge-icon {
|
|
width: 12px;
|
|
height: 12px;
|
|
}
|
|
|
|
.folder-row.active {
|
|
background-color: var(--background-modifier-active-hover);
|
|
font-weight: 600;
|
|
}
|
|
|
|
.folder-children {
|
|
animation: fadeIn 0.2s ease;
|
|
}
|
|
|
|
@keyframes fadeIn {
|
|
from { opacity: 0.5; transform: translateY(-10px); }
|
|
to { opacity: 1; transform: translateY(0); }
|
|
}
|
|
|
|
.mark-all-container {
|
|
position: fixed;
|
|
bottom: 20px;
|
|
right: 20px;
|
|
z-index: 10;
|
|
}
|
|
|
|
.mark-all-button {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
padding: 8px 16px;
|
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
|
|
transition: all 0.2s ease;
|
|
border-radius: 6px;
|
|
}
|
|
|
|
.mark-all-button:hover {
|
|
transform: translateY(-2px);
|
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
|
|
}
|
|
|
|
.mark-all-button:disabled {
|
|
opacity: 0.6;
|
|
cursor: not-allowed;
|
|
transform: none;
|
|
box-shadow: none;
|
|
}
|
|
|
|
.loading-container {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
padding: 24px;
|
|
background-color: var(--background-primary);
|
|
border-radius: 8px;
|
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
|
|
}
|
|
|
|
.mark-all-button .spinner {
|
|
width: 14px;
|
|
height: 14px;
|
|
}
|
|
|
|
/* Container positioning */
|
|
.test-container-relative {
|
|
position: relative;
|
|
overflow-y: auto;
|
|
max-height: calc(100vh - 100px);
|
|
}
|
|
|
|
/* Spinner overlay */
|
|
.spinner-overlay {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
z-index: 1000;
|
|
background-color: rgba(0, 0, 0, 0.7);
|
|
pointer-events: all;
|
|
min-height: 100%; /* Ensure it's at least as tall as the container */
|
|
}
|
|
|
|
.spinner-fixed-center {
|
|
position: fixed;
|
|
top: 50%;
|
|
left: 50%;
|
|
transform: translate(-50%, -50%);
|
|
z-index: 1001;
|
|
text-align: center;
|
|
}
|
|
|
|
/* Full page loading overlay */
|
|
.full-page-overlay {
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
z-index: 1000;
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
background-color: rgba(0, 0, 0, 0.5);
|
|
}
|
|
|
|
/* Form styling */
|
|
.overflow-visible {
|
|
overflow-y: visible;
|
|
}
|
|
|
|
/* Tree padding (use CSS variables for dynamic values) */
|
|
.tree-item-padding-level-0 { padding-left: 0px; }
|
|
.tree-item-padding-level-1 { padding-left: 20px; }
|
|
.tree-item-padding-level-2 { padding-left: 40px; }
|
|
.tree-item-padding-level-3 { padding-left: 60px; }
|
|
.tree-item-padding-level-4 { padding-left: 80px; }
|
|
.tree-item-padding-level-5 { padding-left: 100px; }
|
|
.tree-item-padding-level-6 { padding-left: 120px; }
|
|
.tree-item-padding-level-7 { padding-left: 140px; }
|
|
.tree-item-padding-level-8 { padding-left: 160px; }
|
|
.tree-item-padding-level-9 { padding-left: 180px; }
|
|
.tree-item-padding-level-10 { padding-left: 200px; }
|
|
.tree-item-padding-level-11 { padding-left: 220px; }
|
|
.tree-item-padding-level-12 { padding-left: 240px; }
|
|
.tree-item-padding-level-max { padding-left: 260px; }
|
|
|
|
.spinner-overlay {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
z-index: 1000;
|
|
background-color: rgba(0, 0, 0, 0.7);
|
|
pointer-events: all;
|
|
}
|
|
|
|
.auto-height-textarea {
|
|
min-height: 60px;
|
|
overflow-y: hidden;
|
|
resize: none;
|
|
transition: height 0.1s ease;
|
|
}
|
|
|
|
.textarea-height-auto {
|
|
height: auto !important;
|
|
}
|
|
|
|
.textarea-expanded {
|
|
height: var(--textarea-height) !important;
|
|
}
|
|
|
|
.answer-input {
|
|
transition: height 0.1s ease-out, border-color 0.2s ease;
|
|
}
|
|
|
|
textarea.answer-input {
|
|
min-height: 60px;
|
|
max-height: 300px;
|
|
overflow-y: auto;
|
|
} |