Skip to content

Commit 042b5a5

Browse files
authored
docs: add basic homepage and WIP banner (#815)
1 parent f93e2d1 commit 042b5a5

File tree

10 files changed

+3928
-122
lines changed

10 files changed

+3928
-122
lines changed

website/docusaurus.config.js

+11-11
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ function getSpecsForNavBar() {
8383
[
8484
'docusaurus-preset-shiki-twoslash',
8585
{
86-
themes: ['min-light', 'nord'],
86+
themes: ['dark-plus', 'light-plus'],
8787
},
8888
],
8989
[
@@ -122,18 +122,23 @@ function getSpecsForNavBar() {
122122
to: 'docs/clients/introduction',
123123
position: 'left',
124124
},
125-
{
126-
label: 'Contributing',
127-
to: 'docs/contributing/introduction',
128-
position: 'right',
129-
},
130125
{
131126
label: 'HTTP API',
132127
position: 'left',
133128
type: 'dropdown',
134129
items: getSpecsForNavBar(),
135130
},
136131
// right
132+
{
133+
label: 'Contributing',
134+
to: 'docs/contributing/introduction',
135+
position: 'right',
136+
},
137+
{
138+
label: 'Algolia documentation',
139+
href: 'https://www.algolia.com/doc/',
140+
position: 'right',
141+
},
137142
{
138143
href: 'https://github.com/algolia/api-clients-automation',
139144
position: 'right',
@@ -151,11 +156,6 @@ function getSpecsForNavBar() {
151156
disableSwitch: false,
152157
respectPrefersColorScheme: true,
153158
},
154-
// Breaks scrollbar
155-
// announcementBar: {
156-
// content:
157-
// '⭐️ If you like our API clients, give them a star on <a target="_blank" rel="noopener noreferrer" href="https://github.com/algolia/api-clients-automation">GitHub</a>! ⭐️',
158-
// },
159159
footer: {
160160
style: 'dark',
161161
links: [

website/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
]
2121
},
2222
"dependencies": {
23+
"@algolia/ui-library": "5.84.0",
2324
"@docusaurus/core": "2.0.0-beta.21",
2425
"@docusaurus/preset-classic": "2.0.0-beta.21",
2526
"@docusaurus/types": "2.0.0-beta.21",

website/src/components/HomepageFeatures.js

-16
This file was deleted.

website/src/components/HomepageFeatures.module.css

-11
This file was deleted.

website/src/css/custom.css

+61-27
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
/* UI library styles */
2+
@import url(fragments.css);
3+
/* Font */
4+
@import url('https://fonts.googleapis.com/css?family=Open+Sans');
5+
16
:root {
27
--ifm-font-size-base: 16px;
38
--ifm-code-font-size: 90%;
@@ -21,28 +26,67 @@ html[data-theme='dark'] {
2126
--ifm-menu-color-background-active: #21243d;
2227
}
2328

24-
.docusaurus-highlight-code-line {
25-
background-color: rgba(0, 0, 0, 0.1);
26-
display: block;
27-
margin: 0 calc(-1 * var(--ifm-pre-padding));
28-
padding: 0 var(--ifm-pre-padding);
29+
/* -------- API documentation */
30+
/* global */
31+
html[data-theme='light'] #notice > h4,
32+
html[data-theme='light'] #notice > h3 {
33+
color: #36395a;
34+
}
35+
36+
html[data-theme='dark'] #notice > h4,
37+
html[data-theme='dark'] #notice > h3 {
38+
color: #fff;
39+
}
40+
41+
/* wip notice */
42+
html[data-theme='light'] .wip-notice {
43+
background-color: #f5f5fa;
44+
}
45+
46+
html[data-theme='dark'] .wip-notice {
47+
background-color: #21243d;
48+
}
49+
50+
/* home page */
51+
html[data-theme='light'] .hero-title {
52+
color: #36395a;
53+
}
54+
55+
html[data-theme='dark'] .hero-title {
56+
color: #fff;
57+
}
58+
59+
#hero > div:first-child {
60+
max-width: 1000px;
61+
}
62+
63+
/* code blocks */
64+
/* override italic keywords in code blocks */
65+
code .token.keyword {
66+
font-style: normal !important;
67+
}
68+
/* prevent full size code blocks in tables */
69+
table td .code-container {
70+
width: 600px;
71+
}
72+
/* we only update the header of the table */
73+
table tbody tr td h3,
74+
table tbody tr td h2 {
75+
margin-top: 16px;
2976
}
3077

3178
html[data-theme='dark'] .docusaurus-highlight-code-line {
3279
background-color: rgba(0, 0, 0, 0.3);
3380
}
3481

35-
html[data-theme='light'] .shiki.nord {
82+
html[data-theme='light'] .shiki.dark-plus {
3683
display: none;
3784
}
3885

39-
html[data-theme='dark'] .shiki.min-light {
86+
html[data-theme='dark'] .shiki.light-plus {
4087
display: none;
4188
}
4289

43-
/* Font */
44-
@import url('https://fonts.googleapis.com/css?family=Open+Sans');
45-
4690
/* -------- Navbar */
4791
.header-restapi {
4892
text-transform: capitalize;
@@ -66,23 +110,7 @@ html[data-theme='dark'] .header-github-link:before {
66110
no-repeat;
67111
}
68112

69-
/* override italic keywords in code blocks */
70-
code .token.keyword {
71-
font-style: normal !important;
72-
}
73-
74-
/* prevent full size code blocks in tables */
75-
table td .code-container {
76-
width: 600px;
77-
}
78-
79-
/* we only update the header of the table */
80-
table tbody tr td h3,
81-
table tbody tr td h2 {
82-
margin-top: 16px;
83-
}
84-
85-
/* Redoc fix */
113+
/* HTTP API: Redoc fix */
86114
.redocusaurus .menu-content label.-depth0 {
87115
padding-top: 5px;
88116
padding-bottom: 10px;
@@ -101,3 +129,9 @@ table tbody tr td h2 {
101129
line-height: 15px;
102130
width: 38px;
103131
}
132+
.docusaurus-highlight-code-line {
133+
background-color: rgba(0, 0, 0, 0.1);
134+
display: block;
135+
margin: 0 calc(-1 * var(--ifm-pre-padding));
136+
padding: 0 var(--ifm-pre-padding);
137+
}

0 commit comments

Comments
 (0)