Skip to content

Commit 3fb6731

Browse files
committed
docs: add donate links (faker-js#2806)
1 parent 7c7f78d commit 3fb6731

File tree

3 files changed

+42
-0
lines changed

3 files changed

+42
-0
lines changed

docs/.vitepress/config.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,13 @@ const config: UserConfig<DefaultTheme.Config> = {
125125
{ icon: 'mastodon', link: 'https://fosstodon.org/@faker_js' },
126126
{ icon: 'twitter', link: 'https://twitter.com/faker_js' },
127127
{ icon: 'github', link: 'https://github.com/faker-js/faker' },
128+
{
129+
icon: {
130+
svg: '<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Open Collective</title><path d="M12 0C5.373 0 0 5.373 0 12s5.373 12 12 12c2.54 0 4.894-.79 6.834-2.135l-3.107-3.109a7.715 7.715 0 1 1 0-13.512l3.107-3.109A11.943 11.943 0 0 0 12 0zm9.865 5.166l-3.109 3.107A7.67 7.67 0 0 1 19.715 12a7.682 7.682 0 0 1-.959 3.727l3.109 3.107A11.943 11.943 0 0 0 24 12c0-2.54-.79-4.894-2.135-6.834z"/></svg>',
131+
},
132+
link: 'https://opencollective.com/fakerjs',
133+
ariaLabel: 'Open Collective',
134+
},
128135
],
129136

130137
algolia:

docs/.vitepress/theme/index.css

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,3 +74,33 @@ table td ul li {
7474
color: var(--vp-button-brand-text) !important;
7575
}
7676
}
77+
78+
.opencollective {
79+
margin-top: 48px;
80+
display: flex;
81+
flex-direction: column;
82+
justify-content: center;
83+
align-items: center;
84+
text-align: center;
85+
}
86+
87+
.opencollective a {
88+
margin-top: 24px;
89+
border-radius: 20px;
90+
padding: 0 20px;
91+
line-height: 38px;
92+
font-size: 14px;
93+
display: inline-block;
94+
border: 1px solid transparent;
95+
text-align: center;
96+
font-weight: 600;
97+
white-space: nowrap;
98+
text-decoration: none;
99+
100+
color: var(--vp-button-alt-text);
101+
border-color: var(--vp-button-brand-bg) !important;
102+
transition:
103+
color 0.25s,
104+
border-color 0.25s,
105+
background-color 0.25s;
106+
}

docs/index.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,8 @@ features:
3939
title: Localization
4040
details: Pick a locale to generate realistic looking Names, Addresses, and Phone Numbers.
4141
---
42+
43+
<div class="opencollective">
44+
Faker is freely available to use for commercial and non-commercial purposes under the MIT license. The development of Faker is guided by an international team of volunteer maintainers. If you use Faker in your project, please consider making a one-off or recurring donation via Open Collective.
45+
<a target="_blank" href="https://opencollective.com/fakerjs">Support Faker on OpenCollective</a>
46+
</div>

0 commit comments

Comments
 (0)