Skip to content

Commit 334d68e

Browse files
committed
Add button for javadocs to homepage
1 parent d3ac921 commit 334d68e

File tree

5 files changed

+24
-0
lines changed

5 files changed

+24
-0
lines changed

docs/.vitepress/theme/index.ts

+2
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ function injectIndexPageIcons() {
7777
a.classList.add("index-download-button");
7878
} else if (href.includes("/intro")) {
7979
a.classList.add("index-docs-button");
80+
} else if (href.includes("javadocs")) {
81+
a.classList.add("index-javadocs-button")
8082
}
8183
})
8284
}

docs/.vitepress/theme/style/global.css

+17
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,18 @@ kbd:not(.DocSearch-Button-Key) {
9191
content: url(/images/index/docs-light.svg);
9292
}
9393

94+
.index-javadocs-button:before {
95+
display: block;
96+
float: left;
97+
width: 18px;
98+
height: 18px;
99+
padding-top: 5px;
100+
margin-left: -4px;
101+
margin-right: 6px;
102+
/*noinspection CssUnknownTarget*/
103+
content: url(/images/index/javadocs-light.svg);
104+
}
105+
94106
.dark {
95107
.tip.custom-block > .danger.custom-block {
96108
background-color: #3e2129;
@@ -105,4 +117,9 @@ kbd:not(.DocSearch-Button-Key) {
105117
/*noinspection CssUnknownTarget*/
106118
content: url(/images/index/docs-dark.svg);
107119
}
120+
121+
.index-javadocs-button:before {
122+
/*noinspection CssUnknownTarget*/
123+
content: url(/images/index/javadocs-dark.svg);
124+
}
108125
}

docs/en/index.md

+3
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ hero:
99
- theme: brand
1010
text: Documentation
1111
link: /intro
12+
- theme: alt
13+
text: Javadocs
14+
link: https://javadocs.commandapi.dev/
1215
- theme: alt
1316
text: Latest Release
1417
link: https://github.com/CommandAPI/CommandAPI/releases/latest
Loading
Loading

0 commit comments

Comments
 (0)