| | <!DOCTYPE html>
|
| | <html lang="en">
|
| |
|
| | <head>
|
| | <meta charset="UTF-8">
|
| | <meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| | <title>Drag and Drop Survey Builder</title>
|
| | <link href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.1.3/css/bootstrap.min.css" rel="stylesheet">
|
| | <link rel="stylesheet" href="dragDrop.css">
|
| | </head>
|
| |
|
| | <body class="d-flex flex-column min-vh-100">
|
| | <nav class="navbar navbar-expand-lg navbar-dark bg-primary shadow-sm">
|
| | <div class="container-fluid">
|
| | <a class="navbar-brand d-flex align-items-center" href="index.html">
|
| | <img src="./images/logo.png" alt="Survey Builder Logo" height="40" class="me-2">
|
| | <span class="text-white">Survey Builder</span>
|
| | </a>
|
| | <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav"
|
| | aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
|
| | <span class="navbar-toggler-icon"></span>
|
| | </button>
|
| | <div class="collapse navbar-collapse" id="navbarNav">
|
| | <ul class="navbar-nav ms-auto">
|
| | <li class="nav-item">
|
| | <a class="nav-link" href="index.html">Home</a>
|
| | </li>
|
| | <li class="nav-item">
|
| | <a class="nav-link active" aria-current="page" href="dragAndDrop.html">Survey Builder</a>
|
| | </li>
|
| | <li class="nav-item">
|
| | <a class="nav-link" href="instructions.html">Setup & Instructions</a>
|
| | </li>
|
| | </ul>
|
| | </div>
|
| | </div>
|
| | </nav>
|
| |
|
| | <main class="flex-grow-1">
|
| | <div class="container-fluid mt-4">
|
| | <h1 class="mb-4">Survey Builder</h1>
|
| | <div class="row">
|
| | <div class="col-md-3 col-lg-2">
|
| | <div id="question-types" class="mb-4">
|
| | <h4 class="no-drag">Question Components</h4>
|
| | <div class="Choice-question" draggable="true" data-type="text-input">
|
| | Text Question
|
| | <div class="info-icon" data-tooltip="Questions with a text-based answer.">i</div>
|
| | </div>
|
| | <div class="Choice-question" draggable="true" data-type="multiple-choice">
|
| | Multiple Choice
|
| | <div class="info-icon" data-tooltip="Single-select questions with multiple options.">i</div>
|
| | </div>
|
| | <div class="Choice-question" draggable="true" data-type="multiselect">
|
| | Multiselect
|
| | <div class="info-icon" data-tooltip="Questions with a multi-select dropdown box for answers.">i</div>
|
| | </div>
|
| | <div class="Choice-question" draggable="true" data-type="selectbox">
|
| | Selectbox
|
| | <div class="info-icon" data-tooltip="Questions with a single-select dropdown box for answers.">i</div>
|
| | </div>
|
| | <div class="Choice-question" draggable="true" data-type="slider">
|
| | Slider
|
| | <div class="info-icon" data-tooltip="Questions to select a value within a defined numeric range using a slider.">i</div>
|
| | </div>
|
| | <div class="Choice-question" draggable="true" data-type="likert">
|
| | Likert Scale
|
| | <div class="info-icon" data-tooltip="Questions with 6 options ranging from strongly disagree to strongly agree and N/A.">i</div>
|
| | </div>
|
| |
|
| | <h4 class="no-drag">Content Components</h4>
|
| | <div class="Choice-question" draggable="true" data-type="new-page">
|
| | New Page
|
| | <div class="info-icon" data-tooltip="Add a page break to divide sections of the survey.">i</div>
|
| | </div>
|
| | <div class="Choice-question" draggable="true" data-type="add-video">
|
| | Add Video
|
| | <div class="info-icon" data-tooltip="Embed a video into your survey.">i</div>
|
| | </div>
|
| | <div class="Choice-question" draggable="true" data-type="add-image">
|
| | Add Image
|
| | <div class="info-icon" data-tooltip="Insert an image into your survey.">i</div>
|
| | </div>
|
| | <div class="Choice-question" draggable="true" data-type="add-text">
|
| | Add Text
|
| | <div class="info-icon" data-tooltip="Include a block of text for additional information.">i</div>
|
| | </div>
|
| |
|
| | <button id="save-survey" class="btn btn-primary mt-1 btn-compact">Export Survey</button>
|
| | <div class="modal fade" id="exportModal" tabindex="-1" aria-labelledby="exportModalLabel" aria-hidden="true">
|
| | <div class="modal-dialog">
|
| | <div class="modal-content">
|
| | <div class="modal-header no-drag">
|
| | <h5 class="modal-title no-drag" id="exportModalLabel">Export Survey</h5>
|
| | <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
| | </div>
|
| | <div class="modal-body no-drag">
|
| | <p>Choose an option:</p>
|
| | <button id="download-btn" class="btn btn-primary w-100 mb-2">Download Locally</button>
|
| | <button id="upload-btn-hf" class="btn btn-success w-100 mb-2">Upload to Hugging Face</button>
|
| | <button id="upload-btn-git" class="btn btn-success w-100">Upload to GitHub</button>
|
| |
|
| | </div>
|
| | </div>
|
| | </div>
|
| | </div>
|
| |
|
| | <div class="modal fade" id="githubModal" tabindex="-1" aria-labelledby="githubModalLabel" aria-hidden="true">
|
| | <div class="modal-dialog">
|
| | <div class="modal-content">
|
| | <div class="modal-header">
|
| | <h5 class="modal-title" id="githubModalLabel">GitHub Upload Details</h5>
|
| | <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
| | </div>
|
| | <div class="modal-body">
|
| | <div class="mb-3">
|
| | <label for="repo-id-git" class="form-label">GitHub Repository (e.g., username/repo-name)</label>
|
| | <input type="text" id="repo-id-git" class="form-control" placeholder="Enter repository name">
|
| | </div>
|
| | <div class="mb-3">
|
| | <label for="access-token-git" class="form-label">Access Token (Tokens will not be saved)</label>
|
| | <input type="text" id="access-token-git" class="form-control" placeholder="Enter your GitHub personal access token">
|
| | </div>
|
| | <div class="alert alert-warning" role="alert">
|
| | ⚠ Warning: Files with the name <b>survey.py</b> will be overwritten
|
| | </div>
|
| | <button id="submit-upload-git" class="btn btn-primary w-100">Submit <span id="loading-spinner-git" class="spinner-border spinner-border-sm" role="status" aria-hidden="true" style="display: none;"></span></button>
|
| | </div>
|
| | </div>
|
| | </div>
|
| | </div>
|
| |
|
| |
|
| | <div class="modal fade" id="hfModal" tabindex="-1" aria-labelledby="hfModalLabel" aria-hidden="true">
|
| | <div class="modal-dialog">
|
| | <div class="modal-content">
|
| | <div class="modal-header">
|
| | <h5 class="modal-title" id="hfModalLabel">Hugging Face Upload Details</h5>
|
| | <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
| | </div>
|
| | <div class="modal-body">
|
| | <div class="mb-3">
|
| | <label for="repo-id-hf" class="form-label">Hugging Face Repository (e.g., username/repo-name)</label>
|
| | <input type="text" id="repo-id-hf" class="form-control" placeholder="Enter repository name">
|
| | </div>
|
| | <div class="mb-3">
|
| | <label for="access-token-hf" class="form-label">Access Token (Tokens will not be saved)</label>
|
| | <input type="text" id="access-token-hf" class="form-control" placeholder="Enter your Hugging Face access token">
|
| | </div>
|
| | <div class="alert alert-warning" role="alert">
|
| | ⚠ Warning: Files with the name <b>app.py</b> will be overwritten
|
| | </div>
|
| | <button id="submit-upload-hf" class="btn btn-primary w-100">Submit <span id="loading-spinner-hf" class="spinner-border spinner-border-sm" role="status" aria-hidden="true" style="display: none;"></span></button>
|
| | </div>
|
| | </div>
|
| | </div>
|
| | </div>
|
| |
|
| |
|
| |
|
| |
|
| | <button type="button" class="btn btn-secondary mt-1" data-bs-toggle="modal"
|
| | data-bs-target="#importSurveyModal">
|
| | Import Survey
|
| | </button>
|
| | </div>
|
| | </div>
|
| |
|
| |
|
| | <div class="modal fade" id="importSurveyModal" tabindex="-1" aria-labelledby="importSurveyModalLabel"
|
| | aria-hidden="true">
|
| | <div class="modal-dialog">
|
| | <div class="modal-content">
|
| | <div class="modal-header">
|
| | <h5 class="modal-title" id="importSurveyModalLabel">Import Pre-Made Survey</h5>
|
| | <button type="button" class="btn-close" data-bs-dismiss="modal"
|
| | aria-label="Close"></button>
|
| | </div>
|
| | <div class="modal-body">
|
| | <label for="import-survey" class="form-label">Choose a file:</label>
|
| | <input type="file" id="import-survey" accept=".py" class="form-control" />
|
| | </div>
|
| | <div class="modal-footer">
|
| | <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
|
| | <button type="button" id="import-confirm" class="btn btn-primary">Import</button>
|
| | </div>
|
| | </div>
|
| | </div>
|
| | </div>
|
| |
|
| | <div class="col-md-9 col-lg-10">
|
| | <div id="survey-header">
|
| | <div class="mb-3">
|
| | <label for="survey-title" class="form-label">Survey Title</label>
|
| | <input type="text" id="survey-title" class="form-control" placeholder="Enter survey title">
|
| | </div>
|
| | <div class="mb-3">
|
| | <label for="survey-description" class="form-label">Survey Description</label>
|
| | <textarea id="survey-description" class="form-control" rows="3"
|
| | placeholder="Enter survey description"></textarea>
|
| | </div>
|
| | </div>
|
| | <h2>Survey Canvas</h2>
|
| | <p class="drag-text">Drag Question/Content Components below</p>
|
| | <div id="survey-area" class="sortable-container">
|
| |
|
| | </div>
|
| | </div>
|
| | </div>
|
| |
|
| | </div>
|
| | </main>
|
| |
|
| | <script src="https://cdn.jsdelivr.net/npm/sortablejs@latest/Sortable.min.js"></script>
|
| | <script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.1.3/js/bootstrap.bundle.min.js"></script>
|
| | <script src="dragdrop.js"></script>
|
| | <script type="module" src="huggingFace.js"></script>
|
| |
|
| |
|
| | </body>
|
| |
|
| | </html> |