mirror of
https://github.com/deunix-educ/PyQuest.git
synced 2026-11-25 08:19:44 +01:00
Add author-mode level editor: forms, live checks, Python execution of solutions, learner preview, YAML export
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,289 @@
|
||||
/* Éditeur de niveaux (mode auteur) : formulaires, vérifications, panneau latéral. */
|
||||
|
||||
.author-header {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
gap: 0.75rem 1.5rem;
|
||||
padding: 0.75rem 1rem;
|
||||
background: var(--surface);
|
||||
border-bottom: 1px solid var(--border);
|
||||
}
|
||||
|
||||
.author-header h1 {
|
||||
margin: 0;
|
||||
font-size: 1.25rem;
|
||||
}
|
||||
|
||||
.author-toolbar {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
.author-toolbar select,
|
||||
.author-header select {
|
||||
min-height: 2.75rem;
|
||||
font: inherit;
|
||||
}
|
||||
|
||||
.author-toolbar a.btn,
|
||||
.author-toolbar label.btn {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.author-status {
|
||||
flex-basis: 100%;
|
||||
margin: 0;
|
||||
color: var(--muted);
|
||||
min-height: 1.5em;
|
||||
}
|
||||
|
||||
.author-layout {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1fr) minmax(18rem, 26rem);
|
||||
gap: 1.5rem;
|
||||
max-width: 90rem;
|
||||
margin: 0 auto;
|
||||
padding: 1rem;
|
||||
}
|
||||
|
||||
.author-side {
|
||||
align-self: start;
|
||||
position: sticky;
|
||||
top: 0.5rem;
|
||||
max-height: calc(100vh - 1rem);
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.form-section,
|
||||
.side-section {
|
||||
margin: 0 0 1.5rem;
|
||||
}
|
||||
|
||||
.form-section > h2,
|
||||
.side-section > h2 {
|
||||
margin: 0 0 0.75rem;
|
||||
font-size: 1.2rem;
|
||||
border-bottom: 2px solid var(--border);
|
||||
padding-bottom: 0.25rem;
|
||||
}
|
||||
|
||||
.field {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.25rem;
|
||||
margin: 0.75rem 0;
|
||||
}
|
||||
|
||||
.field label {
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.field input[type="text"],
|
||||
.field input[type="number"],
|
||||
.field select,
|
||||
.field textarea {
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
min-height: 2.5rem;
|
||||
padding: 0.4rem 0.6rem;
|
||||
font: inherit;
|
||||
background: var(--bg);
|
||||
color: var(--text);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 0.375rem;
|
||||
}
|
||||
|
||||
.field textarea.mono,
|
||||
.field input.mono,
|
||||
pre.mono,
|
||||
textarea.mono {
|
||||
font-family: var(--font-code);
|
||||
font-variant-ligatures: none;
|
||||
font-size: 0.95rem;
|
||||
tab-size: 4;
|
||||
}
|
||||
|
||||
textarea.mono {
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
background: var(--code);
|
||||
color: var(--text);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 0.375rem;
|
||||
padding: 0.5rem;
|
||||
}
|
||||
|
||||
pre.mono {
|
||||
margin: 0.25rem 0 1rem;
|
||||
padding: 0.5rem;
|
||||
background: var(--code);
|
||||
border-radius: 0.375rem;
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
.field-check {
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
.field-check input {
|
||||
width: 1.4rem;
|
||||
height: 1.4rem;
|
||||
accent-color: var(--accent);
|
||||
}
|
||||
|
||||
.field-check .field-help {
|
||||
flex-basis: 100%;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.field-help {
|
||||
margin: 0;
|
||||
color: var(--muted);
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
.field-row {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
.i18n-pair {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
.step-editor,
|
||||
.test-editor,
|
||||
.requires {
|
||||
margin: 1rem 0;
|
||||
padding: 1rem;
|
||||
background: var(--surface);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 0.5rem;
|
||||
}
|
||||
|
||||
.test-editor {
|
||||
background: var(--bg);
|
||||
}
|
||||
|
||||
.step-header {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
.step-header h3 {
|
||||
margin: 0;
|
||||
font-size: 1.1rem;
|
||||
}
|
||||
|
||||
.step-actions,
|
||||
.step-add {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
.test-editor legend,
|
||||
.requires legend {
|
||||
padding: 0 0.4rem;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.test-message {
|
||||
margin: 0.75rem 0;
|
||||
}
|
||||
|
||||
/* Vérifications */
|
||||
.problems-summary {
|
||||
margin: 0 0 0.5rem;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.problem-list {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.problem {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
gap: 0.6rem;
|
||||
margin: 0.4rem 0;
|
||||
padding: 0.5rem 0.6rem;
|
||||
background: var(--surface);
|
||||
border: 1px solid var(--border);
|
||||
border-left-width: 5px;
|
||||
border-radius: 0.375rem;
|
||||
}
|
||||
|
||||
.problem-error {
|
||||
border-left-color: var(--ko);
|
||||
}
|
||||
|
||||
.problem-warning {
|
||||
border-left-color: var(--hl);
|
||||
}
|
||||
|
||||
.problem-info {
|
||||
border-left-color: var(--accent);
|
||||
}
|
||||
|
||||
.problem-icon {
|
||||
flex: 0 0 1.2rem;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.problem-error .problem-severity {
|
||||
color: var(--ko);
|
||||
}
|
||||
|
||||
.problem-body {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.problem-path {
|
||||
color: var(--muted);
|
||||
font-size: 0.85rem;
|
||||
}
|
||||
|
||||
.problem .btn {
|
||||
min-height: 2.25rem;
|
||||
padding: 0.1rem 0.6rem;
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
.export-steps {
|
||||
padding-left: 1.25rem;
|
||||
}
|
||||
|
||||
.preview-frame {
|
||||
margin-top: 1rem;
|
||||
border: 2px dashed var(--border);
|
||||
border-radius: 0.5rem;
|
||||
}
|
||||
|
||||
@media (max-width: 64rem) {
|
||||
.author-layout {
|
||||
grid-template-columns: minmax(0, 1fr);
|
||||
}
|
||||
|
||||
.author-side {
|
||||
position: static;
|
||||
max-height: none;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user