footer font-size: 0.7rem; text-align: center; margin-top: 28px; opacity: 0.7;
// generate SVG path string (simple blob shape based on given path) function renderBlobSVG(pathData, idNum) // random pastel fill based on ID to keep distinct friendly look const colors = ["#FFB77C", "#FFA56E", "#F7B787", "#FEC196", "#FDAC6A", "#F6BD8C", "#FEC68B"]; const fillColor = colors[idNum % colors.length]; return `<svg class="blob-svg" viewBox="0 0 100 90" xmlns="http://www.w3.org/2000/svg"> <path d="$pathData" fill="$fillColor" stroke="#D48C54" stroke-width="1.2" stroke-linejoin="round" /> <circle cx="38" cy="42" r="3" fill="#4F2D14" /> <circle cx="62" cy="42" r="3" fill="#4F2D14" /> <path d="M44 54 Q50 62 56 54" stroke="#5D341B" stroke-width="2" fill="none" stroke-linecap="round" /> </svg>`; blob tree template
/* blob SVG style */ .blob-svg width: 85px; height: 85px; filter: drop-shadow(0 6px 10px rgba(0,0,0,0.1)); transition: all 0.2s; footer font-size: 0
<div class="tree-grid" id="blobTreeGrid"> <!-- Branches will be injected dynamically via JS --> </div> footer font-size: 0.7rem
.selection-display font-size: 1.3rem; font-weight: 600; color: #2c1a0c; display: flex; align-items: baseline; flex-wrap: wrap; gap: 12px; justify-content: space-between;
function init() loadPersistedNotes(); buildTreeUI(); // after building, trigger selection to display current selected or default if (currentSelectedId) selectBlob(currentSelectedId); else // if nothing selected, default to blob 1 selectBlob(1); document.getElementById("saveReflectionBtn").addEventListener("click", () => saveCurrentReflection(); persistData(); ); // optional: auto-save on textarea blur document.getElementById("reflectionInput").addEventListener("blur", () => if (currentSelectedId) savedNotes[currentSelectedId] = document.getElementById("reflectionInput").value; persistData(); );
button:hover background: #d69a58; transform: scale(0.97);