Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions _includes/head_custom.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@
}
}
};
const analytics = new oneDS.ApplicationInsights();
analytics.initialize(config, []);
// Initialize analytics only if oneDS is available (may be blocked by ad blockers)
if (typeof oneDS !== 'undefined') {
const analytics = new oneDS.ApplicationInsights();
analytics.initialize(config, []);
} else {
console.warn('OneDS analytics library not loaded (may be blocked by ad blockers)');
}
</script>
210 changes: 108 additions & 102 deletions src/app.html
Original file line number Diff line number Diff line change
@@ -1,31 +1,50 @@
<!DOCTYPE html>
<html lang="en" data-theme="lightmode">
<head>
<meta charset="utf-8" />
<link rel="icon" href="%sveltekit.assets%/favicon.ico" />
<script src="https://wcpstatic.microsoft.com/mscc/lib/v2/wcp-consent.js"></script>
<meta name="viewport" content="width=device-width" />
%sveltekit.head%
<!-- Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-156955408-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() {
dataLayer.push(arguments);

<head>
<meta charset="utf-8" />
<link rel="icon" href="%sveltekit.assets%/favicon.ico" />
<script src="https://wcpstatic.microsoft.com/mscc/lib/v2/wcp-consent.js"></script>
<meta name="viewport" content="width=device-width" />
%sveltekit.head%
<!-- Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-156955408-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() {
dataLayer.push(arguments);
}
gtag('consent', 'default', {
ad_storage: 'denied',
analytics_storage: 'denied'
});
gtag('js', new Date());
gtag('config', 'UA-156955408-1');
</script>
<!-- Adobe/MS Analytics -->
<script type="text/javascript" src="https://js.monitor.azure.com/scripts/c/ms.analytics-web-3.min.js"></script>
<script type="text/javascript">
// Define consent function first
function _getWcpUserConsentDetails() {
if (typeof siteConsent !== 'undefined' && siteConsent) {
return siteConsent.getConsent();
}
gtag('consent', 'default', {
ad_storage: 'denied',
analytics_storage: 'denied'
});
gtag('js', new Date());
gtag('config', 'UA-156955408-1');
</script>
<!-- Adobe/MS Analytics -->
<script
type="text/javascript"
src="https://js.monitor.azure.com/scripts/c/ms.analytics-web-3.min.js"
></script>
<script type="text/javascript">

// The exact value that you return here is dependent on your site, team and how
// use any data that is stored (work with you privacy team to determine what the
// correct "defaults" (true or false) should be for each item when the code is
// unable to determine (via WCP) if or what the user has (or has not) consented
// to.
return {
Required: [true], // Most likely `true`
Analytics: [true],
SocialMedia: [true],
Advertising: [false]
};
}

// Initialize analytics only if oneDS is available (may be blocked by ad blockers)
if (typeof oneDS !== 'undefined') {
const analytics = new oneDS.ApplicationInsights();
var config = {
instrumentationKey:
Expand All @@ -41,89 +60,76 @@
userConsentDetails: _getWcpUserConsentDetails
},

env: 'PROD' // Environment can be set to PPE or PROD as needed.
},
webAnalyticsConfiguration: {
// Web Analytics Plugin configuration
//urlCollectQuery:true,
autoCapture: {
scroll: true,
pageView: true,
onLoad: true,
onUnload: true,
click: true,
resize: true,
jsError: true
}
}
};
//Initialize SDK
analytics.initialize(config, []);
</script>
</head>
<body data-sveltekit-preload-data="hover">
<div id="cookie-banner"></div>
<div style="display: contents">%sveltekit.body%</div>
</body>
<script>
let choices = {
marketing: false,
tracking: false,
analytics: {
label: 'Analytics',
description:
'We use analytics cookies to track visits, helping create a better experience for you!',
value: true
env: 'PROD' // Environment can be set to PPE or PROD as needed.
},
necessary: {
label: 'Necessary',
description: 'Used for cookie control.',
value: true
webAnalyticsConfiguration: {
// Web Analytics Plugin configuration
//urlCollectQuery:true,
autoCapture: {
scroll: true,
pageView: true,
onLoad: true,
onUnload: true,
click: true,
resize: true,
jsError: true
}
}
};
//Initialize SDK
analytics.initialize(config, []);
} else {
console.warn('OneDS analytics library not loaded (may be blocked by ad blockers)');
}
</script>
</head>

var siteConsent = null;
WcpConsent.init(
'en-US',
'cookie-banner',
function (err, _siteConsent) {
if (!err) {
siteConsent = _siteConsent; //siteConsent is used to get the current consent
} else {
console.log('Error initializing WcpConsent: ' + err);
}
},
onConsentChanged,
WcpConsent.themes.light
);
<body data-sveltekit-preload-data="hover">
<div id="cookie-banner"></div>
<div style="display: contents">%sveltekit.body%</div>
</body>
<script>
let choices = {
marketing: false,
tracking: false,
analytics: {
label: 'Analytics',
description:
'We use analytics cookies to track visits, helping create a better experience for you!',
value: true
},
necessary: {
label: 'Necessary',
description: 'Used for cookie control.',
value: true
}
};

