Skip to content

Commit

Permalink
Deploying to gh-pages from @ 00a6c8b 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
greggman committed Mar 9, 2024
1 parent 7cfbfd7 commit 164e160
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 10 additions & 0 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -32385,6 +32385,7 @@ function getElem(selector, parent = document) {
}
const sampleListElem = getElem('#samplelist');
const sampleElem = getElem('#sample');
const githubElem = getElem('#src');
const introElem = getElem('#intro');
const codeTabsElem = getElem('#codeTabs');
const sourcesElem = getElem('#sources');
Expand Down Expand Up @@ -32473,6 +32474,15 @@ function setSampleIFrame(sampleInfo, search = '') {
const src = url || `${filename}${search}`;
sampleContainerElem.appendChild(createElem('iframe', { src }));
sampleContainerElem.style.height = sources.length > 0 ? '600px' : '100%';
if (url) {
// If it's remote example, hide the github link and assume it's in the description.
githubElem.style.display = 'none';
}
else {
// It's a local sample so show the github link.
githubElem.style.display = '';
githubElem.href = `https://github.com/webgpu/webgpu-samples/tree/main/${filename}`;
}
// hide intro and show sample
introElem.style.display = 'none';
sampleElem.style.display = '';
Expand Down
Loading

0 comments on commit 164e160

Please sign in to comment.