Skip to content

Commit

Permalink
fix: change logos to links (#509)
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkComerford committed Nov 1, 2023
1 parent 2c35778 commit 01a900c
Showing 1 changed file with 6 additions and 24 deletions.
30 changes: 6 additions & 24 deletions src/components/TechSupportedByStacks/TechSupportedByStacks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,43 +6,25 @@ import styles from "@site/src/pages/styles.module.css";
const text = {
title: 'Technologies supported by Ensono Stacks',
technologiesSupported: [
{ logo: 'aws.svg', name: 'AWS' }, { logo: 'microsoft-azure.svg', name: 'Microsoft Azure' },
{ logo: 'kubernetes.svg', name: 'Kubernetes' }, { logo: 'terraform.svg', name: 'Terraform' }, { logo: 'docker.svg', name: 'Docker' }, { logo: 'dotnet.svg', name: '.NET' }, { logo: 'nx.svg', name: 'NX' },
{ logo: 'nextjs.svg', name: 'NextJS' }, { logo: 'spring-boot.svg', name: 'Spring Boot' }, { logo: 'azure-data-factory.svg', name: 'Azure Data Factory' }, { logo: 'delta-lake.svg', name: 'Delta lake' }, { logo: 'databricks.svg', name: 'Databricks' },
{ logo: 'java.svg', name: 'Java' }, { logo: 'csharp.svg', name: 'C#' }, { logo: 'typescript.svg', name: 'Typescript' }, { logo: 'python.svg', name: 'Python' },
{ logo: 'aws.svg', name: 'AWS', link: 'https://aws.amazon.com/' }, { logo: 'microsoft-azure.svg', name: 'Microsoft Azure', link: 'https://azure.microsoft.com/' },
{ logo: 'kubernetes.svg', name: 'Kubernetes', link: 'https://kubernetes.io/' }, { logo: 'terraform.svg', name: 'Terraform', link: 'https://www.terraform.io/' }, { logo: 'docker.svg', name: 'Docker', link: 'https://www.docker.com/' }, { logo: 'dotnet.svg', name: '.NET', link: 'https://dotnet.microsoft.com/' }, { logo: 'nx.svg', name: 'NX', link: 'https://nx.dev/' },
{ logo: 'nextjs.svg', name: 'NextJS', link: 'https://nextjs.org/' }, { logo: 'spring-boot.svg', name: 'Spring Boot', link: 'https://spring.io/' }, { logo: 'azure-data-factory.svg', name: 'Azure Data Factory', link: 'https://azure.microsoft.com/products/data-factory' }, { logo: 'delta-lake.svg', name: 'Delta lake', link: 'https://delta.io/' }, { logo: 'databricks.svg', name: 'Databricks', link: 'https://www.databricks.com/' },
{ logo: 'java.svg', name: 'Java', link: 'https://www.java.com/' }, { logo: 'csharp.svg', name: 'C#', link: 'https://dotnet.microsoft.com/languages/csharp' }, { logo: 'typescript.svg', name: 'Typescript', link: 'https://www.typescriptlang.org/' }, { logo: 'python.svg', name: 'Python', link: 'https://www.python.org/' },
]
}

const {title, technologiesSupported} = text

export const TechSupportedByStacks = () => {
const triggerSearch = (term) => {
document.querySelector(".DocSearch-Button").click();
setTimeout(() => {
let input = document.querySelector(".DocSearch-Input");
let lastValue = input.value;
input.value = term;
let event = new Event("input", { bubbles: true });
// hack React15
event.simulated = true;
// hack React16 内部定义了descriptor拦截value,此处重置状态
let tracker = input._valueTracker;
if (tracker) {
tracker.setValue(lastValue);
}
input.dispatchEvent(event);
}, 100);
};

return (
<div className={customStyle.techListContainer}>
<section className={`${styles.section} ${customStyle.section}`}>
<h2 className={`${styles.textCenter} margin-bottom--lg`}>{title}</h2>
<div className={customStyle.techListWrapper}>
{technologiesSupported.map((tech) => {
const {name, logo} = tech
const {name, logo, link} = tech
const imagePath = `/img/icons/technologies-supported/${logo}`
return (<a key={name} onClick={() => triggerSearch(name)}><img src={imagePath} alt={name}/></a>)
return (<a key={name} href={link} target="_blank"><img src={imagePath} alt={name}/></a>)
})}
</div>
</section>
Expand Down

0 comments on commit 01a900c

Please sign in to comment.