Skip to content

Commit 88ed569

Browse files
committed
feat: ✨ Move search button to sidebar
1 parent dd81915 commit 88ed569

33 files changed

+3038
-1432
lines changed

docs/index.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ description: Welcome to the documentation site for Fleek Network, the decentrali
99
category: Documentation
1010
keywords: [introduction, documentation, getting started]
1111
tags:
12-
- Edge Platform
13-
- Guide
14-
- Learn
15-
- Fleek Network
12+
- Edge Platform
13+
- Guide
14+
- Learn
15+
- Fleek Network
1616
---
1717

18-
import ImgBannerDocs from '@site/static/img/banner-docs.png?202309041511';
18+
import ImgBannerDocs from '@site/static/img/banner-docs.webp?202309041511';
1919

2020
<img className="banner" src={ImgBannerDocs} />
2121

docs/node/index.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ This section provides instructions to help you build a **Fleek Network Node**, i
1515
To participate in the [alpha Testnet](/docs/roadmap), you can begin by setting up and running nodes. Check the [requirements](/docs/node/requirements) and find the [onboarding instructions](/docs/node/testnet-onboarding) to enable you to [install](/docs/node/install) a network node successfully.
1616
:::
1717

18-
# Node operator {#node-operator}
18+
## Node operator {#node-operator}
19+
1920
---
2021

2122
A **Node Operator** is represented as a system administrator who builds, installs or maintains one or many nodes in a server or more.

guides/index.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ title: About guides
33
hide_title: true
44
sidebar_position: 1
55
tags:
6-
- Guides
7-
- Help
8-
- Fleek Network
6+
- Guides
7+
- Help
8+
- Fleek Network
99
---
1010

11-
import ImgBannerGuides from '@site/static/img/banner-guides.png?202309041511';
11+
import ImgBannerGuides from '@site/static/img/banner-guides.webp?202309041511';
1212

1313
<img className="banner" src={ImgBannerGuides} />
1414

package-lock.json

