Skip to content

Commit

Permalink
Merge pull request #333 from v-jostruve/main
Browse files Browse the repository at this point in the history
update community gallery
  • Loading branch information
v-jostruve authored May 10, 2024
2 parents 532f20b + 2a3c47a commit 835a42e
Show file tree
Hide file tree
Showing 2 changed files with 171 additions and 20 deletions.
48 changes: 38 additions & 10 deletions website/src/components/gallery/ShowcaseCard/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,27 +112,53 @@ function ShowcaseMultipleAuthorsDropdown({ user }: { user: User }) {
}


function ShowcaseCard({user}: {user: User}) {
function ShowcaseCard({ user }: { user: User }) {
// Function to determine if the URL contains a specific tracking parameter
function urlContainsParameter(url, parameter) {
return url.includes(parameter);
}

// Determine the URL to use
let urlToUse = user.source;

// Check if the URL contains the tracking parameter "?ocid=buildia24_LL_website"
if (!urlContainsParameter(urlToUse, '?ocid=buildia24_LL_website')) {
// If the tracking parameter "?ocid=buildia24_LL_website" is not present, append "?ocid=buildia24_gallery_website"

const trackingParameter = '?ocid=buildia24_gallery_website';

// Check if the URL already has query parameters
if (urlToUse.includes('?')) {
// URL already has parameters, use '&' to append the new parameter
urlToUse += `&ocid=buildia24_gallery_website`;
} else {
// URL does not have any parameters, use '?' to append the new parameter
urlToUse += trackingParameter;
}
}

// Return the card with the determined URL
return (
<li key={user.title} className="card">
<Link className="card-link" to={`${user.source}?ocid=buildia24_gallery_website`} data-bi-area="BodyGrid" data-bi-name={user.title}>
<Link
className="card-link"
to={urlToUse}
data-bi-area="BodyGrid"
data-bi-name={user.title}
>
{/* Image goes here */}
{/* <div className={clsx('card__image', styles.showcaseCardImage)}>
<Image img={user.preview} alt={user.title} />
</div> */}
<div className="card__body">
<div>
<h3>
{user.title}
</h3>
{user.source && (
<ShowcaseMultipleAuthorsDropdown user={user}/>
)}
<h3>{user.title}</h3>
{user.source && <ShowcaseMultipleAuthorsDropdown user={user} />}
</div>
<p>{user.description}</p>
{/* {user.tags.includes('featured') && (
<FavoriteIcon svgClass={styles.svgIconFavorite} size="small" />
)} */}
<FavoriteIcon svgClass={styles.svgIconFavorite} size="small" />
)} */}
</div>
<div className={clsx('card__footer', styles.cardFooter)}>
<div className="margin-bottom--md">
Expand All @@ -145,4 +171,6 @@ function ShowcaseCard({user}: {user: User}) {
}




