Skip to main content

New Commit: Replace note prompt with reader modal Switched inline text highlighting from using `prompt()` to a custom study-note modal in the reader UI. The highlighting script now opens the modal, focuses the textarea, wires Save/Cancel actions, and cleans up handlers after close. Added the modal markup to `reader_template.php` and removed the `read-realistic-single.css` import from `reader-main.css`.

Repository: Hestenb62/_legacy_backup

Author: Hesten Berger

Commit Message: Replace note prompt with reader modal Switched inline text highlighting from using to a custom study-note modal in the reader UI. The highlighting script now opens the modal, focuses the textarea, wires Save/Cancel actions, and cleans up handlers after close. Added the modal markup to and removed the import from .

URL: https://github.com/Hestenb62/_legacy_backup/commit/6ce5c65d80371e955505ccb9872fd955330427a0

Code Changes:

diff --git a/assets/css/reader-main.css b/assets/css/reader-main.css
index 4bfc6cc..1e36c11 100644
--- a/assets/css/reader-main.css
+++ b/assets/css/reader-main.css
@@ -12,7 +12,7 @@
 @import url('./reader/read-reader-academic-citation-modal.css');
 @import url('./reader/read-book-sourcing-information-moda.css');
 @import url('./reader/read-responsive-breakpoints-for-rea.css');
