Skip to content

Commit 4cdb91e

Browse files
committed
feat: ✨ Move search button to sidebar
1 parent dd81915 commit 4cdb91e

33 files changed

+2153
-1424
lines changed

Diff for: docs/index.md

+5-5
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

Diff for: docs/node/index.md

+2-1
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.

Diff for: guides/index.md

+4-4
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

Diff for: package-lock.json

+1,643-1,189
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: package.json

+1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
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",
3738
"typescript": "^5.6.3"
3839
},

Diff for: postcss.config.js

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
const purgecss = require("@fullhuman/postcss-purgecss")({
2+
content: [
3+
"./src/**/*.js",
4+
"./src/**/*.jsx",
5+
"./src/**/*.ts",
6+
"./src/**/*.tsx",
7+
"./src/**/*.html",
8+
"./docs/**/*.md",
9+
],
10+
defaultExtractor: (content) => content.match(/[\w-/:]+(?<!:)/g) || [],
11+
});
12+
13+
module.exports = {
14+
plugins: [
15+
require("autoprefixer"),
16+
...(process.env.NODE_ENV === "production" ? [purgecss] : []),
17+
],
18+
};

Diff for: references/index.md

+3-3
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

Diff for: sidebars.js

+3
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',

Diff for: src/css/custom.css

+89-41
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,56 @@
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');
8+
@font-face {
9+
font-family: "IBMPlexMono";
10+
src: url("/fonts/IBMPlexMono-Light.woff2") format("woff2");
11+
font-weight: 300;
12+
font-style: normal;
13+
font-display: swap;
14+
}
15+
16+
@font-face {
17+
font-family: "IBMPlexMono";
18+
src: url("/fonts/IBMPlexMono-Regular.woff2") format("woff2");
19+
font-weight: 400;
20+
font-style: normal;
21+
font-display: swap;
22+
}
923

1024
@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;
25+
font-family: "IBMPlexMono";
26+
src: url("/fonts/IBMPlexMono-Medium.woff2") format("woff2");
27+
font-weight: 500;
28+
font-style: normal;
29+
font-display: swap;
30+
}
31+
32+
@font-face {
33+
font-family: "IBMPlexMono";
34+
src: url("/fonts/IBMPlexMono-SemiBold.woff2") format("woff2");
35+
font-weight: 600;
36+
font-style: normal;
37+
font-display: swap;
38+
}
39+
40+
@font-face {
41+
font-family: "IBMPlexMono";
42+
src: url("/fonts/IBMPlexMono-Bold.woff2") format("woff2");
43+
font-weight: 700;
44+
font-style: normal;
45+
font-display: swap;
46+
}
47+
48+
@font-face {
49+
font-family: "Atyp";
50+
src: url("/fonts/AtypDisplay-Regular.woff2") format("woff2") font-weight 400;
51+
src: url("/fonts/AtypDisplay-Medium.woff2") format("woff2") font-weight 500;
52+
src: url("/fonts/AtypDisplay-Semibold.woff2") format("woff2") font-weight 600;
53+
src: url("/fonts/AtypDisplay-Bold.woff2") format("woff2") font-weight 700;
1654
}
1755

1856
:root {
19-
--ifm-font-family-base: 'IBM Plex Mono', sans-serif; /* Set the default font to IBM Plex Sans */
57+
--ifm-font-family-base: "IBMPlexMono", serif, sans-serif; /* Set the default font to IBM Plex Sans */
2058
--ifm-color-primary: #000;
2159
--ifm-color-primary-dark: #000033;
2260
--ifm-color-primary-darkest: #0048f8;
@@ -29,16 +67,19 @@
2967
/* NEw COLORS */
3068
--background-color: #fff;
3169
--text-color: #202020;
32-
--link-active: #9E6C00;
70+
--link-active: #9e6c00;
71+
--neutral-3: #f0f0f0;
3372
--neutral-6: #d9d9d9;
34-
73+
--neutral-7: #cecece;
74+
--neutral-11: #646464;
75+
3576
--ifm-navbar-background-color: var(--background-color);
3677
--ifm-navbar-link-color: var(--text-color);
3778
--ifm-navbar-link-hover-color: var(--link-active);
3879

3980
--ifm-menu-color: var(--text-color);
4081
--sidebar-menu-item_border: #d9d9d9;
41-
82+
4283
--ifm-color-primary-darker: var(--link-active);
4384

4485
--ifm-footer-link-color: var(--text-color);
@@ -49,10 +90,22 @@
4990
--ifm-pagination-nav-color-hover: var(--link-active);
5091
--ifm-font-weight-base: var(--ifm-font-weight-light);
5192
--ifm-heading-color: var(--text-color);
93+
--docsearch-searchbox-focus-background: var(--background-color) !important;
94+
--docsearch-modal-background: var(--background-color) !important;
95+
--docsearch-hit-background: var(--neutral-6) !important;
96+
--docsearch-hit-active-color: var(--link-active) !important;
97+
--docsearch-highlight-color: var(--text-color) !important;
98+
--docsearch-text-color: var(--text-color) !important;
99+
--docsearch-hit-color: var(--text-color) !important;
100+
--docsearch-muted-color: var(--text-color) !important;
101+
102+
--ifm-link-color: var(--text-color);
103+
--ifm-color-content-secondary: var(--text-color) !important;
104+
--docsearch-primary-color: var(--text-color) !important;
52105
}
53106

