Skip to content

Commit 8094ee7

Browse files
Added sponsor icon to docs page (#3337)
Fixes #918
1 parent 01bfc48 commit 8094ee7

2 files changed

Lines changed: 25 additions & 1 deletion

File tree

‎packages/app-web-docs/docusaurus.config.mts‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ const config: Config = {
178178
alt: "Cursorless",
179179
src: "logo.svg",
180180
srcDark: "logo-dark.svg",
181-
href: "https://www.cursorless.org/",
181+
href: "https://www.cursorless.org",
182182
target: "_self",
183183
},
184184
items: [
@@ -196,6 +196,12 @@ const config: Config = {
196196
sidebarId: "contributing",
197197
label: "For contributors",
198198
},
199+
{
200+
href: "https://github.com/sponsors/cursorless-dev",
201+
position: "right",
202+
className: "header-sponsor-link",
203+
"aria-label": "Sponsor Cursorless",
204+
},
199205
{
200206
href: "https://github.com/cursorless-dev/cursorless",
201207
position: "right",

‎packages/app-web-docs/src/css/github-link.scss‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,22 @@
11
/* From https://github.com/facebook/docusaurus/blob/cc0bceab9c1678303f6237f5526753edc1b12fc3/website/src/css/custom.css#L70-L86 */
2+
.header-sponsor-link:hover {
3+
opacity: 0.6;
4+
}
5+
6+
.header-sponsor-link::before {
7+
content: "";
8+
width: 24px;
9+
height: 24px;
10+
display: flex;
11+
background-color: #bf3989;
12+
mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m8 14.25.345.666a.75.75 0 0 1-.69 0l-.008-.004-.018-.01a7.152 7.152 0 0 1-.31-.17 22.055 22.055 0 0 1-3.434-2.414C2.045 10.731 0 8.35 0 5.5 0 2.836 2.086 1 4.25 1 5.797 1 7.153 1.802 8 3.02 8.847 1.802 10.203 1 11.75 1 13.914 1 16 2.836 16 5.5c0 2.85-2.045 5.231-3.885 6.818a22.066 22.066 0 0 1-3.744 2.584l-.018.01-.006.003h-.002ZM4.25 2.5c-1.336 0-2.75 1.164-2.75 3 0 2.15 1.58 4.144 3.365 5.682A20.58 20.58 0 0 0 8 13.393a20.58 20.58 0 0 0 3.135-2.211C12.92 9.644 14.5 7.65 14.5 5.5c0-1.836-1.414-3-2.75-3-1.373 0-2.609.986-3.029 2.456a.749.749 0 0 1-1.442 0C6.859 3.486 5.623 2.5 4.25 2.5Z'/%3E%3C/svg%3E")
13+
no-repeat center / contain;
14+
}
15+
16+
[data-theme="dark"] .header-sponsor-link::before {
17+
background-color: #db61a2;
18+
}
19+
220
.header-github-link:hover {
321
opacity: 0.6;
422
}

0 commit comments

Comments
 (0)