garden: port content, rebuild public/, add new scripts and features
- Ported Ludo profile from vault to garden - Added auto-rebuild watcher scripts - Updated static data snapshots - Added garden-features.js and api-garden.json - Added GARDEN-CONTENT-GAPS.md for tracking - Rebuilt Hugo public/ output
This commit is contained in:
parent
8c06ab2836
commit
5703e606d0
222 changed files with 1728 additions and 594 deletions
23
static/js/garden-features.js
Normal file
23
static/js/garden-features.js
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
/* garden-features.js — Static estate feature cards
|
||||
*
|
||||
* Populates the static feature indicators on the homepage:
|
||||
* A-Team agent count, Orchestrator status, ASW version.
|
||||
* These don't come from the API — they reflect the current
|
||||
* state of the Trentuna estate architecture.
|
||||
*/
|
||||
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
const setText = (id, val) => {
|
||||
const el = document.getElementById(id);
|
||||
if (el) el.textContent = val;
|
||||
};
|
||||
|
||||
// A-Team — four specialist profiles
|
||||
setText('ateam-value', '4 agents');
|
||||
|
||||
// Orchestrator — kanban dispatch system
|
||||
setText('orchestrator-value', 'kanban');
|
||||
|
||||
// ASW — A Site/Theme Workshop version
|
||||
setText('asw-value', 'v0.1');
|
||||
});
|
||||
|
|
@ -112,13 +112,6 @@
|
|||
// ── Fetch & render ────────────────────────────────────────────────
|
||||
|
||||
async function loadGardenFeed() {
|
||||
// Show loading placeholders
|
||||
document.querySelectorAll('[data-garden]').forEach(function (el) {
|
||||
if (!el.hasAttribute('data-garden-loaded')) {
|
||||
el.innerHTML = '<p data-text="dim" class="garden-loading">…</p>';
|
||||
}
|
||||
});
|
||||
|
||||
try {
|
||||
var resp = await fetch(GARDEN_API, {
|
||||
headers: { 'Accept': 'application/json' },
|
||||
|
|
@ -137,8 +130,14 @@
|
|||
});
|
||||
} catch (err) {
|
||||
console.warn('[garden-feed] API unreachable:', err.message);
|
||||
document.querySelectorAll('[data-garden]').forEach(function (el) {
|
||||
if (!el.hasAttribute('data-garden-loaded')) {
|
||||
// Graceful degradation: if the API is down, keep existing static content
|
||||
// rather than replacing it with an error message. Only show unavailable
|
||||
// status on elements that still show the loading placeholder.
|
||||
document.querySelectorAll('[data-garden]:not([data-garden-loaded])').forEach(function (el) {
|
||||
// If the element's children are just a loading placeholder, show error.
|
||||
// Otherwise leave the static Hugo-rendered content in place.
|
||||
var text = (el.textContent || '').trim();
|
||||
if (text === '…' || text === '' || el.children.length === 0) {
|
||||
el.innerHTML = '<p data-text="dim">Garden feed unavailable.</p>';
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue