@apify/docs-theme 1.0.79 → 1.0.81

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apify/docs-theme",
3
- "version": "1.0.79",
3
+ "version": "1.0.81",
4
4
  "description": "",
5
5
  "main": "./src/index.js",
6
6
  "files": [
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { useThemeConfig } from '@docusaurus/theme-common';
2
+ import { useThemeConfig, isRegexpStringMatch } from '@docusaurus/theme-common';
3
3
  import { usePluginData } from '@docusaurus/useGlobalData';
4
4
  import {
5
5
  splitNavbarItems,
@@ -9,6 +9,7 @@ import NavbarItem from '@theme/NavbarItem';
9
9
  import NavbarColorModeToggle from '@theme/Navbar/ColorModeToggle';
10
10
  import NavbarSearch from '@theme/Navbar/Search';
11
11
  import NavbarMobileSidebarToggle from '@theme/Navbar/MobileSidebar/Toggle';
12
+ import { useLocation } from '@docusaurus/router';
12
13
  import SearchBar from '../../SearchBar';
13
14
  import styles from './styles.module.css';
14
15
 
@@ -36,13 +37,15 @@ function NavbarContentLayout({
36
37
 
37
38
  function SubNavbar() {
38
39
  const { options: { subNavbar } } = usePluginData('@apify/docs-theme');
40
+ const location = useLocation();
41
+
39
42
  return (
40
- subNavbar ? (
43
+ subNavbar && (!subNavbar?.pathRegex || isRegexpStringMatch(subNavbar.pathRegex, location.pathname)) ? (
41
44
  <div className="navbar__inner navbar__sub">
42
45
  <div className="navbar__container">
43
46
  <div className="navbar__items">
44
47
  <div className="navbar__sub--title">
45
- <NavbarItem label={subNavbar.title} to="/"/>
48
+ <NavbarItem label={subNavbar.title} to={subNavbar.to ?? '/'} activeBaseRegex='(?!)' />
46
49
  </div>
47
50
  <NavbarItems items={subNavbar.items}/>
48
51
  </div>
@@ -96,6 +96,14 @@ html[data-theme='dark'] {
96
96
  font-weight: 600;
97
97
  }
98
98
 
99
+ .navbar__item {
100
+ font-weight: 500;
101
+ }
102
+
103
+ .navbar__sub--title > a {
104
+ font-weight: 600;
105
+ }
106
+
99
107
  .footer__title {
100
108
  font-size: 1.25rem;
101
109
  font-weight: 600;
@@ -273,20 +281,13 @@ aside .icon svg[class*=iconExternalLink] {
273
281
  }
274
282
 
275
283
  .navbar__sub--title {
276
- display: flex;
277
- align-items: center;
278
- width: 160px;
279
- justify-content: flex-end;
280
- margin-right: 40px;
281
- position: relative;
282
- }
283
-
284
- .navbar__sub--title::after {
285
- content: "";
286
- height: 20px;
287
- border-right: 1px solid var(--color-Neutral_SeparatorSubtle);
288
- position: absolute;
289
- right: -32px;
284
+ display: flex;
285
+ align-items: center;
286
+ width: 12.5rem;
287
+ padding-right: 0.5rem;
288
+ position: relative;
289
+ border-right: 1px solid var(--color-Neutral_SeparatorSubtle);
290
+ justify-content: center;
290
291
  }
291
292
 
292
293
  header.hero div[class^=heroButtons] {
@@ -701,3 +702,5 @@ html[data-theme='dark'] .beta-chip {
701
702
  a.tsd-anchor[href^="https://undefined"] {
702
703
  display: none;
703
704
  }
705
+
706
+ /* dummy comment to trigger theme publishing */