Skip to content

Commit

Permalink
docs: add Stainless to sponsors
Browse files Browse the repository at this point in the history
  • Loading branch information
mrlubos committed Dec 16, 2024
1 parent 4d1a729 commit 964d0ad
Show file tree
Hide file tree
Showing 37 changed files with 425 additions and 33 deletions.
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,15 @@ Please visit our [website](https://heyapi.dev/) for documentation, guides, migra

## Sponsoring

Love Hey API? Please consider becoming a [sponsor](https://github.com/sponsors/hey-api).
Love Hey API? Become our [sponsor](https://github.com/sponsors/hey-api).

<ul>
<li>
<a href="https://stainlessapi.com/" target="_blank">
<img alt="Stainless logo" height="100" src="https://heyapi.dev/images/stainless-logo-wordmark-480w.png" />
</a>
</li>
</ul>

## GitHub Integration (coming soon)

Expand Down
56 changes: 48 additions & 8 deletions docs/.vitepress/theme/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -67,16 +67,30 @@ iframe {
text-align: center;
}

.home-list li {
.home-list li,
.sponsors-list li {
list-style: none;
}

.home-list > ul {
display: flex;
.home-list.sponsors-list > ul {
justify-content: center;
}

.home-list > ul,
.sponsors-list > ul {
align-items: center;
display: flex;
flex-direction: column;
row-gap: 2rem;
column-gap: 3rem;
padding: 0;
}

.home-list > ul:not(:last-child),
.sponsors-list > ul:not(:last-child) {
padding-bottom: 1rem;
}

.home-list > h3 {
color: var(--vp-c-text-2);
display: inline-block;
Expand All @@ -85,7 +99,7 @@ iframe {
text-transform: uppercase;
}

.home-sponsors li {
.sponsors-list li {
align-items: center;
display: flex;
height: 100px;
Expand All @@ -94,19 +108,40 @@ iframe {
width: 100%;
}

.home-sponsors-new > a {
.sponsors-list li + li {
margin-top: 0;
}

.sponsors-list li > a {
align-items: center;
border: 1px solid currentColor;
border: 1px solid transparent;
border-radius: 10px;
color: var(--vp-c-text-2);
display: flex;
height: 100%;
justify-content: center;
padding: 1rem;
text-decoration: none;
text-transform: lowercase;
transition: border-color ease-out 300ms;
width: 100%;
}

.sponsors-list li > :is(.vp-doc a[href*='://'], .vp-doc a[target='_blank'])::after
{
display: none;
}

.sponsors-list li > a:hover,
.sponsors-list li > a:focus {
border-color: var(--vp-c-brand-1);
}

/* .sponsors-list-new currently unused, keep in case we want to reuse it again */
.sponsors-list-new > a {
border: 1px solid currentColor;
color: var(--vp-c-text-2);
text-transform: lowercase;
}

.VPFeatures.VPHomeFeatures {
padding: 0;
}
Expand All @@ -132,6 +167,11 @@ iframe {
padding: 0.4rem 3rem;
scroll-padding-inline: 3rem;
}

.home-list > ul,
.sponsors-list > ul {
flex-direction: row;
}
}

@media (min-width: 960px) {
Expand Down
2 changes: 1 addition & 1 deletion docs/about.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Typically, developers of such applications want to:

Doing any of these steps manually quickly becomes a huge time sink as your project grows and APIs evolve. Ideally, you want to spend most time on your application. Hey API allows you to do just that.

We're constantly learning about the ways in which you use our tools. If you have any feedback, please [email us](mailto:[email protected]), [open an issue](https://github.com/hey-api/openapi-ts/issues), or [join a discussion](https://github.com/orgs/hey-api/discussions).
We're constantly learning about the ways in which you use our tools. If you have any feedback, please [email us](mailto:[email protected]), [open an issue](https://github.com/hey-api/openapi-ts/issues), or [join a discussion](https://github.com/orgs/hey-api/discussions).

## Hall of Fame

Expand Down
10 changes: 2 additions & 8 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,11 @@ features:

<br />

<div class="home-list home-sponsors">
<div class="home-list sponsors-list">

### Sponsors

<ul>
<li class="home-sponsors-new">
<a href="mailto:[email protected]?subject=Hey%20API%20sponsorship%20enquiry">
+ your logo
</a>
</li>
</ul>
<!--@include: ./sponsors-list.md-->

</div>

Expand Down
3 changes: 3 additions & 0 deletions docs/openapi-ts/plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,3 +163,6 @@ export default {
],
};
```

<!--@include: ../examples.md-->
<!--@include: ../sponsorship.md-->
2 changes: 2 additions & 0 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@
"scripts": {
"build": "vitepress build",
"dev": "vitepress dev",
"optimize-images": "node scripts/optimize-images.js",
"preview": "vitepress preview"
},
"dependencies": {
"@stackblitz/sdk": "1.11.0"
},
"devDependencies": {
"sharp": "0.33.5",
"vitepress": "1.3.0"
}
}
Binary file added docs/public/images/stainless-logo-1200w.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/public/images/stainless-logo-1200w.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/public/images/stainless-logo-1200w.webp
Binary file not shown.
Binary file added docs/public/images/stainless-logo-480w.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/public/images/stainless-logo-480w.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/public/images/stainless-logo-480w.webp
Binary file not shown.
Binary file added docs/public/images/stainless-logo-768w.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/public/images/stainless-logo-768w.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/public/images/stainless-logo-768w.webp
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file added docs/public/raw/stainless-logo-wordmark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/public/raw/stainless-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
52 changes: 52 additions & 0 deletions docs/scripts/optimize-images.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
import fs from 'node:fs';
import path from 'node:path';

import sharp from 'sharp';

const inputDir = 'public/raw';
const outputDir = 'public/images';

const supportedExtensions = ['.png', '.jpg', '.jpeg', '.webp'];
const sizes = [480, 768, 1200];
const formats = ['png', 'webp', 'jpeg'];

if (fs.existsSync(outputDir)) {
fs.rmSync(outputDir, { force: true, recursive: true });
}

fs.mkdirSync(outputDir, { recursive: true });

async function processImages() {
const files = fs.readdirSync(inputDir);

for (const file of files) {
const inputPath = path.join(inputDir, file);
const ext = path.extname(file).toLowerCase();
const baseName = path.basename(file, ext);

if (!supportedExtensions.includes(ext)) {
continue;
}

console.log(`Processing ${file}...`);

for (const size of sizes) {
for (const format of formats) {
const outputFileName = `${baseName}-${size}w.${format}`;
const outputPath = path.join(outputDir, outputFileName);

await sharp(inputPath)
.resize(size)
.toFormat(format, { quality: 80 })
.toFile(outputPath);

console.log(`Generated: ${outputFileName}`);
}
}
}
console.log('✅ Image optimization complete!');
}

processImages().catch((err) => {
console.error('❌ Error optimizing images:', err);
});
12 changes: 12 additions & 0 deletions docs/sponsors-list.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<ul>
<li>
<a href="https://stainlessapi.com/" target="_blank">
<picture>
<source srcset="/images/stainless-logo-wordmark-480w.webp" media="(max-width: 480px)" type="image/webp" />
<source srcset="/images/stainless-logo-wordmark-768w.webp" media="(max-width: 768px)" type="image/webp" />
<source srcset="/images/stainless-logo-wordmark-1200w.webp" media="(min-width: 769px)" type="image/webp" />
<img alt="Stainless logo" loading="lazy" src="/images/stainless-logo-wordmark-1200w.png" />
</picture>
</a>
</li>
</ul>
8 changes: 7 additions & 1 deletion docs/sponsorship.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## Sponsoring

Love Hey API? Please consider becoming a [sponsor](https://github.com/sponsors/hey-api).
Love Hey API? Become our [sponsor](https://github.com/sponsors/hey-api).

<div class="sponsors-list">

<!--@include: ./sponsors-list.md-->

</div>
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
},
"license": "FSL-1.1-MIT",
"author": {
"email": "[email protected]",
"email": "[email protected]",
"name": "Lubos Menus",
"url": "https://lmen.us"
},
Expand Down
10 changes: 9 additions & 1 deletion packages/client-axios/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,15 @@ Please visit our [website](https://heyapi.dev/) for documentation, guides, migra

## Sponsoring

Love Hey API? Please consider becoming a [sponsor](https://github.com/sponsors/hey-api).
Love Hey API? Become our [sponsor](https://github.com/sponsors/hey-api).

<ul>
<li>
<a href="https://stainlessapi.com/" target="_blank">
<img alt="Stainless logo" height="100" src="https://heyapi.dev/images/stainless-logo-wordmark-480w.png" />
</a>
</li>
</ul>

## GitHub Integration (coming soon)

Expand Down
2 changes: 1 addition & 1 deletion packages/client-axios/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
},
"license": "MIT",
"author": {
"email": "[email protected]",
"email": "[email protected]",
"name": "Lubos Menus",
"url": "https://lmen.us"
},
Expand Down
10 changes: 9 additions & 1 deletion packages/client-fetch/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,15 @@ Please visit our [website](https://heyapi.dev/) for documentation, guides, migra

## Sponsoring

Love Hey API? Please consider becoming a [sponsor](https://github.com/sponsors/hey-api).
Love Hey API? Become our [sponsor](https://github.com/sponsors/hey-api).

<ul>
<li>
<a href="https://stainlessapi.com/" target="_blank">
<img alt="Stainless logo" height="100" src="https://heyapi.dev/images/stainless-logo-wordmark-480w.png" />
</a>
</li>
</ul>

## GitHub Integration (coming soon)

Expand Down
2 changes: 1 addition & 1 deletion packages/client-fetch/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
},
"license": "MIT",
"author": {
"email": "[email protected]",
"email": "[email protected]",
"name": "Lubos Menus",
"url": "https://lmen.us"
},
Expand Down
10 changes: 9 additions & 1 deletion packages/openapi-ts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,15 @@ Please visit our [website](https://heyapi.dev/) for documentation, guides, migra

## Sponsoring

Love Hey API? Please consider becoming a [sponsor](https://github.com/sponsors/hey-api).
Love Hey API? Become our [sponsor](https://github.com/sponsors/hey-api).

<ul>
<li>
<a href="https://stainlessapi.com/" target="_blank">
<img alt="Stainless logo" height="100" src="https://heyapi.dev/images/stainless-logo-wordmark-480w.png" />
</a>
</li>
</ul>

## GitHub Integration (coming soon)

Expand Down
2 changes: 1 addition & 1 deletion packages/openapi-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
},
"license": "FSL-1.1-MIT",
"author": {
"email": "[email protected]",
"email": "[email protected]",
"name": "Lubos Menus",
"url": "https://lmen.us"
},
Expand Down
Loading

0 comments on commit 964d0ad

Please sign in to comment.