export default React.memo(ShowcaseCard);
143 changes: 133 additions & 10 deletions website/static/templates.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,133 @@
[
{
"title": "Ask the Expert: Learn Live | Build Intelligent Apps with Serverless Containers on Azure Container Apps",
"description": "Leverage Azure Developer CLI (azd) to deploy intelligent apps on ACA",
"preview": "",
"website": "https://learn.microsoft.com/en-us/shows/Ask-the-Expert/",
"author": "Ask the Expert",
"source": "https://aka.ms/serverless-learn-live/ep1",
"tags": [
"featured",
"azurecontainerapps",
"azureopenai",
"ai",
"video",
"serverless"
]
},
{
"title": "Ask the Expert: Learn Live | From Day Zero To Production with Azure Container Apps",
"description": "Take your intelligent apps to production with ACA using Bicep and GitHub Actions",
"preview": "",
"website": "https://learn.microsoft.com/en-us/shows/Ask-the-Expert/",
"author": "Ask the Expert",
"source": "https://aka.ms/serverless-learn-live/ep2",
"tags": [
"featured",
"azurecontainerapps",
"azureopenai",
"ai",
"video",
"serverless"
]
},
{
"title": "Ask the Expert: Learn Live | Azure Container Apps uncovered: Scenarios, workloads, and portability",
"description": "Learn how to build portable, intelligent cloud native apps with ACA and Dapr",
"preview": "",
"website": "https://learn.microsoft.com/en-us/shows/Ask-the-Expert/",
"author": "Ask the Expert",
"source": "https://aka.ms/serverless-learn-live/ep3",
"tags": [
"featured",
"azurecontainerapps",
"azureopenai",
"ai",
"video",
"serverless"
]
},
{
"title": "Ask the Expert: Learn Live | Build Intelligent Apps with .NET and Serverless on Azure",
"description": "Leverage the power of Serverless on Azure and Azure OpenAI with .NET",
"preview": "",
"website": "https://learn.microsoft.com/en-us/shows/Ask-the-Expert/",
"author": "Ask the Expert",
"source": "https://aka.ms/serverless-learn-live/ep4",
"tags": [
"featured",
"azurecontainerapps",
"azureopenai",
"ai",
"video",
"serverless"
]
},
{
"title": "Ask the Expert: Learn Live | Deploying Intelligent Apps with OpenAI on Azure Kubernetes Service",
"description": "Learn how to leverage Azure OpenAI with the AKS Store Demo app.",
"preview": "",
"website": "https://learn.microsoft.com/en-us/shows/Ask-the-Expert/",
"author": "Ask the Expert",
"source": "https://aka.ms/learn-live-building-intelligent-apps-aks-ep1?ocid=buildia24_LL_website",
"tags": [
"featured",
"azurekubernetesservice",
"azurefunctions",
"ai",
"video",
"kubernetes"
]
},
{
"title": "Ask the Expert: Learn Live | Bring Your Own AI Models to Intelligent Apps on AKS with Kaito",
"description": "Use AKS to run your own AI Models with Kaito.",
"preview": "",
"website": "https://learn.microsoft.com/en-us/shows/Ask-the-Expert/",
"author": "Ask the Expert",
"source": "https://aka.ms/learn-live-building-intelligent-apps-aks-ep2?ocid=buildia24_LL_website",
"tags": [
"featured",
"azurekubernetesservice",
"azurefunctions",
"ai",
"video",
"kubernetes"
]
},
{
"title": "Ask the Expert: Learn Live | Enhance Observability of Your Intelligent Apps on AKS",
"description": "Learn how OpenCost, Prometheus, and Grafana can improve intelligent apps.",
"preview": "",
"website": "https://learn.microsoft.com/en-us/shows/Ask-the-Expert/",
"author": "Ask the Expert",
"source": "https://aka.ms/learn-live-building-intelligent-apps-aks-ep3?ocid=buildia24_LL_website",
"tags": [
"featured",
"azurekubernetesservice",
"azurefunctions",
"ai",
"video",
"kubernetes"
]
},
{
"title": "Ask the Expert: Learn Live | Taking Your Intelligent App Global with AKS",
"description": "Use AKS and Azure to take your intelligent app global.",
"preview": "",
"website": "https://learn.microsoft.com/en-us/shows/Ask-the-Expert/",
"author": "Ask the Expert",
"source": "https://aka.ms/learn-live-building-intelligent-apps-aks-ep4?ocid=buildia24_LL_website",
"tags": [
"featured",
"azurekubernetesservice",
"azurefunctions",
"ai",
"cosmosdb",
"video",
"kubernetes"
]
},
{
"title": "Ask the Expert: Build Intelligent Apps",
"description": "Join the Azure Functions Product Group this season to learn about FaaS or Functions-as-a-Service in Azure serverless computing. It is time to focus on the pieces of code that matter most to you while Azure Functions handles the rest. Discuss with the experts on how to combine the power of AI, cloud-scale data, and serverless app development to create highly differentiated digital experiences. Develop adaptive, responsive, and personalized experiences by building and modernizing intelligent applications with Azure Functions.",
Expand All @@ -10,7 +139,6 @@
"video",
"azurefunctions",
"azureopenai",
"featured",
"ai"
]
},
Expand All @@ -25,7 +153,6 @@
"video",
"azurecontainerapps",
"azureopenai",
"featured",
"ai"
]
},
Expand All @@ -39,8 +166,7 @@
"tags": [
"video",
"serverless",
"github",
"featured"
"github"
]
},
{
Expand All @@ -53,8 +179,7 @@
"tags": [
"video",
"serverless",
"github",
"featured"
"github"
]
},
{
Expand All @@ -67,8 +192,7 @@
"tags": [
"video",
"serverless",
"github",
"featured"
"github"
]
},
{
Expand All @@ -81,8 +205,7 @@
"tags": [
"video",
"serverless",
"github",
"featured"
"github"
]
},
{
Expand Down

0 comments on commit 835a42e

Please sign in to comment.