From 85f13f440651396bd14cc69502e319be2a367dc1 Mon Sep 17 00:00:00 2001 From: katzino Date: Tue, 1 Jul 2025 14:36:57 +0200 Subject: [PATCH 1/9] feat: header facelift --- apify-docs-theme/src/config.js | 24 +- apify-docs-theme/src/theme/Footer/index.jsx | 16 +- .../src/theme/Footer/index.module.css | 83 +++++- apify-docs-theme/src/theme/Layout/index.jsx | 3 - .../src/theme/Navbar/CTA/index.jsx | 7 + .../src/theme/Navbar/CTA/styles.module.css | 57 ++++ .../src/theme/Navbar/Content/index.jsx | 8 +- .../theme/Navbar/Content/styles.module.css | 8 - .../Navbar/MobileSidebar/Header/index.jsx | 42 +++ apify-docs-theme/src/theme/SearchBar/index.js | 1 + .../src/theme/SearchBar/styles.css | 92 +++++- apify-docs-theme/src/theme/custom.css | 279 ++++++++++++------ 12 files changed, 480 insertions(+), 140 deletions(-) create mode 100644 apify-docs-theme/src/theme/Navbar/CTA/index.jsx create mode 100644 apify-docs-theme/src/theme/Navbar/CTA/styles.module.css delete mode 100644 apify-docs-theme/src/theme/Navbar/Content/styles.module.css create mode 100644 apify-docs-theme/src/theme/Navbar/MobileSidebar/Header/index.jsx diff --git a/apify-docs-theme/src/config.js b/apify-docs-theme/src/config.js index f0a098a0a..2a9e06553 100644 --- a/apify-docs-theme/src/config.js +++ b/apify-docs-theme/src/config.js @@ -137,20 +137,6 @@ const themeConfig = { }, ], }, - { - href: 'https://github.com/apify', - label: 'GitHub', - title: 'Apify on GitHub', - position: 'right', - className: 'icon', - }, - { - href: 'https://discord.com/invite/jyEM2PRvMU', - label: 'Discord', - title: 'Chat on Discord', - position: 'right', - className: 'icon', - }, ], }, colorMode: { @@ -256,6 +242,10 @@ const themeConfig = { label: 'GitHub', href: 'https://github.com/apify', }, + { + href: 'https://discord.com/invite/jyEM2PRvMU', + label: 'Discord', + }, { label: 'Trust Center', href: 'https://trust.apify.com', @@ -274,9 +264,15 @@ const themeConfig = { appId: 'N8EOCSBQGH', apiKey: 'e97714a64e2b4b8b8fe0b01cd8592870', // search only (public) API key indexName: 'test_test_apify_sdk', + placeholder: 'Search documentation', algoliaOptions: { facetFilters: ['version:VERSION'], }, + translations: { + button: { + buttonText: 'Search documentation...', + }, + }, }, hubspot: { accountId: '19497222', diff --git a/apify-docs-theme/src/theme/Footer/index.jsx b/apify-docs-theme/src/theme/Footer/index.jsx index fb5b24ee1..3d2dbb939 100644 --- a/apify-docs-theme/src/theme/Footer/index.jsx +++ b/apify-docs-theme/src/theme/Footer/index.jsx @@ -1,5 +1,6 @@ import { useThemeConfig } from '@docusaurus/theme-common'; import LinkItem from '@theme/Footer/LinkItem'; +import ColorModeToggle from '@theme/Navbar/ColorModeToggle'; import clsx from 'clsx'; import React from 'react'; @@ -8,7 +9,7 @@ import styles from './index.module.css'; function FooterLinksColumn({ column }) { return ( <> -
{column.title}
+
{column.title}