forked from loafle/openapi-generator-original
Add sponsor section to the website (#2634)
* add sponsor section * add sponsor title
This commit is contained in:
parent
b5ae21b090
commit
9455fe7bec
4
.gitignore
vendored
4
.gitignore
vendored
@ -41,6 +41,10 @@ packages/
|
||||
/generated-files
|
||||
nbactions.xml
|
||||
|
||||
# website
|
||||
website/build/
|
||||
website/package-lock.json
|
||||
|
||||
# scalatra
|
||||
samples/server-generator/scalatra/output
|
||||
samples/server-generator/scalatra/target
|
||||
|
5
website/dynamic/sponsors.yml
Normal file
5
website/dynamic/sponsors.yml
Normal file
@ -0,0 +1,5 @@
|
||||
-
|
||||
caption: "NamSor"
|
||||
image: "img/companies/namsor.png"
|
||||
infoLink: "https://www.namsor.com/?utm_source=openapi_generator&utm_medium=official_website&utm_campaign=sponsor"
|
||||
bronze: true
|
@ -28,6 +28,11 @@
|
||||
image: "img/companies/pepabo.png"
|
||||
infoLink: "https://pepabo.com/en/"
|
||||
pinned: false
|
||||
-
|
||||
caption: "GoDaddy"
|
||||
image: "img/companies/godaddy.png"
|
||||
infoLink: "https://www.godaddy.com/"
|
||||
pinned: false
|
||||
-
|
||||
caption: JustStar
|
||||
image: "img/companies/juststar.png"
|
||||
@ -43,6 +48,11 @@
|
||||
image: "img/companies/metaswitch.svg"
|
||||
infoLink: "https://www.metaswitch.com/"
|
||||
pinned: true
|
||||
-
|
||||
caption: NamSor
|
||||
image: "img/companies/namsor.png"
|
||||
infoLink: "https://www.namsor.com/?utm_source=openapi_generator&utm_medium=official_website&utm_campaign=sponsor"
|
||||
pinned: false
|
||||
-
|
||||
caption: Myworkout
|
||||
image: "img/companies/myworkout.png"
|
||||
@ -88,6 +98,11 @@
|
||||
image: "img/companies/unblu.svg"
|
||||
infoLink: "https://www.unblu.com/"
|
||||
pinned: true
|
||||
-
|
||||
caption: Xero
|
||||
image: "img/companies/xero.png"
|
||||
infoLink: "https://www.xero.com/"
|
||||
pinned: false
|
||||
-
|
||||
caption: Zalando
|
||||
image: "img/companies/zalando.jpg"
|
||||
|
@ -94,6 +94,9 @@
|
||||
"generators/csharp-nancyfx": {
|
||||
"title": "generators/csharp-nancyfx"
|
||||
},
|
||||
"generators/csharp-netcore": {
|
||||
"title": "generators/csharp-netcore"
|
||||
},
|
||||
"generators/csharp-refactor": {
|
||||
"title": "generators/csharp-refactor"
|
||||
},
|
||||
@ -202,6 +205,9 @@
|
||||
"generators/jaxrs-cxf-client": {
|
||||
"title": "generators/jaxrs-cxf-client"
|
||||
},
|
||||
"generators/jaxrs-cxf-extended": {
|
||||
"title": "generators/jaxrs-cxf-extended"
|
||||
},
|
||||
"generators/jaxrs-cxf": {
|
||||
"title": "generators/jaxrs-cxf"
|
||||
},
|
||||
@ -277,6 +283,9 @@
|
||||
"generators/python-aiohttp": {
|
||||
"title": "generators/python-aiohttp"
|
||||
},
|
||||
"generators/python-blueplanet": {
|
||||
"title": "generators/python-blueplanet"
|
||||
},
|
||||
"generators/python-flask": {
|
||||
"title": "generators/python-flask"
|
||||
},
|
||||
@ -313,12 +322,21 @@
|
||||
"generators/scala-gatling": {
|
||||
"title": "generators/scala-gatling"
|
||||
},
|
||||
"generators/scala-httpclient-deprecated": {
|
||||
"title": "generators/scala-httpclient-deprecated"
|
||||
},
|
||||
"generators/scala-httpclient": {
|
||||
"title": "generators/scala-httpclient"
|
||||
},
|
||||
"generators/scala-lagom-server": {
|
||||
"title": "generators/scala-lagom-server"
|
||||
},
|
||||
"generators/scala-play-framework": {
|
||||
"title": "generators/scala-play-framework"
|
||||
},
|
||||
"generators/scala-play-server": {
|
||||
"title": "generators/scala-play-server"
|
||||
},
|
||||
"generators/scalatra": {
|
||||
"title": "generators/scalatra"
|
||||
},
|
||||
|
@ -323,10 +323,36 @@ class Index extends React.Component {
|
||||
);
|
||||
};
|
||||
|
||||
const Sponsors = () => {
|
||||
if ((siteConfig.sponsors || []).length === 0) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const bronze_sponsors = siteConfig.sponsors
|
||||
.filter(user => user.bronze)
|
||||
.map(user => (
|
||||
<a href={user.infoLink} key={user.infoLink}>
|
||||
<img src={baseUrl + user.image} alt={user.caption} title={user.caption} />
|
||||
</a>
|
||||
));
|
||||
|
||||
const pageUrl = page => baseUrl + (language ? `${language}/` : '') + page;
|
||||
|
||||
return (
|
||||
<div className="productSponsorSection paddingBottom">
|
||||
<h2><b>Sponsors</b></h2>
|
||||
<p>If you find OpenAPI Generator useful for work, please consider asking your company to support this Open Source project by <a href="https://opencollective.com/openapi_generator">becoming a sponsor</a>. You can also individually sponsor the project by <a href="https://opencollective.com/openapi_generator">becoming a backer</a>.</p>
|
||||
<h3>Thank you to our bronze sponsors!</h3>
|
||||
<div className="logos">{bronze_sponsors}</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
return (
|
||||
<div>
|
||||
<HomeSplash siteConfig={siteConfig} language={language} />
|
||||
<div className="mainContainer">
|
||||
<Sponsors />
|
||||
<Features />
|
||||
{/*<FeatureCallout />*/}
|
||||
<LearnHow />
|
||||
|
@ -9,6 +9,7 @@ const loadYaml = relativePath => parseYaml(fs.readFileSync(path.join(__dirname,
|
||||
|
||||
const team = loadYaml("dynamic/team.yml");
|
||||
const users = loadYaml("dynamic/users.yml");
|
||||
const sponsors = loadYaml("dynamic/sponsors.yml");
|
||||
const baseUrl = '/';
|
||||
const siteConfig = {
|
||||
title: 'OpenAPI Generator', // Title for your website.
|
||||
@ -105,6 +106,8 @@ const siteConfig = {
|
||||
repoUrl: 'https://github.com/OpenAPITools/openapi-generator',
|
||||
|
||||
team: team,
|
||||
|
||||
sponsors: sponsors,
|
||||
};
|
||||
|
||||
module.exports = siteConfig;
|
||||
|
BIN
website/static/img/companies/godaddy.png
Normal file
BIN
website/static/img/companies/godaddy.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 16 KiB |
BIN
website/static/img/companies/namsor.png
Normal file
BIN
website/static/img/companies/namsor.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 19 KiB |
BIN
website/static/img/companies/xero.png
Normal file
BIN
website/static/img/companies/xero.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 11 KiB |
Loading…
x
Reference in New Issue
Block a user