Skip to content

Commit dd1e237

Browse files
authored
revert: "feat: header facelift (#1662)" (#1672)
1 parent 633bc66 commit dd1e237

File tree

12 files changed

+179
-572
lines changed

12 files changed

+179
-572
lines changed

apify-docs-theme/src/config.js

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,13 @@ const themeConfig = {
137137
},
138138
],
139139
},
140+
{
141+
href: 'https://github.com/apify',
142+
label: 'GitHub',
143+
title: 'Apify on GitHub',
144+
position: 'right',
145+
className: 'icon',
146+
},
140147
{
141148
href: 'https://discord.com/invite/jyEM2PRvMU',
142149
label: 'Discord',
@@ -249,10 +256,6 @@ const themeConfig = {
249256
label: 'GitHub',
250257
href: 'https://github.com/apify',
251258
},
252-
{
253-
href: 'https://discord.com/invite/jyEM2PRvMU',
254-
label: 'Discord',
255-
},
256259
{
257260
label: 'Trust Center',
258261
href: 'https://trust.apify.com',
@@ -271,15 +274,9 @@ const themeConfig = {
271274
appId: 'N8EOCSBQGH',
272275
apiKey: 'e97714a64e2b4b8b8fe0b01cd8592870', // search only (public) API key
273276
indexName: 'apify_sdk_v2',
274-
placeholder: 'Search documentation',
275277
algoliaOptions: {
276278
facetFilters: ['version:VERSION'],
277279
},
278-
translations: {
279-
button: {
280-
buttonText: 'Search documentation…',
281-
},
282-
},
283280
},
284281
hubspot: {
285282
accountId: '19497222',

apify-docs-theme/src/theme/Footer/index.jsx

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { useThemeConfig } from '@docusaurus/theme-common';
22
import LinkItem from '@theme/Footer/LinkItem';
3-
import ColorModeToggle from '@theme/Navbar/ColorModeToggle';
43
import clsx from 'clsx';
54
import React from 'react';
65

@@ -9,7 +8,7 @@ import styles from './index.module.css';
98
function FooterLinksColumn({ column }) {
109
return (
1110
<>
12-
<div className={styles.title}>{column.title}</div>
11+
<div className={styles.footerTitle}>{column.title}</div>
1312
<ul className={clsx(styles.footerItem, 'clean-list')}>
1413
{column.items.map((item, i) => (
1514
<li key={i} className="footer__item">
@@ -29,24 +28,21 @@ function Footer() {
2928
const { links, style } = footer;
3029
return (
3130
<footer className={clsx(styles.footer, style)}>
32-
<div className={styles.container}>
33-
<div className={clsx('row', styles.top)}>
31+
<div className="container padding-horiz--lg">
32+
<div className="row" style={{ justifyContent: 'space-between' }}>
3433
{ links.map((column, i) => (
3534
<div key={i} className={`col col--2`}>
3635
<FooterLinksColumn {...{ column }} />
3736
</div>
3837
))
3938
}
4039
</div>
41-
<div className={clsx('row', styles.bottom)}>
42-
<div className="col col--6">
40+
<div className="row padding-vert--md padding-top--lg">
41+
<div className="col padding-vert--md col--6">
4342
<a href="https://apify.com" target={'_blank'} rel={'dofollow noreferrer'}>
44-
<span className={styles.logo}></span>
43+
<span className={styles.footerLogo}></span>
4544
</a>
4645
</div>
47-
<div className="col col--6">
48-
<ColorModeToggle className={styles.toggle} />
49-
</div>
5046
</div>
5147
</div>
5248
</footer>
Lines changed: 14 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,5 @@
11
.footer {
2-
padding: 4rem 1.6rem 8rem;
3-
border-top: 1px solid var(--color-neutral-separator-subtle);
4-
}
5-
6-
.container {
7-
max-width: calc(var(--max-layout-width) - var(--ifm-spacing-horizontal) * 2);
8-
width: 100%;
9-
margin: 0 auto;
10-
display: flex;
11-
flex-direction: column;
2+
padding-top: 64px;
123
}
134

145
.builtBy {
@@ -42,79 +33,29 @@
4233
fill: #6f7490;
4334
}
4435

45-
.title {
46-
font-size: 1.6rem;
47-
font-weight: 700;
48-
line-height: 2.4rem;
49-
margin-bottom: 1.6rem;
50-
}
51-
52-
.top {
53-
justify-content: space-between;
54-
}
55-
56-
.bottom {
57-
padding-top: 8rem;
58-
59-
:global(.col) {
60-
display: flex;
61-
align-items: center;
62-
}
63-
}
64-
65-
.toggle {
66-
margin-left: auto;
36+
.footerTitle {
37+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI',
38+
'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans',
39+
'Helvetica Neue', sans-serif;
40+
font-weight: 600;
41+
font-size: 16px;
42+
line-height: 20px;
43+
letter-spacing: 0.1em;
44+
text-transform: uppercase;
45+
color: #8d92af;
46+
margin-bottom: 20px;
6747
}
6848

69-
.logo {
49+
.footerLogo {
7050
display: inline-block;
7151
width: 90px;
7252
height: 24px;
7353
background-image: url('/img/footer-apify-logo-black.svg');
7454
background-repeat: no-repeat;
7555
}
7656

77-
html[data-theme='dark'] .logo {
57+
html[data-theme='dark'] .footerLogo {
7858
background-image: url('/img/footer-apify-logo-white.svg');
7959
}
8060

81-
@media (max-width: 996px) {
82-
.footer {
83-
padding: 3.2rem 1.6rem;
84-
}
85-
86-
.container {
87-
flex-direction: column-reverse;
88-
}
89-
90-
.bottom {
91-
padding-top: 0;
92-
gap: 1.6rem;
93-
94-
:global(.col) {
95-
justify-content: center;
96-
}
97-
}
98-
99-
.toggle {
100-
margin-left: unset;
101-
}
102-
103-
.top {
104-
padding: 3.2rem 0;
105-
gap: 3.2rem;
106-
text-align: center;
107-
}
108-
109-
.top::before {
110-
width: 100%;
111-
height: 1px;
112-
margin: 0 -1.6rem;
113-
padding: 0 1.6rem;
114-
content: '';
115-
display: block;
116-
background-color: var(--color-neutral-separator-subtle);
117-
}
118-
}
119-
12061
/** dummy comment just to trigger theme publishing 3 */

apify-docs-theme/src/theme/Layout/index.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export default function LayoutWrapper(props) {
1212

1313
return (
1414
<div style={{
15-
'--ifm-navbar-height': subNavbar && !currentPath.startsWith('api/v2') ? '126px' : '68px',
15+
'--ifm-navbar-height': subNavbar && !currentPath.startsWith('api/v2') ? '123px' : '68px',
1616
margin: 0,
1717
padding: 0,
1818
boxSizing: 'border-box',

apify-docs-theme/src/theme/Navbar/CTA/index.jsx

Lines changed: 0 additions & 7 deletions
This file was deleted.

apify-docs-theme/src/theme/Navbar/CTA/styles.module.css

Lines changed: 0 additions & 57 deletions
This file was deleted.

apify-docs-theme/src/theme/Navbar/Content/index.jsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,15 @@ import {
44
splitNavbarItems,
55
} from '@docusaurus/theme-common/internal';
66
import { usePluginData } from '@docusaurus/useGlobalData';
7+
import NavbarColorModeToggle from '@theme/Navbar/ColorModeToggle';
78
import NavbarLogo from '@theme/Navbar/Logo';
89
import NavbarMobileSidebarToggle from '@theme/Navbar/MobileSidebar/Toggle';
910
import NavbarSearch from '@theme/Navbar/Search';
1011
import NavbarItem from '@theme/NavbarItem';
1112
import React from 'react';
1213

1314
import SearchBar from '../../SearchBar';
14-
import NavbarCTA from '../CTA';
15+
import styles from './styles.module.css';
1516

1617
function NavbarItems({ items }) {
1718
return (
@@ -71,7 +72,6 @@ export default function NavbarContent() {
7172
const { navbar: { items } } = useThemeConfig();
7273
const [leftItems, rightItems] = splitNavbarItems(items);
7374
const searchBarItem = items.find((item) => item.type === 'search');
74-
7575
return (
7676
<div
7777
style={{
@@ -85,20 +85,20 @@ export default function NavbarContent() {
8585
<NavbarContentLayout
8686
left={
8787
<>
88+
<NavbarMobileSidebarToggle />
8889
<NavbarLogo />
8990
<NavbarItems items={leftItems} />
9091
</>
9192
}
9293
right={
9394
<>
95+
<NavbarColorModeToggle className={styles.colorModeToggle} />
9496
<NavbarItems items={rightItems} />
9597
{!searchBarItem && (
9698
<NavbarSearch>
9799
<SearchBar />
98100
</NavbarSearch>
99101
)}
100-
<NavbarCTA />
101-
<NavbarMobileSidebarToggle />
102102
</>
103103
}
104104
/>
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/*
2+
Hide color mode toggle in small viewports
3+
*/
4+
@media (max-width: 996px) {
5+
.colorModeToggle {
6+
display: none;
7+
}
8+
}

apify-docs-theme/src/theme/Navbar/MobileSidebar/Header/index.jsx

Lines changed: 0 additions & 46 deletions
This file was deleted.

0 commit comments

Comments
 (0)