function _getWcpUserConsentDetails() {
if (siteConsent) {
return siteConsent.getConsent();
var siteConsent = null;
WcpConsent.init(
'en-US',
'cookie-banner',
function (err, _siteConsent) {
if (!err) {
siteConsent = _siteConsent; //siteConsent is used to get the current consent
} else {
console.log('Error initializing WcpConsent: ' + err);
}
},
onConsentChanged,
WcpConsent.themes.light
);

// The exact value that you return here is dependent on your site, team and how
// use any data that is stored (work with you privacy team to determine what the
// correct "defaults" (true or false) should be for each item when the code is
// unable to determine (via WCP) if or what the user has (or has not) consented
// to.
return {
Required: [true], // Most likely `true`
Analytics: [true],
SocialMedia: [true],
Advertising: [false]
};
function onConsentChanged(categoryPreferences) {
if (categoryPreferences.Analytics) {
// Google Analytics
gtag('consent', 'update', {
ad_storage: 'granted',
analytics_storage: 'granted'
});
// Adobe Analytics
}
}
</script>

function onConsentChanged(categoryPreferences) {
if (categoryPreferences.Analytics) {
// Google Analytics
gtag('consent', 'update', {
ad_storage: 'granted',
analytics_storage: 'granted'
});
// Adobe Analytics
}
}
</script>
</html>
</html>
2 changes: 1 addition & 1 deletion src/routes/+layout.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export const prerender = true;
export const prerender = true; // Fully static site
export const load = ({ url }) => {
const { pathname } = url;

Expand Down
4 changes: 2 additions & 2 deletions src/routes/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,15 @@
<meta property="og:type" content="website" />
</svelte:head>
<div class="selection:bg-info">
{#if !$page.url.pathname.startsWith('/blogs/')}
{#if !$page.url.pathname.startsWith('/blogs/') && !$page.url.pathname.startsWith('/models/')}
<Header />
{/if}
{#key data.pathname}
<div id="main-content" in:fade={{ duration: 300, delay: 400 }} out:fade={{ duration: 300 }}>
<slot />
</div>
{/key}
{#if !$page.url.pathname.startsWith('/blogs/')}
{#if !$page.url.pathname.startsWith('/blogs/') && !$page.url.pathname.startsWith('/models/')}
<Footer />
{/if}
</div>
13 changes: 13 additions & 0 deletions src/routes/models/+layout.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<script lang="ts">
import Header from '../components/header.svelte';
import Footer from '../components/footer.svelte';
import { page } from '$app/stores';
</script>

<div class="selection:bg-info">
<Header />
<div id="main-content">
<slot />
</div>
<Footer pathvar="../." />
</div>
70 changes: 57 additions & 13 deletions src/routes/models/+page.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
<script>
let modelhubs = [
{
title: 'Foundry Local Models',
description:
'Discover AI models optimized for local deployment on NPUs, GPUs, and CPUs. Search and filter by device support, family, and more.',
url: '/models/foundry',
image: '🏭',
imagealt: 'Foundry Models',
isInternal: true,
featured: true
},
{
title: 'ONNX Community (hosted on Hugging Face)',
description:
Expand Down Expand Up @@ -43,9 +53,9 @@
];

let description =
'ONNX Models - find ONNX models for natural language processing, computer vision, and more.';
'ONNX Models - find ONNX models for natural language processing, computer vision, and more. Explore Foundry local models optimized for NPUs, GPUs, and CPUs.';
let keywords =
'onnx models, onnx model zoo, onnx community, onnx models huggingface, onnx models qualcomm';
'onnx models, foundry models, npu models, gpu models, cpu models, local ai models, onnx model zoo, onnx community, onnx models huggingface, onnx models qualcomm';
</script>

<svelte:head>
Expand All @@ -63,23 +73,57 @@
<p>
ONNX is the Open Neural Network Exchange, and we take that name to heart! Many members of the
community upload their ONNX models to various repositories, and we want to make it easy for you
to find them. Below are some of the most popular repositories where you can find ONNX models:
to find them. Check out our featured Foundry Local Models collection, or explore the popular
repositories below:
</p>

<div class="my-8 grid grid-cols-1 md:grid-cols-2 gap-8">
{#each modelhubs as modelhub}
<div class="card bg-success image-full transition hover:scale-105">
<a rel="noopener noreferrer" target="_blank" href={modelhub.url} class="card-body">
<div class="grid grid-cols-5">
<div class="h-full">
<img src={modelhub.image} alt={modelhub.imagealt} class="w-24" />
<div
class="card transition hover:scale-105"
class:bg-gradient-to-r={modelhub.featured}
class:from-blue-600={modelhub.featured}
class:to-purple-600={modelhub.featured}
class:bg-success={!modelhub.featured}
class:image-full={true}
class:ring-4={modelhub.featured}
class:ring-blue-300={modelhub.featured}
class:shadow-2xl={modelhub.featured}
>
{#if modelhub.isInternal}
<a href={modelhub.url} class="card-body">
<div class="grid grid-cols-5">
<div class="h-full flex items-center justify-center">
{#if typeof modelhub.image === 'string' && modelhub.image.startsWith('http')}
<img src={modelhub.image} alt={modelhub.imagealt} class="w-24" />
{:else}
<span class="text-6xl">{modelhub.image}</span>
{/if}
</div>
<div class="col-span-4">
<h2 class="card-title text-white">
{modelhub.title}
{#if modelhub.featured}
<span class="badge badge-accent">Featured!</span>
{/if}
</h2>
<p class="text-white">{modelhub.description}</p>
</div>
</div>
<div class="col-span-4">
<h2 class="card-title text-white">{modelhub.title}</h2>
<p class="text-white">{modelhub.description}</p>
</a>
{:else}
<a rel="noopener noreferrer" target="_blank" href={modelhub.url} class="card-body">
<div class="grid grid-cols-5">
<div class="h-full">
<img src={modelhub.image} alt={modelhub.imagealt} class="w-24" />
</div>
<div class="col-span-4">
<h2 class="card-title text-white">{modelhub.title}</h2>
<p class="text-white">{modelhub.description}</p>
</div>
</div>
</div>
</a>
</a>
{/if}
</div>
{/each}
</div>
Expand Down
Loading
Loading