Skip to content

Commit c5d78bf

Browse files
committed
docs: add premium sponsors
1 parent 6c8eae0 commit c5d78bf

File tree

5 files changed

+74
-4
lines changed

5 files changed

+74
-4
lines changed

Diff for: docs/.vitepress/config.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ export default defineConfig({
154154
link: '/learn',
155155
},
156156
{
157-
text: 'Forum (Sponsors only)',
157+
text: 'Help center (Sponsors only)',
158158
link: 'https://github.com/pvtnbr/tsx/discussions',
159159
},
160160
{
@@ -222,7 +222,7 @@ export default defineConfig({
222222
},
223223
{
224224
icon: {
225-
svg: '<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill="#888888" d="M1.946 9.315c-.522-.174-.527-.455.01-.634L21.044 2.32c.529-.176.832.12.684.638l-5.454 19.086c-.15.529-.455.547-.679.045L12 14l6-8l-8 6z"/></svg>'
225+
svg: '<svg viewBox="0 0 24 24"><path d="M22 4H2v16h20zm-2 4l-8 5l-8-5V6l8 5l8-5z"/></svg>'
226226
},
227227
link: '/contact'
228228
}

Diff for: docs/.vitepress/theme/components/AsideSponsors.vue

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
<template>
2+
<div>
3+
<h4 class="text-base font-semibold mb-2">Premium sponsors</h4>
4+
</div>
5+
<a
6+
href="https://github.com/sponsors/privatenumber/sponsorships?tier_id=388346"
7+
target="_blank"
8+
class="sponsor-placeholder"
9+
>
10+
Your logo + link here
11+
12+
<button type="button" class="sponsor-button mt-4">
13+
Become a sponsor
14+
</button>
15+
</a>
16+
</template>
17+
18+
<style scoped>
19+
.sponsor-placeholder {
20+
@apply
21+
block
22+
border-2
23+
border-dashed
24+
rounded
25+
py-6
26+
text-center
27+
text-sm
28+
transition-colors
29+
text-zinc-500
30+
border-zinc-400
31+
hover:text-zinc-800
32+
hover:border-zinc-700;
33+
}
34+
35+
html.dark .sponsor-placeholder {
36+
@apply
37+
border-zinc-500
38+
text-zinc-500
39+
hover:border-zinc-200
40+
hover:text-zinc-200;
41+
}
42+
43+
.sponsor-button {
44+
@apply
45+
text-xs
46+
rounded-full
47+
bg-pink-500
48+
text-white
49+
py-1
50+
px-4;
51+
}
52+
</style>

Diff for: docs/.vitepress/theme/index.ts

+12-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,15 @@
1+
import { h } from 'vue';
12
import DefaultTheme from 'vitepress/theme';
3+
import AsideSponsors from './components/AsideSponsors.vue';
24
import './styles.css';
35

4-
export default DefaultTheme;
6+
export default {
7+
extends: DefaultTheme,
8+
Layout: () => h(
9+
DefaultTheme.Layout,
10+
null,
11+
{
12+
'aside-ads-before': () => h(AsideSponsors),
13+
},
14+
),
15+
};

Diff for: docs/index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ Back then, _ts-node_ was the go-to tool for running TypeScript in Node.js, but i
153153

154154
Right now, the _tsx_ project development relies on user donations, which isn't sustainable in the long run. To keep _tsx_ reliable and growing, we need funding to cover maintenance and development costs.
155155

156-
If your company uses _tsx_ and would like to sponsor the project, [we'd love to hear from you](/contact)!
156+
If your company uses _tsx_ and would like to support the project, consider [sponsoring us](https://github.com/sponsors/privatenumber/sponsorships?tier_id=388346)—in return we'll put up your logo + link!
157157

158158
## Sponsors
159159

Diff for: docs/learn.md

+7
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@ TypeScript can be difficult to get started with and _tsx_ is all about lowering
44

55
Here are some great resources for your reference.
66

7+
::: info
8+
9+
This page is currently a work in progress.
10+
11+
If you're a TypeScript educator or you know any TS courses that use tsx, [let us know](/contact)!
12+
:::
13+
714
## Documentation
815

916
- [TypeScript documentation](https://www.typescriptlang.org/docs/)

0 commit comments

Comments
 (0)