Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rendering supporters page with API data using a subproject #197

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
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
1 change: 1 addition & 0 deletions gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ const SSR_getSponsoredProjects = async (baseUrl) => {
order: 'name',
per_page: 100,
page: 1,
expand: 'sponsorship_types,sponsorship_types.supporting_companies,sponsorship_types.supporting_companies.company,subprojects,subprojects.sponsorship_types,subprojects.sponsorship_types.supporting_companies,subprojects.sponsorship_types.supporting_companies.company'
}
}).then((response) => response.data.data)
.catch(e => console.log('ERROR: ', e));
Expand Down
1 change: 1 addition & 0 deletions netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
[context.deploy-preview.environment]
GATSBY_API_BASE_URL = "https://testresource-server.openstack.org"
GATSBY_SPONSORED_PROJECT_ID = "3"
GATSBY_SPONSORED_SUPPORTERS_ID = "37"
[[redirects]]
from = "/baidu"
to = "/collateral/ApplicationOfKataContainersInBaiduAICloud.pdf"
Expand Down
16 changes: 0 additions & 16 deletions src/cms/preview-templates/SupportersPagePreview.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,13 @@ const SupportersPagePreview = ({ entry, getAsset, widgetFor }) => {
const entryButtons = entry.getIn(['data', 'buttons'])
const buttons = entryButtons ? entryButtons.toJS() : []

const entryDonors = entry.getIn(['data', 'donors', 'list'])
const donorsList = entryDonors ? entryDonors.toJS() : []

const entryCompanies = entry.getIn(['data', 'companies', 'list'])
const companiesList = entryCompanies ? entryCompanies.toJS() : []

const entrySupport = entry.getIn(['data', 'support', 'list'])
const supportList = entrySupport ? entrySupport.toJS() : []

if (data) {
return(
<SupportersPageTemplate
title={entry.getIn(['data', 'title'])}
subTitle={entry.getIn(['data', 'subTitle'])}
buttons={buttons}
donors={{
title: entry.getIn(['data', 'donors', 'title']),
list: donorsList
}}
companies={{
title: entry.getIn(['data', 'companies', 'title']),
list: companiesList
}}
support={{
text: entry.getIn(['data', 'support', 'text']),
text2: entry.getIn(['data', 'support', 'text2']),
Expand Down
113 changes: 0 additions & 113 deletions src/pages/supporters/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,122 +8,9 @@ seo:
title: Supporting Companies and Infrastructure Donors - Kata Containers
twitterUsername: '@katacontainers'
url: 'https://katacontainers.io/supporters/'
title: Supporters
subTitle: Advancing Kata Containers and growing the community
buttons:
- link: 'mailto:[email protected]'
text: support kata containers
donors:
list:
- alt: Google Cloud
class: img-sponsor-l3
image: /img/logo-google-cloud.svg
link: 'https://cloud.google.com/'
- alt: Microsoft
class: img-sponsor-l3
image: /img/logo-microsoft.svg
link: 'https://www.microsoft.com/'
- alt: Vexxhost
class: img-sponsor-l3
image: /img/logo-vexxhost.svg
link: 'https://vexxhost.com/'
- alt: AWS
class: img-sponsor-l2
image: /img/logo-amazon.svg
link: 'https://aws.amazon.com/'
- alt: packagecloud
class: img-sponsor-l3
image: /img/logo-packagecloud.png
link: 'https://packagecloud.io/'
- alt: packet
class: img-sponsor-l3
image: /img/logo-packet.svg
link: 'https://www.packet.com/'
title: Infrastructure Donors
companies:
list:
- alt: Ampere
class: img-sponsor-l4
image: /img/ampere-lg.jpg
- alt: Ant Group
class: img-sponsor-l4
image: /img/ant-financial-services-group_owler_20210312_151802_original.png
- alt: AT&T
class: img-sponsor-l3-last
image: /img/logo-att.svg
- alt: AWCloud
class: img-sponsor-l4
image: /img/awcloud.png
- alt: 99 Cloud
class: img-sponsor-l4
image: /img/logo-99cloud.jpg
- alt: CISCO
class: img-sponsor-l3-last
image: /img/cisco-lg2.png
- alt: Cleura
class: img-sponsor-l4
image: /img/cleura-lg.jpg
- alt: China Mobile
class: img-sponsor-l4
image: /img/logo-china.svg
- alt: China Telecom
class: img-sponsor-l3-last
image: /img/china-telecom.png
- alt: China Unicom
class: img-sponsor-l4
image: /img/china-unicom.png
- alt: Dell
class: img-sponsor-l4
image: /img/logo-dell.svg
- alt: EasyStack
class: img-sponsor-l3-last
image: /img/logo-easy.svg
- alt: FiberHome
class: img-sponsor-l3-last
image: /img/logo-fiberhome.png
- alt: H3C
class: img-sponsor-l4
image: /img/h3c-lg.jpeg
- alt: Huawei
class: img-sponsor-l4
image: /img/huawei-new-lg.jpg
- alt: Inspur
class: img-sponsor-l3-last
image: /img/inspur-logo.jpg
- alt: Intel
class: img-sponsor-l4
image: /img/intel-lg.png
- alt: Mirantis
class: img-sponsor-l4
image: /img/mirantis-lg.jpg
- alt: NetApp
class: img-sponsor-l3-last
image: /img/logo-netapp.svg
- alt: Red Hat
class: img-sponsor-l4
image: /img/logo-redhat.svg
- alt: Suse
class: img-sponsor-l4
image: /img/logo-suse.svg
- alt: Tencent
class: img-sponsor-l4
image: /img/logo-tencent.jpg
- alt: Troila
class: img-sponsor-l4
image: /img/troila-new-lg.jpg
- alt: Ubuntu
class: img-sponsor-l3-last
image: /img/logo-ubuntu.svg
- alt: United Stack
class: img-sponsor-l4
image: /img/logo-united.svg
- alt: Vexxhost
class: img-sponsor-l4
image: /img/vexxhost.svg
- alt: ZTE
class: img-sponsor-l3-last
image: /img/zte-lg.jpg
title: Companies Supporting Kata Containers
support:
button:
link: 'mailto:[email protected]'
Expand Down
91 changes: 61 additions & 30 deletions src/style/modules/_supporters.scss
Original file line number Diff line number Diff line change
@@ -1,43 +1,74 @@
.supporters-grid {
width: 100%;
display: flex;
flex-wrap: wrap;
gap: 80px 20px;
margin-bottom: 70px;
align-items: center;
text-align: center;
justify-content: space-evenly;
.supporting-company {
img {
width: 245px;
height: auto;
}
}
}

.supporters-grid-others {
width: 100%;
display: flex;
flex-wrap: wrap;
gap: 80px 20px;
margin-bottom: 70px;
align-items: center;
text-align: center;
justify-content: space-evenly;
.supporting-company {
img {
width: 175px;
height: auto;
}
}
}

.container-supporter {
width: 100%;
display: flex;
flex-direction: row;
flex-wrap: wrap;
justify-content: space-around;
align-items: center;
margin-right: -20px;
margin-left: -20px;
width: 100%;
display: flex;
flex-direction: row;
flex-wrap: wrap;
justify-content: space-around;
align-items: center;
margin-right: -20px;
margin-left: -20px;
}

.container-supporter-last {
margin-top: 40px;
margin-bottom: 50px;
justify-content: center;
align-items: center;

display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
margin-top: 40px;
margin-bottom: 50px;
justify-content: center;
align-items: center;

display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
}


.content-supporter{
padding: 20px;
align-self: center;
width: 215px;
.content-supporter {
padding: 20px;
align-self: center;
width: 215px;
}

.content-supporter-lt3 {
padding: 20px;
align-self: center;
width: 285px;
padding: 20px;
align-self: center;
width: 285px;
}

.content-supporter-lt2 {
padding: 20px;
width: 300px;
margin-right: -150px;

}
padding: 20px;
width: 300px;
margin-right: -150px;
}
Loading