Skip to content

Commit 5f3f78e

Browse files
authored
Update backers list, sponsor logos in README and website (#1839)
1 parent 091e71a commit 5f3f78e

14 files changed

+729
-266
lines changed

README.md

+7-3
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,18 @@ Ultra-fast fetching for TypeScript generated automatically from your OpenAPI sch
1414

1515
## ⭐ Sponsors
1616

17-
### Gold Sponsors
17+
### 🥇 Gold Sponsors
1818

1919
<p align="center"><a href="https://zuplo.link/openapi-ts-gh"><img width="128" height="128" alt="Zuplo" src="https://avatars.githubusercontent.com/u/85497839?s=200&v=4"></a></p>
2020

21+
### 🥈 Silver Sponsors
22+
23+
<p align="center"><a href="https://github.com/nanabit-inc"><img width="128" height="128" alt="nanabit" src="https://avatars.githubusercontent.com/u/154126976?s=200&v=4"></a></p>
24+
2125
### Backers
2226

23-
<p align="center"><a href="https://github.com/bddvlpr"><img width="64" height="64" alt="@bddvlpr on GitHub" src="https://avatars.githubusercontent.com/u/17461028?v=4" /></a>
24-
<a href="https://github.com/customerio"><img width="64" height="64" alt="@customerio on GitHub" src="https://avatars.githubusercontent.com/u/1152079?s=200&v=4"></a></p>
27+
<p align="center"><a href="https://github.com/customerio"><img width="64" height="64" alt="@customerio on GitHub" src="https://avatars.githubusercontent.com/u/1152079?s=200&v=4"></a>
28+
<a href="https://github.com/shaunpersad"><img width="64" height="64" alt="@shaunpersad on GitHub" src="https://avatars.githubusercontent.com/u/1702976?s=52&v=4"></a><a href="https://github.com/yoshi2no"><img width="64" height="64" alt="@yoshi2no on GitHub" src="https://avatars.githubusercontent.com/u/57059705?v=4"></a></p>
2529

2630
Become a sponsor by supporting this project on [OpenCollective](https://opencollective.com/openapi-ts)!
2731

docs/.vitepress/config.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { defineConfig } from "vitepress";
2-
import { en } from "./en";
3-
import { zh } from "./zh";
4-
import { shared } from "./shared";
2+
import en from "./en";
3+
import zh from "./zh";
4+
import shared from "./shared";
55

66
// https://vitepress.dev/reference/site-config
77
export default defineConfig({

docs/.vitepress/en.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { defineConfig } from "vitepress";
2+
import sharedConfig from "./shared";
23

3-
export const en = defineConfig({
4+
export default defineConfig({
45
description: "Consume OpenAPI 3.0 & 3.1 schemas in TypeScript",
56
themeConfig: {
67
nav: [
@@ -88,7 +89,6 @@ export const en = defineConfig({
8889
indexName: "openapi-ts",
8990
},
9091
},
91-
socialLinks: [{ icon: "github", link: "https://github.com/openapi-ts/openapi-typescript" }],
9292
footer: {
9393
message:
9494
'Released under the <a href="https://github.com/openapi-ts/openapi-typescript/blob/main/packages/openapi-typescript/LICENSE">MIT License</a>.',

docs/.vitepress/shared.ts

+14-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import { defineConfig } from "vitepress";
1+
import type { UserConfig } from "vitepress";
22
import { zhSearch } from "./zh";
33

44
const HOSTNAME = "https://openapi-ts.dev";
55

6-
export const shared = defineConfig({
6+
const shared: UserConfig = {
77
title: "OpenAPI TypeScript",
88
cleanUrls: true,
99
srcExclude: ["**/*/CONTRIBUTRING.md", "**/*/README.md"],
@@ -34,7 +34,15 @@ export const shared = defineConfig({
3434
locales: { ...zhSearch },
3535
},
3636
},
37-
socialLinks: [{ icon: "github", link: "https://github.com/openapi-ts/openapi-typescript" }],
37+
socialLinks: [
38+
{
39+
icon: {
40+
svg: '<svg fill="#202020" viewBox="0 0 16 16" height="16" width="16" xmlns="http://www.w3.org/2000/svg"><path fill-opacity=".4" d="M12.995 8.195c0 .937-.312 1.912-.78 2.693l1.99 1.99c.976-1.327 1.6-2.966 1.6-4.683 0-1.795-.624-3.434-1.561-4.76l-2.068 2.028c.468.781.78 1.679.78 2.732z"></path><path d="M8 13.151a4.995 4.995 0 1 1 0-9.99c1.015 0 1.951.273 2.732.82l1.95-2.03a7.805 7.805 0 1 0 .04 12.449l-1.951-2.03a5.07 5.07 0 0 1-2.732.781z"></path></svg>',
41+
},
42+
link: "https://opencollective.com/openapi-ts",
43+
},
44+
{ icon: "github", link: "https://github.com/openapi-ts/openapi-typescript" },
45+
],
3846
},
3947
transformPageData({ relativePath, frontmatter }) {
4048
frontmatter.head ??= [];
@@ -43,4 +51,6 @@ export const shared = defineConfig({
4351
{ rel: "canonical", href: `${HOSTNAME}/${relativePath.replace(/(index\.md|\.md)$/, "")}` },
4452
]);
4553
},
46-
});
54+
};
55+
56+
export default shared;

docs/.vitepress/theme/CustomLayout.vue

+39
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
<script setup>
22
import DefaultTheme from "vitepress/theme";
33
4+
import sponsors from "../../data/sponsors.json";
5+
46
const { Layout } = DefaultTheme;
57
</script>
68

79
<template>
810
<Layout>
11+
<!-- Gold sponsor banner -->
912
<template #layout-top
1013
><a
1114
class="banner"
@@ -35,6 +38,20 @@ const { Layout } = DefaultTheme;
3538
<span class="banner-pseudo-link">Start Free →</span>
3639
</a></template
3740
>
41+
42+
<!-- Silver sponsor logos -->
43+
<template #sidebar-nav-after>
44+
<div class="sidenav-sponsors">
45+
<h5>Silver Sponsors</h5>
46+
<ul>
47+
<li v-for="sponsor in sponsors.silver" :key="sponsor.name">
48+
<a :href="sponsor.url" target="_blank" :title="sponsor.name">
49+
<img :src="sponsor.logo" :alt="sponsor.description" />
50+
</a>
51+
</li>
52+
</ul>
53+
</div>
54+
</template>
3855
</Layout>
3956
</template>
4057

@@ -93,6 +110,28 @@ const { Layout } = DefaultTheme;
93110
padding: 0 0.75em;
94111
white-space: nowrap;
95112
}
113+
114+
.sidenav-sponsors h5 {
115+
color: var(--vp-c-text-2);
116+
font-size: 0.75rem;
117+
font-weight: 600;
118+
letter-spacing: 0.0625em;
119+
text-transform: uppercase;
120+
}
121+
122+
.sidenav-sponsors ul {
123+
display: flex;
124+
flex-wrap: wrap;
125+
gap: 1.25rem;
126+
list-style: none;
127+
margin: 1.5rem 0 0;
128+
padding: 0;
129+
}
130+
131+
.sidenav-sponsors img {
132+
height: 3rem;
133+
width: auto;
134+
}
96135
</style>
97136

98137
<style>

docs/.vitepress/theme/SponsorList.vue

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<script setup>
2+
import sponsors from "../../data/sponsors.json";
3+
</script>
4+
5+
<template>
6+
<ul class="sponsors-list">
7+
<li
8+
v-for="sponsor in [...sponsors.gold, ...sponsors.silver]"
9+
:key="sponsor.name"
10+
>
11+
<a :href="sponsor.url" target="_blank" :title="sponsor.name">
12+
<img :src="sponsor.logo" :alt="sponsor.description" />
13+
</a>
14+
</li>
15+
</ul>
16+
</template>
17+
18+
<style scoped>
19+
.sponsors-list {
20+
align-items: center;
21+
display: flex;
22+
flex-wrap: wrap;
23+
list-style: none;
24+
justify-content: center;
25+
gap: 1.5rem;
26+
margin: 0;
27+
padding: 0;
28+
}
29+
30+
.sponsors-list li {
31+
margin: 0;
32+
padding: 0;
33+
}
34+
35+
.sponsors-list img {
36+
height: 3rem;
37+
width: auto;
38+
}
39+
</style>

docs/.vitepress/theme/index.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@
22
import type { Theme } from "vitepress";
33
import DefaultTheme from "vitepress/theme";
44
import CustomLayout from "./CustomLayout.vue";
5+
import SponsorList from "./SponsorList.vue";
56
import "./style.css";
67

78
export default {
89
extends: DefaultTheme,
910
Layout: CustomLayout,
1011
enhanceApp({ app, router, siteData }) {
11-
// ...
12+
app.component("SponsorList", SponsorList);
1213
},
1314
} satisfies Theme;

docs/.vitepress/theme/style.css

+21-7
Original file line numberDiff line numberDiff line change
@@ -184,17 +184,17 @@ code {
184184
/**
185185
* Component: Homepage logos
186186
* -------------------------------------------------------------------------- */
187-
.logo-salad {
187+
.home-logo-salad {
188188
display: flex;
189189
flex-direction: column;
190190
justify-content: center;
191-
margin-left: 2.5rem;
192-
margin-right: 2.5rem;
191+
margin-inline: 2.5rem;
193192
margin-top: 3rem;
194193
text-align: center;
195194
}
196195

197-
.logo-salad h3 {
196+
.home-logo-salad h3,
197+
.home-sponsor h3 {
198198
color: var(--vp-c-text-3);
199199
font-size: 0.875rem;
200200
font-weight: 600;
@@ -203,7 +203,7 @@ code {
203203
text-transform: uppercase;
204204
}
205205

206-
.logo-salad-list {
206+
.home-logo-salad-list {
207207
align-items: center;
208208
display: flex;
209209
flex-wrap: wrap;
@@ -212,12 +212,26 @@ code {
212212
justify-content: center;
213213
}
214214

215-
.logo-salad-list li {
215+
.home-logo-salad-list li {
216216
display: flex;
217217
list-style: none;
218218
}
219219

220-
.logo-salad-list svg {
220+
.home-logo-salad-list svg {
221221
fill: var(--vp-c-text-1);
222222
width: auto;
223223
}
224+
225+
.home-sponsor,
226+
.home-sponsor p {
227+
color: var(--vp-c-text-2);
228+
text-align: center;
229+
}
230+
231+
.home-sponsor-list {
232+
margin-block: 4rem;
233+
}
234+
235+
.home-sponsor .donate {
236+
display: inline-block;
237+
}

docs/.vitepress/zh.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { defineConfig, type DefaultTheme } from "vitepress";
22

3-
export const zh = defineConfig({
3+
export default defineConfig({
44
lang: "zh-Hans",
55
description: "在 TypeScript 中使用 OpenAPI 3.0 和 3.1 的模式。",
66
themeConfig: {

docs/data/contributors.json

+1-1
Large diffs are not rendered by default.

docs/data/sponsors.json

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"gold": [
3+
{
4+
"name": "Zuplo",
5+
"logo": "https://avatars.githubusercontent.com/u/85497839?s=200&v=4",
6+
"url": "https://zuplo.link/openapi-ts-web"
7+
}
8+
],
9+
"silver": [
10+
{
11+
"name": "nanabit",
12+
"logo": "https://avatars.githubusercontent.com/u/154126976?s=200&v=4",
13+
"url": "https://nanabit.dev"
14+
}
15+
]
16+
}

0 commit comments

Comments
 (0)