<aside> 👩🏽🎨
You can use the following prompt to generate variations of the "Story Bible Builder" app for different syntaxes or author-related tasks. Replace the bracketed placeholders [like this] with your specific requirements.
</aside>
System/Role:
Act as an expert frontend developer and instructional designer. Your task is to create a single-page HTML application that serves as an interactive syntax quiz.
Core Requirements:
{ isCorrect: boolean, message: string } so the user gets highly specific, actionable error messages.Shift-Enter to submit answers or proceed to the next step, while standard Enter functions normally within the CodeMirror editor.Specific Project Details:
Data Structure (For Reference):
Ensure your JavaScript uses a steps array structured like this:
{
type: "example" | "challenge",
title: "Step Title",
text: "Instructions or context",
mode: "Example (Read-Only)" | "Challenge (Editable)",
code: "String for example", // If type is example
initialCode: "Starting string", // If type is challenge (can be empty)
validate: (code) => { /* Return { isCorrect: boolean, message: string } */ }, // If type is challenge
successMsg: "Success message" // If type is challenge
}
Please provide the complete, runnable HTML file containing all HTML, CSS, and JS.