54107
/* For readability concerns, you should choose a lighter palette in dark mode. */
55-
[data-theme='dark'] {
108+
[data-theme="dark"] {
56109
--ifm-color-primary: #fff;
57110
--ifm-color-primary-dark: #98beff;
58111
--ifm-color-primary-darkest: #0048f8;
@@ -63,18 +116,13 @@
63116
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.3);
64117
}
65118

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-
}
119+
@import url("./navbar.css");
120+
@import url("./sidebar.css");
121+
@import url("./tags.css");
122+
@import url("./pagination-nav.css");
123+
@import url("./breadcrumbs.css");
124+
@import url("./typography.css");
125+
@import url("./toc.css");
78126

79127
.main-wrapper a,
80128
.main-wrapper span,
@@ -92,16 +140,22 @@
92140
z-index: -1;
93141
}
94142

95-
html[data-theme='dark'] {
143+
html[data-theme="dark"] {
96144
background: var(--background-color);
97145
color: var(--text-color);
98146
}
99147

100-
[data-theme='dark'] .footer {
148+
[data-theme="dark"] .footer {
101149
background: transparent;
102150
border-top: 1px solid var(--neutral-6);
103151
}
104152

153+
div[class*="docRoot_node_modules-@docusaurus-theme-classic-lib-theme-DocRoot-Layout-styles-module"] {
154+
max-width: 1440px;
155+
margin: 0 auto;
156+
width: 100%;
157+
}
158+
105159
.alert {
106160
background: transparent;
107161
border: 1px solid var(--sidebar-menu-item_border);
@@ -135,10 +189,6 @@ div[class*=" searchLogoColumn"],
135189
display: none;
136190
}
137191

138-
div[class*="docItemContainer"] {
139-
padding: 20px;
140-
}
141-
142192
@media (min-width: 996px) {
143193
.footer .container {
144194
padding: 0;
@@ -156,8 +206,8 @@ div[class*="docItemContainer"] {
156206

157207
@media (max-width: 996px) {
158208
.footer__col {
159-
margin-bottom: 0;
160-
flex-basis: 0;
209+
margin-bottom: 0;
210+
flex-basis: 0;
161211
}
162212

163213
.footer__links {
@@ -166,11 +216,9 @@ div[class*="docItemContainer"] {
166216
padding-left: 4rem;
167217
}
168218

169-
170219
.footer__title {
171220
display: none;
172221
}
173-
174222
}
175223

176224
/* Main wrapper */
@@ -207,8 +255,7 @@ main > .container > .row {
207255
.DocSearch-Button:hover svg {
208256
opacity: 1;
209257
}
210-
§
211-
.DocSearch-Container > .DocSearch-Modal,
258+
§ .DocSearch-Container > .DocSearch-Modal,
212259
.DocSearch-Modal .DocSearch-Form {
213260
box-shadow: none;
214261
border: 1px solid var(--ifm-toc-border-color);
@@ -218,6 +265,10 @@ main > .container > .row {
218265
font-size: 1em;
219266
}
220267

268+
.DocSearch-Hit[aria-selected="true"] a {
269+
background: var(--neutral-3) !important;
270+
}
271+
221272
input[class^="searchQueryInput_"] {
222273
border: 1px solid var(--ifm-toc-border-color);
223274
max-width: 480px;
@@ -269,9 +320,7 @@ article h1,
269320
border-left-style: dashed;
270321
}
271322

272-
.markdown img
273-
274-
.table-of-contents li a:hover {
323+
.markdown img .table-of-contents li a:hover {
275324
text-decoration: underline;
276325
}
277326

@@ -293,8 +342,7 @@ article h1,
293342
text-transform: capitalize;
294343
}
295344

296-
297-
.youtube-player iframe {
345+
.youtube-player iframe {
298346
width: 100%;
299347
aspect-ratio: 16 / 9;
300348
}
@@ -305,4 +353,4 @@ article h1,
305353

306354
aside.theme-doc-sidebar-container {
307355
border-right: none;
308-
}
356+
}

0 commit comments

Comments
 (0)