-@import url('./reader/read-realistic-single.css');
+
 /* Inline Page Markers for Scroll Mode */
 .inline-page-marker {
     display: flex;
diff --git a/assets/js/reader/read-inline-text-highlighting.js b/assets/js/reader/read-inline-text-highlighting.js
index 47bf32e..e60d4bb 100644
--- a/assets/js/reader/read-inline-text-highlighting.js
+++ b/assets/js/reader/read-inline-text-highlighting.js
@@ -99,9 +99,33 @@
         if (hlNote) {
             hlNote.addEventListener("click", () => {
                 if (currentSelectedRange) {
-                    const note = prompt("Add a study note for this selection:");
-                    if (note) {
-                        applyHighlight("hl-yellow", note);
+                    const noteModal = document.getElementById("note-input-modal");
+                    const noteTextarea = document.getElementById("study-note-textarea");
+                    const saveBtn = document.getElementById("save-note-btn");
+                    const cancelBtn = document.getElementById("cancel-note-btn");
+                    
+                    if (noteModal && noteTextarea) {
+                        noteTextarea.value = '';
+                        noteModal.classList.remove("hidden");
+                        noteModal.style.display = "flex";
+                        noteTextarea.focus();
+
+                        const cleanup = () => {
+                            noteModal.classList.add("hidden");
+                            noteModal.style.display = "none";
+                            saveBtn.onclick = null;
+                            cancelBtn.onclick = null;
+                        };
+
+                        cancelBtn.onclick = cleanup;
+
+                        saveBtn.onclick = () => {
+                            const note = noteTextarea.value.trim();
+                            if (note) {
+                                applyHighlight("hl-yellow", note);
+                            }
+                            cleanup();
+                        };
                     }
                 }
             });
diff --git a/library/read/reader_template.php b/library/read/reader_template.php
index bb464ca..9650d56 100644
--- a/library/read/reader_template.php
+++ b/library/read/reader_template.php
@@ -1,4 +1,4 @@
-<?php
+<?php
 /**
  * library/read/reader_template.php - Unified Digital Reader Template
  * Implements distraction-free editorial reading, customizable typography,
@@ -522,6 +522,26 @@ include ABSPATH . 'src/header.php';
     </div>
 </div>
 
+
+<!-- Custom Study Note Modal -->
+<div id="note-input-modal" class="modal-overlay hidden" role="dialog" aria-modal="true" aria-labelledby="note-modal-title" style="z-index: 9999;">
+    <div class="modal-card" style="max-width: 400px; padding: 1.5rem;">
+        <div class="modal-card-header" style="border-bottom: none; margin-bottom: 0.5rem; padding-bottom: 0;">
+            <div class="modal-card-title">
+                <div>
+                    <h3 id="note-modal-title" style="margin: 0; font-size: 1.25rem;">Add a Study Note</h3>
+                </div>
+            </div>
+        </div>
+        <div class="modal-body">
+            <textarea id="study-note-textarea" rows="4" style="width: 100%; padding: 0.75rem; border-radius: 0.5rem; border: 1px solid var(--color-border); font-family: inherit; margin-bottom: 1rem; resize: none;" placeholder="Type your insights here..."></textarea>
+            <div style="display: flex; justify-content: flex-end; gap: 0.5rem;">
+                <button type="button" id="cancel-note-btn" style="padding: 0.5rem 1rem; border-radius: 0.5rem; border: none; background: transparent; cursor: pointer; font-weight: 600; color: var(--color-text-secondary);">Cancel</button>
+                <button type="button" id="save-note-btn" style="padding: 0.5rem 1.25rem; border-radius: 0.5rem; border: none; background: var(--color-primary, #4f46e5); color: white; cursor: pointer; font-weight: 700; box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);">Save Note</button>
+            </div>
+        </div>
+    </div>
+</div>
 <!-- Send metadata to client window context -->
 <script>
     window.BOOK_METADATA = {
@@ -548,4 +568,4 @@ include ABSPATH . 'src/header.php';
 <script src="../../assets/js/reader/read-chapter-citation-generator.js" defer></script>
 <script src="../../assets/js/reader/read-scroll-markers.js" defer></script>
 
-<?php include ABSPATH . 'src/footer.php'; ?>
\ No newline at end of file
+<?php include ABSPATH . 'src/footer.php'; ?>

Popular Posts

New Commit: fixed theme issues

Repository: Hestenb62/_legacy_backup Author: Hesten Berger Commit Message: fixed theme issues URL: https://github.com/Hestenb62/_legacy_backup/commit/498741f8c633ecaf6e7e594bb0aed02c47e69b39 Code Changes: diff --git a/assessment/index.php b/assessment/index.php index 822865b..5e8b706 100644 --- a/assessment/index.php +++ b/assessment/index.php @@ -264,7 +264,7 @@ include '../src/header.php'; </div> <!-- Hint Modal (Inline) --> - <div id="hintText" class="hint-box" style="display: none;"> + <div id="hintText" class="hint-box hidden"> <strong>Hint:</strong> <span id="hint-content"></span> </div> </div> diff --git a/assets/css/pages/assessment.css b/assets/css/pages/assessment.css index b57e964..7eb0d74 100644 --- a/assets/c...

New Commit: added arura mesh

Repository: Hestenb62/_legacy_backup Author: Hesten Berger Commit Message: added arura mesh URL: https://github.com/Hestenb62/_legacy_backup/commit/d8a9c63f2df943f6e40651985fb1c273c5809dd4 Code Changes: diff --git a/assets/css/level-style.css b/assets/css/level-style.css index ed8b60b..49cddf7 100644 --- a/assets/css/level-style.css +++ b/assets/css/level-style.css @@ -100,6 +100,8 @@ h1, h2, h3, h4 { padding: 4rem 1rem 3rem 1rem; background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%); border-bottom: 1px solid var(--glass-border); + position: relative; + overflow: hidden; } .hero-inner { @@ -111,6 +113,78 @@ h1, h2, h3, h4 { flex-wrap: wrap; gap: 1.5rem; animation: fadeUp 0.6s ease-out; + position: relative; + z-index: 2; +} + +/* Aurora Mesh Background for Level Hero */ +.level-aurora-bg { + position: absolute; + inset: 0; + overflow: hidden; + pointer-events: none; + z-index: 1; +} + +....

New Commit: Add JSON lesson migration and renderer scaffold Introduces a first-pass migration pipeline from PHP lesson files to structured JSON with `migrate_lessons.php`, and adds a generated `assets/data/lessons.json` catalog containing extracted metadata plus manual-migration placeholders for complex interactive content. Adds a new universal `src/lesson_renderer.php` to render lessons from JSON, along with initial component templates (`interactive-ladder` and `teacher-concepts`) for modular block rendering. Also includes `audit_report.html` documenting current security, accessibility, and architecture findings that motivated the move toward a template-driven lesson system.

Repository: Hestenb62/_legacy_backup Author: Hesten Berger Commit Message: Add JSON lesson migration and renderer scaffold Introduces a first-pass migration pipeline from PHP lesson files to structured JSON with , and adds a generated catalog containing extracted metadata plus manual-migration placeholders for complex interactive content. Adds a new universal to render lessons from JSON, along with initial component templates ( and ) for modular block rendering. Also includes documenting current security, accessibility, and architecture findings that motivated the move toward a template-driven lesson system. URL: https://github.com/Hestenb62/_legacy_backup/commit/f0c974b613ed65b7edcb712abb88bfae61ef0df5 Code Changes: diff --git a/assets/data/lessons.json b/assets/data/lessons.json new file mode 100644 index 0000000..0389666 --- /dev/null +++ b/assets/data/lessons.json @@ -0,0 +1,2835 @@ +{ + "lessons": { + "k-ela-m1-a-1": { + ...