Lines changed: 1643 additions & 1189 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
"private": true,
55
"scripts": {
66
"docusaurus": "docusaurus",
7-
"start": "docusaurus start --no-minify",
8-
"build": "docusaurus build --no-minify",
7+
"start": "docusaurus start",
8+
"build": "docusaurus build",
99
"swizzle": "docusaurus swizzle",
1010
"deploy": "docusaurus deploy",
1111
"clear": "docusaurus clear",
@@ -33,7 +33,9 @@
3333
"@docusaurus/module-type-aliases": "^3.5.2",
3434
"@docusaurus/tsconfig": "^3.5.2",
3535
"@docusaurus/types": "^3.5.2",
36+
"@fullhuman/postcss-purgecss": "^6.0.0",
3637
"husky": "^8.0.3",
38+
"postcss-preset-env": "^10.0.9",
3739
"typescript": "^5.6.3"
3840
},
3941
"browserslist": {

postcss.config.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
const postcssPresetEnv = require("postcss-preset-env");
2+
3+
module.exports = {
4+
plugins: [
5+
postcssPresetEnv({
6+
/* pluginOptions */
7+
features: {},
8+
}),
9+
],
10+
};

references/index.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ title: About references
33
hide_title: true
44
sidebar_position: 1
55
tags:
6-
- References
7-
- Help
6+
- References
7+
- Help
88
---
99

10-
import ImgBannerReferences from '@site/static/img/banner-references.png?202309041511';
10+
import ImgBannerReferences from '@site/static/img/banner-references.webp?202309041511';
1111

1212
<img className="banner" src={ImgBannerReferences} />
1313

sidebars.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ const sidebars = {
2424
label: 'Learn',
2525
collapsed: true,
2626
collapsible: true,
27+
link: {type: 'doc', id: 'learn/index'},
2728
items: [
2829
'learn/index',
2930
'learn/the-network',
@@ -38,6 +39,7 @@ const sidebars = {
3839
label: 'Node',
3940
collapsed: true,
4041
collapsible: true,
42+
link: {type: 'doc', id: 'node/index'},
4143
items: [
4244
'node/index',
4345
'node/requirements',
@@ -71,6 +73,7 @@ const sidebars = {
7173
label: 'Open-source',
7274
collapsed: true,
7375
collapsible: true,
76+
link: {type: 'doc', id: 'Open-source/code-of-conduct'},
7477
items: [
7578
'Open-source/code-of-conduct',
7679
'Open-source/contributing',

src/css/custom.css

Lines changed: 45 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,9 @@
55
*/
66

77
/* You can override the default Infima variables here. */
8-
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@300;400;500;600;700&display=swap');
9-
10-
@font-face {
11-
font-family: 'Atyp';
12-
src: url('/fonts/AtypDisplay-Regular.woff2') format('woff2') font-weight 400;
13-
src: url('/fonts/AtypDisplay-Medium.woff2') format('woff2') font-weight 500;
14-
src: url('/fonts/AtypDisplay-Semibold.woff2') format('woff2') font-weight 600;
15-
src: url('/fonts/AtypDisplay-Bold.woff2') format('woff2') font-weight 700;
16-
}
178

189
:root {
19-
--ifm-font-family-base: 'IBM Plex Mono', sans-serif; /* Set the default font to IBM Plex Sans */
10+
--ifm-font-family-base: "IBMPlexMono", serif, sans-serif; /* Set the default font to IBM Plex Sans */
2011
--ifm-color-primary: #000;
2112
--ifm-color-primary-dark: #000033;
2213
--ifm-color-primary-darkest: #0048f8;
@@ -29,16 +20,19 @@
2920
/* NEw COLORS */
3021
--background-color: #fff;
3122
--text-color: #202020;
32-
--link-active: #9E6C00;
23+
--link-active: #9e6c00;
24+
--neutral-3: #f0f0f0;
3325
--neutral-6: #d9d9d9;
34-
26+
--neutral-7: #cecece;
27+
--neutral-11: #646464;
28+
3529
--ifm-navbar-background-color: var(--background-color);
3630
--ifm-navbar-link-color: var(--text-color);
3731
--ifm-navbar-link-hover-color: var(--link-active);
3832

3933
--ifm-menu-color: var(--text-color);
4034
--sidebar-menu-item_border: #d9d9d9;
41-
35+
4236
--ifm-color-primary-darker: var(--link-active);
4337

4438
--ifm-footer-link-color: var(--text-color);
@@ -49,10 +43,22 @@
4943
--ifm-pagination-nav-color-hover: var(--link-active);
5044
--ifm-font-weight-base: var(--ifm-font-weight-light);
5145
--ifm-heading-color: var(--text-color);
46+
--docsearch-searchbox-focus-background: var(--background-color) !important;
47+
--docsearch-modal-background: var(--background-color) !important;
48+
--docsearch-hit-background: var(--neutral-6) !important;
49+
--docsearch-hit-active-color: var(--link-active) !important;
50+
--docsearch-highlight-color: var(--text-color) !important;
51+
--docsearch-text-color: var(--text-color) !important;
52+
--docsearch-hit-color: var(--text-color) !important;
53+
--docsearch-muted-color: var(--text-color) !important;
54+
55+
--ifm-link-color: var(--text-color);
56+
--ifm-color-content-secondary: var(--text-color) !important;
57+
--docsearch-primary-color: var(--text-color) !important;
5258
}
5359

5460
/* For readability concerns, you should choose a lighter palette in dark mode. */
55-
[data-theme='dark'] {
61+
[data-theme="dark"] {
5662
--ifm-color-primary: #fff;
5763
--ifm-color-primary-dark: #98beff;
5864
--ifm-color-primary-darkest: #0048f8;
@@ -63,18 +69,13 @@
6369
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.3);
6470
}
6571

66-
@import url('./navbar.css');
67-
@import url('./sidebar.css');
68-
@import url('./tags.css');
69-
@import url('./pagination-nav.css');
70-
@import url('./breadcrumbs.css');
71-
@import url('./typography.css');
72-
@import url('./toc.css');
73-
74-
:root {
75-
--docsearch-modal-background: #000 !important;
76-
--custom-color-gray-blue: rgb(62 72 105 / 37.5%);
77-
}
72+
@import url("./navbar.css");
73+
@import url("./sidebar.css");
74+
@import url("./tags.css");
75+
@import url("./pagination-nav.css");
76+
@import url("./breadcrumbs.css");
77+
@import url("./typography.css");
78+
@import url("./toc.css");
7879

7980
.main-wrapper a,
8081
.main-wrapper span,
@@ -92,16 +93,22 @@
9293
z-index: -1;
9394
}
9495

95-
html[data-theme='dark'] {
96+
html[data-theme="dark"] {
9697
background: var(--background-color);
9798
color: var(--text-color);
9899
}
99100

100-
[data-theme='dark'] .footer {
101+
[data-theme="dark"] .footer {
101102
background: transparent;
102103
border-top: 1px solid var(--neutral-6);
103104
}
104105

106+
div[class*="docRoot_node_modules-@docusaurus-theme-classic-lib-theme-DocRoot-Layout-styles-module"] {
107+
max-width: 1440px;
108+
margin: 0 auto;
109+
width: 100%;
110+
}
111+
105112
.alert {
106113
background: transparent;
107114
border: 1px solid var(--sidebar-menu-item_border);
@@ -135,10 +142,6 @@ div[class*=" searchLogoColumn"],
135142
display: none;
136143
}
137144

138-
div[class*="docItemContainer"] {
139-
padding: 20px;
140-
}
141-
142145
@media (min-width: 996px) {
143146
.footer .container {
144147
padding: 0;
@@ -156,8 +159,8 @@ div[class*="docItemContainer"] {
156159

157160
@media (max-width: 996px) {
158161
.footer__col {
159-
margin-bottom: 0;
160-
flex-basis: 0;
162+
margin-bottom: 0;
163+
flex-basis: 0;
161164
}
162165

163166
.footer__links {
@@ -166,11 +169,9 @@ div[class*="docItemContainer"] {
166169
padding-left: 4rem;
167170
}
168171

169-
170172
.footer__title {
171173
display: none;
172174
}
173-
174175
}
175176

176177
/* Main wrapper */
@@ -207,8 +208,7 @@ main > .container > .row {
207208
.DocSearch-Button:hover svg {
208209
opacity: 1;
209210
}
210-
§
211-
.DocSearch-Container > .DocSearch-Modal,
211+
§ .DocSearch-Container > .DocSearch-Modal,
212212
.DocSearch-Modal .DocSearch-Form {
213213
box-shadow: none;
214214
border: 1px solid var(--ifm-toc-border-color);
@@ -218,6 +218,10 @@ main > .container > .row {
218218
font-size: 1em;
219219
}
220220

221+
.DocSearch-Hit[aria-selected="true"] a {
222+
background: var(--neutral-3) !important;
223+
}
224+
221225
input[class^="searchQueryInput_"] {
222226
border: 1px solid var(--ifm-toc-border-color);
223227
max-width: 480px;
@@ -269,9 +273,7 @@ article h1,
269273
border-left-style: dashed;
270274
}
271275

272-
.markdown img
273-
274-
.table-of-contents li a:hover {
276+
.markdown img .table-of-contents li a:hover {
275277
text-decoration: underline;
276278
}
277279

@@ -293,8 +295,7 @@ article h1,
293295
text-transform: capitalize;
294296
}
295297

296-
297-
.youtube-player iframe {
298+
.youtube-player iframe {
298299
width: 100%;
299300
aspect-ratio: 16 / 9;
300301
}
@@ -305,4 +306,4 @@ article h1,
305306

306307
aside.theme-doc-sidebar-container {
307308
border-right: none;
308-
}
309+
}

src/css/navbar.css

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
.navbar {
22
box-shadow: none;
3-
padding-top: 3rem;
4-
padding-bottom: 3rem;
3+
padding: 3rem 0.5rem;
4+
max-width: 1440px;
5+
margin: 0 auto;
6+
width: 100%;
57
}
68

79
.DocSearch-Modal .DocSearch-Footer,
@@ -11,22 +13,32 @@
1113

1214
.DocSearch-Button,
1315
.DocSearch-Button:hover {
16+
height: 34px;
1417
border-radius: 0px;
1518
color: var(--text-color);
1619
border: 1px solid var(--text-color);
1720
background: var(--background-color);
21+
box-shadow: none !important;
1822

1923
.DocSearch-Search-Icon {
2024
color: var(--text-color);
2125
}
2226
}
2327

2428
@media (max-width: 996px) {
25-
.navbar__toggle+.navbar__brand {
29+
.navbar {
30+
padding: 1.5rem 1rem;
31+
}
32+
33+
.navbar__toggle + .navbar__brand {
2634
display: none;
2735
}
2836

29-
.navbar__items>div:nth-child(2) {
37+
.navbar__toggle {
38+
margin-right: 0;
39+
}
40+
41+
.navbar__items > div:nth-child(2) {
3042
display: flex;
3143
align-items: flex-end;
3244
justify-content: flex-end;
@@ -40,8 +52,9 @@
4052

4153
@media (min-width: 996px) {
4254
.navbar__items {
43-
justify-content: space-between;
55+
justify-content: center;
4456
height: 100%;
57+
gap: 18px;
4558
}
4659

4760
.navbar__items div:nth-child(1) {
@@ -52,4 +65,4 @@
5265
.navbar__items .DocSearch-Button {
5366
justify-content: flex-start;
5467
}
55-
}
68+
}

0 commit comments

Comments
 (0)