Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
157 changes: 85 additions & 72 deletions apify-docs-theme/src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,91 +19,99 @@ const themeConfig = {
target: '_self',
},
items: [
// Product zone
{
label: 'Academy',
href: `${absoluteUrl}/academy`,
activeBasePath: 'academy',
label: 'Get Started',
href: `${absoluteUrl}/platform/get-started`,
activeBasePath: 'platform/get-started',
position: 'left',
target: '_self',
rel: 'dofollow',
},
{
label: 'Platform',
href: `${absoluteUrl}/platform`,
className: 'navbar__active',
activeBasePath: 'platform',
label: 'Actors',
href: `${absoluteUrl}/platform/actors`,
activeBasePath: 'platform/actors',
position: 'left',
target: '_self',
rel: 'dofollow',
},
{
label: 'API',
type: 'dropdown',
to: `${absoluteUrl}/api`,
label: 'Integrations',
href: `${absoluteUrl}/platform/integrations`,
activeBasePath: 'platform/integrations',
position: 'left',
target: '_self',
rel: 'dofollow',
},
{
label: 'Account',
href: `${absoluteUrl}/platform/account`,
activeBasePath: 'platform/account',
position: 'left',
target: '_self',
rel: 'dofollow',
activeBasePath: 'api',
},
{
label: 'Resources',
type: 'dropdown',
position: 'left',
items: [
{
label: 'Reference',
label: 'API Reference',
href: `${absoluteUrl}/api/v2`,
target: '_self',
rel: 'dofollow',
},
{
label: 'Client for JavaScript',
href: `${absoluteUrl}/api/client/js/docs`,
label: 'SDK for JavaScript',
href: `${absoluteUrl}/sdk/js/docs/overview`,
target: '_self',
rel: 'dofollow',
},
{
label: 'Client for Python',
href: `${absoluteUrl}/api/client/python/docs/overview`,
label: 'SDK for Python',
href: `${absoluteUrl}/sdk/python/docs/overview`,
target: '_self',
rel: 'dofollow',
},
],
},
{
label: 'SDK',
type: 'dropdown',
to: `${absoluteUrl}/sdk`,
activeBasePath: 'sdk',
position: 'left',
target: '_self',
rel: 'dofollow',
items: [
{
label: 'SDK for JavaScript',
href: `${absoluteUrl}/sdk/js/docs/overview`,
label: 'Client for JavaScript',
href: `${absoluteUrl}/api/client/js/docs`,
target: '_self',
rel: 'dofollow',
},
{
html: 'SDK for Python',
href: `${absoluteUrl}/sdk/python/docs/overview`,
label: 'Client for Python',
href: `${absoluteUrl}/api/client/python/docs/overview`,
target: '_self',
rel: 'dofollow',
},
{
label: 'CLI',
href: `${absoluteUrl}/cli/docs`,
target: '_self',
rel: 'dofollow',
},
],
},
// Ecosystem zone
{
label: 'CLI',
href: `${absoluteUrl}/cli/docs`,
label: 'Learn',
href: `${absoluteUrl}/academy`,
activeBasePath: 'academy',
position: 'left',
activeBasePath: 'cli',
target: '_self',
rel: 'dofollow',
className: 'navbar__zone-separator',
},
{
label: 'Open source',
label: 'Open Source',
type: 'dropdown',
to: `${absoluteUrl}/open-source`,
activeBasePath: 'open-source',
target: '_self',
position: 'left',
className: 'navbar__item',
items: [
{
label: 'Crawlee',
Expand Down Expand Up @@ -161,48 +169,43 @@ const themeConfig = {
footer: {
links: [
{
title: 'Learn',
title: 'Product',
items: [
{
label: 'Academy',
href: `${absoluteUrl}/academy`,
target: '_self',
rel: 'dofollow',
},
{
label: 'Platform',
href: `${absoluteUrl}/platform`,
label: 'Get Started',
href: `${absoluteUrl}/platform/get-started`,
target: '_self',
rel: 'dofollow',
},
],
},
{
title: 'API',
items: [
{
label: 'Reference',
href: `${absoluteUrl}/api/v2`,
label: 'Actors',
href: `${absoluteUrl}/platform/actors`,
target: '_self',
rel: 'dofollow',
},
{
label: 'Client for JavaScript',
href: `${absoluteUrl}/api/client/js/docs`,
label: 'Integrations',
href: `${absoluteUrl}/platform/integrations`,
target: '_self',
rel: 'dofollow',
},
{
label: 'Client for Python',
href: `${absoluteUrl}/api/client/python/docs/overview`,
label: 'Account',
href: `${absoluteUrl}/platform/account`,
target: '_self',
rel: 'dofollow',
},
],
},
{
title: 'SDK',
title: 'Developer tools',
items: [
{
label: 'API Reference',
href: `${absoluteUrl}/api/v2`,
target: '_self',
rel: 'dofollow',
},
{
label: 'SDK for JavaScript',
href: `${absoluteUrl}/sdk/js/docs/overview`,
Expand All @@ -215,33 +218,26 @@ const themeConfig = {
target: '_self',
rel: 'dofollow',
},
],
},
{
title: 'Other',
items: [
{
label: 'CLI',
href: `${absoluteUrl}/cli/docs`,
position: 'left',
target: '_self',
rel: 'dofollow',
},
{
label: 'Open source',
href: `${absoluteUrl}/open-source`,
position: 'left',
target: '_self',
rel: 'dofollow',
},
],
},
{
title: 'More',
title: 'Learn & community',
items: [
{
label: 'Academy',
href: `${absoluteUrl}/academy`,
target: '_self',
rel: 'dofollow',
},
{
label: 'Crawlee',
to: 'https://crawlee.dev',
href: 'https://crawlee.dev',
rel: 'dofollow',
},
{
Expand All @@ -252,6 +248,23 @@ const themeConfig = {
href: 'https://discord.com/invite/jyEM2PRvMU',
label: 'Discord',
},
],
},
{
title: 'Company',
items: [
{
label: 'Security',
href: `${absoluteUrl}/platform/security`,
target: '_self',
rel: 'dofollow',
},
{
label: 'Limits',
href: `${absoluteUrl}/platform/limits`,
target: '_self',
rel: 'dofollow',
},
{
label: 'Trust Center',
href: 'https://trust.apify.com',
Expand Down
12 changes: 7 additions & 5 deletions apify-docs-theme/src/theme/NavbarItem/NavbarNavLink.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,17 @@
.some((item) => (item.to || item.href).endsWith(location.pathname));

if (href) {
const hrefClassName = activeBaseUrl

Check failure on line 64 in apify-docs-theme/src/theme/NavbarItem/NavbarNavLink.jsx

View workflow job for this annotation

GitHub Actions / Lint app code

Do not nest ternary expressions
? (location.pathname.startsWith(`/${activeBasePath}`) || dropDownHasActiveItem
? 'navbar__item navbar__link navbar__link--active'
: 'navbar__item navbar__link')
: undefined;
const combinedClassName = [hrefClassName, props.className].filter(Boolean).join(' ') || undefined;
return (
<Link
href={prependBaseUrlToHref ? normalizedHref : href}
{...props}
{...(activeBaseUrl && {
className: location.pathname.startsWith(`/${activeBasePath}`) || dropDownHasActiveItem
? 'navbar__item navbar__link navbar__link--active'
: 'navbar__item navbar__link',
})}
{...(combinedClassName && { className: combinedClassName })}
{...linkContentProps}
/>
);
Expand Down
16 changes: 16 additions & 0 deletions apify-docs-theme/src/theme/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -554,6 +554,22 @@ aside .icon svg[class*=iconExternalLink] {
display: none;
}

.navbar__zone-separator {
position: relative;
margin-left: 1.2rem !important;
padding-left: 1.6rem !important;
}

.navbar__zone-separator::before {
content: '';
position: absolute;
left: 0;
top: 25%;
height: 50%;
width: 1px;
background-color: var(--ifm-color-emphasis-400);
}

.navbar__items {
gap: 0.4rem;
}
Expand Down
Loading
Loading