commit e278de65b73d55fe0c8e62cba6e5c6397c1e06d1 Author: Stephan Yelle Date: Wed Nov 26 18:16:04 2025 -0500 Add Notes about the repo diff --git a/Notes-about-the-repo.md b/Notes-about-the-repo.md new file mode 100644 index 0000000..83f6972 --- /dev/null +++ b/Notes-about-the-repo.md @@ -0,0 +1,58 @@ +Important to keep in mind if renaming the repo + +### S.A.M.Y. UI – External CSS & JS Wiring + +This document explains where S.A.M.Y. references the external CSS and JavaScript files hosted on the SVS Git server, and what you need to update if those files move. + +--- + +## 1. External CSS path + +In `Get-UIHtml`, the HTML template includes a `` tag for the stylesheet: + +```html + + +- This `href` is the **only place** the PowerShell script refers to the CSS file. +- If you rename the repo, branch, or CSS filename, **update this URL**. +- The browser pulls all layout/colors from this file. + +--- + +## 2. External JS path + +Near the bottom of the same HTML template, the script includes an external JS file: + + + + +- This `src` is the **only reference** to the UI logic (JS) outside the PS1. +- If the JS file moves or is renamed, update this URL accordingly. + +--- + +## 3. Dynamic bridge from PowerShell → JavaScript + +Just above the external JS reference, the template injects dynamic data using a small inline script: + + + +At runtime, `Get-UIHtml` replaces: + +- `{{tasksJsAll}}` with the generated task array from `$Global:SamyTasks` +- `{{defaultPage}}` with the active page (typically `"onboard"`) + +Your external `samy.js` should read these values, for example: + + const tasks = window.SAMY_TASKS || []; + const defaultPage = window.SAMY_DEFAULT_PAGE || "onboard"; + +This keeps all logic in `samy.js` while PowerShell simply injects data. + +---