diff --git a/index.html b/index.html index 2ace457..e0b2a9a 100644 --- a/index.html +++ b/index.html @@ -10,9 +10,13 @@ + + + + diff --git a/src/icons.jsx b/src/icons.jsx index 5632ffb..57e0328 100644 --- a/src/icons.jsx +++ b/src/icons.jsx @@ -43,17 +43,22 @@ const Icons = { Send: (p) => , Globe: (p) => , Terminal: (p) => , - Logo: ({ size = 28 }) => ( - - - - - - - - - - + Logo: ({ size = 28, full = false }) => ( + Aura Agentic AI { e.currentTarget.style.display = "none"; }} + /> ), }; diff --git a/src/pages.jsx b/src/pages.jsx index 9bcdcf5..f0eee94 100644 --- a/src/pages.jsx +++ b/src/pages.jsx @@ -35,9 +35,36 @@ const PageHero = ({ eyebrow, title, sub, children }) => ( // ─── SERVICES PAGE ──────────────────────────────────────────────────────────── +const DASHBOARD_API = 'https://aura.auraajenticai.cloud'; + const ServicesPage = ({ lang }) => { const D = PORTFOLIO_DATA; const [active, setActive] = React.useState(null); + const [svcLinks, setSvcLinks] = React.useState({}); + + // Fetch demo/repo overrides from Dashboard (stale-while-revalidate) + React.useEffect(() => { + const CACHE_KEY = 'aura_svc_links'; + const CACHE_TTL = 10 * 60 * 1000; + try { + const cached = sessionStorage.getItem(CACHE_KEY); + if (cached) { + const { data, ts } = JSON.parse(cached); + if (Date.now() - ts < CACHE_TTL) { setSvcLinks(data); return; } + } + } catch {} + fetch(`${DASHBOARD_API}/api/public/services`, { signal: AbortSignal.timeout(3000) }) + .then(r => r.ok ? r.json() : null) + .then(data => { + if (Array.isArray(data)) { + const map = {}; + data.forEach(s => { if (s.id) map[s.id] = { demo: s.demo, repo: s.repo }; }); + setSvcLinks(map); + sessionStorage.setItem(CACHE_KEY, JSON.stringify({ data: map, ts: Date.now() })); + } + }) + .catch(() => {}); + }, []); return (
@@ -53,6 +80,8 @@ const ServicesPage = ({ lang }) => { {D.services.map((svc, i) => { const c = COLOR_MAP[svc.color] || COLOR_MAP.violet; const isOpen = active === svc.id; + const demo = (svcLinks[svc.id]?.demo) || svc.demo; + const repo = (svcLinks[svc.id]?.repo) || svc.repo; const isNew = !!svc.badge; return (
{
{/* Demo / Repo links */} - {(svc.demo || svc.repo) && ( + {(demo || repo) && (
- {svc.demo && ( + {demo && ( e.stopPropagation()} @@ -167,9 +196,9 @@ const ServicesPage = ({ lang }) => { Live Demo )} - {svc.repo && ( + {repo && ( e.stopPropagation()}