A peek at Ceci’s cakes

Live from Instagram once connected. Replace the placeholder token + user ID in the script below to pull your latest posts.

Instagram feed not connected yet.

const INSTAGRAM_ACCESS_TOKEN = window.INSTAGRAM_ACCESS_TOKEN || "PLACEHOLDER_INSTAGRAM_ACCESS_TOKEN"; const INSTAGRAM_USER_ID = window.INSTAGRAM_USER_ID || "PLACEHOLDER_IG_USER_ID"; const galleryGrid = document.querySelector('.gallery-grid'); const igStatus = document.getElementById('ig-status'); function setStatus(message){ if(!igStatus) return; igStatus.textContent = message || ''; igStatus.style.display = message ? 'block' : 'none'; } function renderFallback(){ if(!galleryGrid) return; const placeholders = [ { src: "https://placehold.co/600x800/FFBFDF/3B2721?text=Cake+1", caption: "Soft pink birthday cake with fresh florals." }, { src: "https://placehold.co/600x800/FFF7F0/3B2721?text=Cake+2", caption: "Two-tier neutral & gold celebration cake." }, { src: "https://placehold.co/600x800/FADBE8/3B2721?text=Cake+3", caption: "Cupcakes to match a custom cake design." } ]; galleryGrid.innerHTML = ''; placeholders.forEach(item => { const article = document.createElement('article'); article.className = 'gallery-item'; article.innerHTML = ` ${item.caption} `; galleryGrid.appendChild(article); }); } async function loadInstagramFeed(){ if(!INSTAGRAM_ACCESS_TOKEN || INSTAGRAM_ACCESS_TOKEN.startsWith("PLACEHOLDER")){ setStatus("Add your Instagram access token to load the live feed."); renderFallback(); return; } if(!INSTAGRAM_USER_ID || INSTAGRAM_USER_ID.startsWith("PLACEHOLDER")){ setStatus("Add your Instagram user ID to load the live feed."); renderFallback(); return; } setStatus("Loading Instagram feed..."); try { const url = `https://graph.instagram.com/${INSTAGRAM_USER_ID}/media?fields=id,caption,media_type,media_url,permalink,thumbnail_url,timestamp&access_token=${INSTAGRAM_ACCESS_TOKEN}&limit=12`; const res = await fetch(url); if(!res.ok) throw new Error(`HTTP ${res.status}`); const json = await res.json(); const items = (json.data || []).filter(item => item.media_type === "IMAGE" || item.media_type === "CAROUSEL_ALBUM" || item.media_type === "VIDEO" ); if(!items.length){ setStatus("No Instagram posts available."); renderFallback(); return; } galleryGrid.innerHTML = ''; items.forEach(item => { const article = document.createElement('article'); article.className = 'gallery-item'; const caption = item.caption || ''; const thumb = item.media_type === "VIDEO" ? (item.thumbnail_url || item.media_url) : item.media_url; article.innerHTML = ` ${caption || 'Instagram photo'} `; galleryGrid.appendChild(article); }); setStatus(""); } catch (err) { console.error("Instagram feed error:", err); setStatus("Could not load Instagram feed right now."); renderFallback(); } } document.addEventListener('DOMContentLoaded', loadInstagramFeed);