Skip to content
Open
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
15 changes: 12 additions & 3 deletions src/components/Supporters/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,22 @@ import SectionContainer from "../sectionContainer";
import Translate from "@docusaurus/Translate";
import Link from "@docusaurus/Link";
import useDocusaurusContext from "@docusaurus/useDocusaurusContext";
import ThemedImage from "@theme/ThemedImage";
import useBaseUrl from "@docusaurus/useBaseUrl";
import "./index.scss";

const supportList = [
{
name: "HuaweiCloud",
img_src: "img/supporters/huawei.png",
img_src: "img/supporters/huawei.svg",
img_src_dark: "img/supporters/huawei-dark.svg",
external_link: "https://www.huaweicloud.com/",
},

{
name: "OpenEuler",
img_src: "img/supporters/openEuler.svg",
img_src_dark: "img/supporters/openEuler-dark.svg",
external_link: "https://www.openeuler.org/",
},
];
Expand All @@ -34,9 +38,14 @@ export default function Supporters() {
{supportList.map((item, index) => (
<div key={index} className="supporterBox">
<div className="imgContainer">
<Link to={item.external_link}></Link>
<Link to={item.external_link}>
<img alt={item.name} src={item.img_src} />
<ThemedImage
alt={item.name}
sources={{
light: useBaseUrl(item.img_src),
dark: useBaseUrl(item.img_src_dark || item.img_src),
}}
/>
Comment on lines +42 to +48
</Link>
</div>
</div>
Expand Down
7 changes: 3 additions & 4 deletions src/components/Supporters/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,8 @@
margin: 16px auto;
padding: 5px 15px 15px;
text-align: center;
background-color: #fff;
border-style: solid;
border-width: 0.5px;
border-color: #dde6ed;
background-color: transparent;
border: none;
transition: transform 0.2s;
}

Expand Down Expand Up @@ -55,3 +53,4 @@
}
}
}

Comment on lines 55 to +56
1 change: 1 addition & 0 deletions static/img/supporters/huawei-dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed static/img/supporters/huawei.png
Binary file not shown.
1 change: 1 addition & 0 deletions static/img/supporters/huawei.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 22 additions & 0 deletions static/img/supporters/openEuler-dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading