3D engine that AI agents drive
Show a history icon beside Changelog in the site header
Nguyen Xuan An73c4c3d7cf95
diff --git a/changes/changelog-nav-icon.md b/changes/changelog-nav-icon.mdnew file mode 100644index 00000000..b2969b83--- /dev/null+++ b/changes/changelog-nav-icon.md@@ -0,0 +1 @@+- The site header shows a history icon beside Changelog, as it does beside Docs. Footer links stay plain text. The navigation smoke checks now expect both links.diff --git a/scripts/smoke-navigation.mjs b/scripts/smoke-navigation.mjsindex 726917ef..4aaa6570 100644--- a/scripts/smoke-navigation.mjs+++ b/scripts/smoke-navigation.mjs@@ -16,12 +16,12 @@ try {await page.goto(origin + route);if (route === '/downloads.html') await page.waitForURL(origin + '/#downloads');if (route === '/getting-started.html') await page.waitForURL(origin + '/docs.html#install');- await page.locator('.navigation nav a .nav-label').waitFor();+ await page.locator('.navigation nav a .nav-label').first().waitFor();for (const width of [320, 390, 580, 1440]) {await page.setViewportSize({ width, height: 1000 });const linkPositions = await page.locator('.navigation nav a').evaluateAll(links => links.map(link => link.getBoundingClientRect().top));assert.ok(linkPositions.every(top => Math.abs(top - linkPositions[0]) < 1), 'Library navigation wraps to another row');- const contrast = await page.locator('.navigation nav a').evaluate(link => {+ const contrast = await page.locator('.navigation nav a').first().evaluate(link => {const channels = color => color.match(/[\d.]+/g).map(Number);const backgrounds = [];for (let element = link; element; element = element.parentElement) {diff --git a/scripts/smoke-site.mjs b/scripts/smoke-site.mjsindex 77ba08e9..b86510af 100644--- a/scripts/smoke-site.mjs+++ b/scripts/smoke-site.mjs@@ -22,7 +22,7 @@ try {if (route === '/downloads.html') await page.waitForURL(origin + '/#downloads');if (route === '/getting-started.html') await page.waitForURL(origin + '/docs.html#install');if (['/', '/downloads.html', '/docs.html', '/getting-started.html'].includes(route)) {- await page.locator('.navigation nav a .nav-label').waitFor();+ await page.locator('.navigation nav a .nav-label').first().waitFor();}if (route.includes('object')) await page.waitForFunction(() => window.__studio?.renderer);if (route.includes('motion')) await page.waitForFunction(() => window.__motion?.renderer);@@ -58,7 +58,7 @@ try {await page.setViewportSize({ width:1440,height:1000 });if (['/', '/downloads.html', '/docs.html', '/getting-started.html'].includes(route)) {assert.equal(await page.locator('aside.navigation').count(), 0);- assert.deepEqual(await page.locator('.navigation nav .nav-label').allTextContents(), ['Docs']);+ assert.deepEqual(await page.locator('.navigation nav .nav-label').allTextContents(), ['Docs', 'Changelog']);assert.equal(await page.locator('.navigation nav a[aria-current="page"]').count(), ['/', '/downloads.html'].includes(route) ? 0 : 1);assert.equal(await page.locator('a[href$="llms.txt"]').count(), 0, 'Machine guide appears in public UI');assert.equal(await page.locator('.navigation a[href*="getting-started.html"]').count(), 0, 'Getting started still has separate navigation');diff --git a/src/brand.js b/src/brand.jsindex caae8cd2..89b8b660 100644--- a/src/brand.js+++ b/src/brand.js@@ -20,11 +20,14 @@ const paths = {leaf:'M20 3C8 2 2 8 5 15s15 6 15-12ZM4 21 15 10',image:'M3 3h18v18H3V3Zm0 14 6-6 5 5 3-3 4 4M16 8h.01',package:'M3 7 12 2l9 5v10l-9 5-9-5V7Zm0 0 9 5 9-5M12 12v10M7.5 4.5l9 5v4',+ history:'M3 12a9 9 0 1 0 2.6-6.4L3 8M3 3v5h5M12 7v5l3.5 2',github:'M9 19c-4 1-4-2-6-2m12 5v-4a3.5 3.5 0 0 0-1-2.7c3.3-.4 6.7-1.6 6.7-7.3a5.7 5.7 0 0 0-1.5-4 5.3 5.3 0 0 0-.1-4S18 0 15 2a14 14 0 0 0-7 0C5 0 3.9 0 3.9 0a5.3 5.3 0 0 0-.1 4 5.7 5.7 0 0 0-1.5 4c0 5.7 3.4 6.9 6.7 7.3A3.5 3.5 0 0 0 8 18v4',};-const labels = { Examples:'cube', Showcase:'cube', Docs: 'book', Documentation:'book', 'Getting started':'book', Downloads:'download', 'Package source':'code', Object:'cube', Nature:'leaf', Film:'film', Animation:'film', 'Save PNG':'image', 'Export GLB':'download' };+const labels = { Examples:'cube', Showcase:'cube', Docs: 'book', Changelog:'history', Documentation:'book', 'Getting started':'book', Downloads:'download', 'Package source':'code', Object:'cube', Nature:'leaf', Film:'film', Animation:'film', 'Save PNG':'image', 'Export GLB':'download' };for (const element of document.querySelectorAll('nav a, [data-icon], #save-image, #export')) {- const name = element.dataset.icon ?? labels[element.textContent.trim().replace(/[↓↗]/g, '').trim()];+ // Footer links stay plain text; only header and page navigation get an icon by label.+ const labelIcon = element.closest('.footer-links') ? undefined : labels[element.textContent.trim().replace(/[↓↗]/g, '').trim()];+ const name = element.dataset.icon ?? labelIcon;if (!paths[name]) continue;const svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg');svg.setAttribute('viewBox','0 0 24 24');