forked from kubeedge/website
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: Improved table layout on Partners Page (kubeedge#677)
- Loading branch information
1 parent
58b5f42
commit 85d849f
Showing
3 changed files
with
187 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,51 @@ | ||
// import React from "react"; | ||
// import { Row, Col } from "antd"; | ||
// import Layout from "@theme/Layout"; | ||
// import Translate from "@docusaurus/Translate"; | ||
// import useDocusaurusContext from "@docusaurus/useDocusaurusContext"; | ||
// import PartnersData from "./partners.mdx"; | ||
// import "./index.scss"; | ||
|
||
// export default function Partners() { | ||
|
||
// return ( | ||
// <Layout> | ||
// <div className="partners-pages"> | ||
// <div className="partners-header"> | ||
// <h1 className="partners"> | ||
// <Translate>KubeEdge Distributions, Hosted Platforms, and Installers</Translate> | ||
// </h1> | ||
// </div> | ||
// <div className="partners-content"> | ||
// <div className="partners-md"> | ||
// <PartnersData /> | ||
// </div> | ||
// </div> | ||
// </div> | ||
// </Layout> | ||
// ); | ||
// } | ||
import React from "react"; | ||
import { Row, Col } from "antd"; | ||
import Layout from "@theme/Layout"; | ||
import Translate from "@docusaurus/Translate"; | ||
import useDocusaurusContext from "@docusaurus/useDocusaurusContext"; | ||
import PartnersData from "./partners.mdx"; | ||
import PartnersData from "@site/src/pages/partners/partners.mdx"; // Ensure correct path | ||
import "./index.scss"; | ||
|
||
export default function Partners() { | ||
|
||
return ( | ||
<Layout> | ||
<div className="partners-pages"> | ||
<div className="partners-header"> | ||
<h1 className="partners"> | ||
<Translate>KubeEdge Distributions, Hosted Platforms, and Installers</Translate> | ||
</h1> | ||
</div> | ||
<div className="partners-content"> | ||
<div className="partners-md"> | ||
<PartnersData /> | ||
</div> | ||
</div> | ||
</div> | ||
</Layout> | ||
); | ||
return ( | ||
<Layout title="KubeEdge Partners"> | ||
<div className="partners-pages"> | ||
<div className="partners-header"> | ||
<h1 className="partners"> | ||
KubeEdge Distributions, Hosted Platforms, and Installers | ||
</h1> | ||
</div> | ||
<div className="partners-content"> | ||
<div className="partners-md"> | ||
<PartnersData /> {/* Ensure this is used correctly */} | ||
</div> | ||
</div> | ||
</div> | ||
</Layout> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,130 @@ | ||
// .partners-pages { | ||
// background-color: var(--ifm-background-color); | ||
|
||
// .partners-header { | ||
// height: 350px; | ||
// display: flex; | ||
// flex-direction: column; | ||
// justify-content: center; | ||
// align-items: center; | ||
// background-image: url("/img/partners.jpg"); | ||
// background-repeat: no-repeat; | ||
// background-size: cover; | ||
|
||
// .partners { | ||
// font-size: 40px; | ||
// font-weight: 700; | ||
// color: white; | ||
// } | ||
|
||
// } | ||
|
||
// .partners-content { | ||
// display: flex; | ||
// justify-content: center; | ||
// margin: 50px 0; | ||
|
||
// .partners-md { | ||
// width: 60%; | ||
// } | ||
// } | ||
// } | ||
|
||
.partners-pages { | ||
background-color: var(--ifm-background-color); | ||
padding: 20px; | ||
} | ||
|
||
.partners-header { | ||
height: 350px; | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: center; | ||
align-items: center; | ||
background-image: url("/img/partners.jpg"); | ||
background-repeat: no-repeat; | ||
background-size: cover; | ||
|
||
.partners { | ||
font-size: 40px; | ||
font-weight: 700; | ||
color: white; | ||
} | ||
.partners-header { | ||
height: 350px; | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: center; | ||
align-items: center; | ||
background-image: url("/img/partners.jpg"); | ||
background-repeat: no-repeat; | ||
background-size: cover; | ||
background-position: center; | ||
text-align: center; | ||
|
||
.partners { | ||
font-size: 40px; | ||
font-weight: 700; | ||
color: white; | ||
} | ||
} | ||
|
||
.partners-content { | ||
display: flex; | ||
justify-content: center; | ||
margin: 50px 0; | ||
} | ||
|
||
.partners-md { | ||
width: 85%; /* Reduce width for better margins */ | ||
max-width: 1200px; /* Keep it centered */ | ||
background-color: white; /* Ensure background is visible */ | ||
padding: 20px; | ||
border-radius: 8px; /* Slight rounding for better aesthetics */ | ||
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); | ||
} | ||
|
||
/* Table Styling */ | ||
table { | ||
width: 100%; | ||
border-collapse: collapse; | ||
border-spacing: 0; | ||
margin: 20px 0; /* Add margin to keep spacing */ | ||
} | ||
|
||
th, | ||
td { | ||
padding: 12px 15px; | ||
text-align: left; | ||
border: 1px solid #ddd; | ||
} | ||
|
||
th { | ||
background-color: var(--ifm-color-primary); | ||
color: white; | ||
text-align: center; | ||
} | ||
|
||
/* Column Width Adjustments */ | ||
th:nth-child(1), | ||
td:nth-child(1) { | ||
/* Organization/Company */ | ||
width: 18%; | ||
text-align: center; | ||
} | ||
|
||
th:nth-child(2), | ||
td:nth-child(2) { | ||
/* Product */ | ||
width: 15%; /* Reduced width */ | ||
text-align: center; | ||
} | ||
|
||
th:nth-child(3), | ||
td:nth-child(3) { | ||
/* Description */ | ||
width: 50%; /* Expanded */ | ||
} | ||
|
||
.partners-content { | ||
display: flex; | ||
justify-content: center; | ||
margin: 50px 0; | ||
th:nth-child(4), | ||
td:nth-child(4) { | ||
/* Website */ | ||
width: 17%; | ||
text-align: center; | ||
} | ||
|
||
/* Hyperlink Styling */ | ||
td a { | ||
color: var(--ifm-color-primary); | ||
text-decoration: none; | ||
font-weight: bold; | ||
} | ||
|
||
.partners-md { | ||
width: 60%; | ||
} | ||
} | ||
} | ||
td a:hover { | ||
text-decoration: underline; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters