EHS-Studio Claude Sonnet 5.5 commited on
Commit
0882628
·
1 Parent(s): a57c592

Wood page: absolute asset paths so the clean URL /showcase/wood is styled

Browse files
public/showcase/wood/index.html CHANGED
@@ -8,8 +8,8 @@
8
  <link rel="preconnect" href="https://fonts.googleapis.com">
9
  <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
10
  <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,700;9..144,800&family=Hanken+Grotesk:wght@400;500;700&display=swap">
11
- <!-- wood.css is real CSS built from static.dssl (textures baked in), so the page is styled before any script runs -->
12
- <link rel="stylesheet" href="wood.css">
13
  </head>
14
  <body>
15
  <a class="skip" href="#main">Skip to the guide</a>
@@ -172,7 +172,7 @@
172
  })();
173
  </script>
174
  <script type="module" src="/dssl/boot.js"></script>
175
- <link rel="stylesheet/dssl" href="tokens.dssl">
176
- <link rel="stylesheet/dssl" href="live.dssl">
177
  </body>
178
  </html>
 
8
  <link rel="preconnect" href="https://fonts.googleapis.com">
9
  <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
10
  <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,700;9..144,800&family=Hanken+Grotesk:wght@400;500;700&display=swap">
11
+ <!-- absolute paths, so the page works at /showcase/wood and /showcase/wood/index.html alike. wood.css is real CSS built from static.dssl (textures baked in), so the page is styled before any script runs -->
12
+ <link rel="stylesheet" href="/showcase/wood/wood.css">
13
  </head>
14
  <body>
15
  <a class="skip" href="#main">Skip to the guide</a>
 
172
  })();
173
  </script>
174
  <script type="module" src="/dssl/boot.js"></script>
175
+ <link rel="stylesheet/dssl" href="/showcase/wood/tokens.dssl">
176
+ <link rel="stylesheet/dssl" href="/showcase/wood/live.dssl">
177
  </body>
178
  </html>
scripts/test-v0100.mjs CHANGED
@@ -296,6 +296,7 @@ await withBrowser(async ({ open, errors }) => {
296
  await withBrowser(async ({ open }) => {
297
  const p = await open('/showcase/wood/index.html');
298
  await p.waitForFunction('window.DSSL'); await p.waitForTimeout(800);
 
299
  ok('and none on a 390px phone', !(await p.evaluate(() => document.documentElement.scrollWidth > innerWidth)));
300
  }, { viewport: { width: 390, height: 844 } });
301
 
 
296
  await withBrowser(async ({ open }) => {
297
  const p = await open('/showcase/wood/index.html');
298
  await p.waitForFunction('window.DSSL'); await p.waitForTimeout(800);
299
+ ok('every file the page links to is an absolute path, so the clean URL /showcase/wood works too', !/(href|src)="(?!https?:|\/|#|data:)[^"]+\.(css|dssl|js)"/.test(readFileSync(new URL('../public/showcase/wood/index.html', import.meta.url), 'utf8')));
300
  ok('and none on a 390px phone', !(await p.evaluate(() => document.documentElement.scrollWidth > innerWidth)));
301
  }, { viewport: { width: 390, height: 844 } });
302