@apify/docs-theme 1.0.251 → 1.0.253

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.251",
3
+ "version": "1.0.253",
4
4
  "description": "",
5
5
  "main": "./src/index.js",
6
6
  "files": [
package/src/config.js CHANGED
@@ -136,13 +136,6 @@ const themeConfig = {
136
136
  },
137
137
  ],
138
138
  },
139
- {
140
- href: 'https://discord.com/invite/jyEM2PRvMU',
141
- label: 'Discord',
142
- title: 'Chat on Discord',
143
- position: 'right',
144
- className: 'icon',
145
- },
146
139
  ],
147
140
  },
148
141
  colorMode: {
@@ -1,6 +1,6 @@
1
1
  import styles from './styles.module.css';
2
2
 
3
- const buttonText = 'Go to Console';
3
+ const buttonText = 'Get started';
4
4
 
5
5
  function clickHandler() {
6
6
  if (window.analytics) {
@@ -0,0 +1,10 @@
1
+ export function DiscordIcon({ color = 'currentColor', size = 24 }) {
2
+ return (
3
+ <svg width={size} height={size} viewBox="100 195 800 625" xmlns="http://www.w3.org/2000/svg">
4
+ <path
5
+ fill={color}
6
+ d="M386 203h2l7 9c-128 36-186 92-186 92s15-8 41-20c76-34 136-43 161-45 4-1 8-1 12-1 43-6 92-7 143-2 67 8 139 28 213 68 0 0-56-53-176-90l9-11s97-2 199 74c0 0 102 185 102 412 0 0-60 103-216 108 0 0-26-30-47-57 93-26 128-84 128-84-29 19-57 32-81 41-36 15-70 25-103 31-68 12-130 9-183-1-40-8-75-19-104-30-16-7-34-15-52-24-2-2-4-3-6-4-1-1-2-1-3-2-13-7-20-12-20-12s34 56 124 83c-21 27-47 59-47 59-157-5-216-108-216-108 0-227 102-412 102-412 95-71 186-74 197-74m-18 264c-41 0-72 35-72 78s32 79 72 79 72-36 72-79c1-43-32-78-72-78m258 0c-40 0-72 35-72 78s32 79 72 79 72-36 72-79-32-78-72-78"
7
+ />
8
+ </svg>
9
+ );
10
+ }
@@ -11,6 +11,7 @@ import React from 'react';
11
11
 
12
12
  // import SearchBar from '../../SearchBar';
13
13
  import NavbarCTA from '../CTA';
14
+ import { DiscordIcon } from './DiscordIcon';
14
15
 
15
16
  function NavbarItems({ items }) {
16
17
  return (
@@ -22,11 +23,12 @@ function NavbarItems({ items }) {
22
23
  );
23
24
  }
24
25
 
25
- function NavbarContentLayout({ left, right }) {
26
+ function NavbarContentLayout({ left, center, right }) {
26
27
  return (
27
28
  <div className="navbar__inner">
28
29
  <div className="navbar__container">
29
30
  <div className="navbar__items">{left}</div>
31
+ <div className="navbar__items navbar__items--center">{center}</div>
30
32
  <div className="navbar__items navbar__items--right">{right}</div>
31
33
  </div>
32
34
  </div>
@@ -88,22 +90,42 @@ export default function NavbarContent() {
88
90
  left={
89
91
  <>
90
92
  <NavbarLogo />
91
- <NavbarItems items={leftItems} />
92
93
  </>
93
94
  }
95
+ center={
96
+ !searchBarItem && (
97
+ <NavbarSearch>
98
+ <SearchBar />
99
+ </NavbarSearch>
100
+ )
101
+ }
94
102
  right={
95
103
  <>
96
- <NavbarItems items={rightItems} />
97
- {!searchBarItem && (
98
- <NavbarSearch>
99
- <SearchBar />
100
- </NavbarSearch>
101
- )}
104
+ <a
105
+ href="https://discord.com/invite/jyEM2PRvMU"
106
+ className="icon"
107
+ target="_blank"
108
+ rel="noopener noreferrer"
109
+ >
110
+ <DiscordIcon size={20} />
111
+ </a>
102
112
  <NavbarCTA />
103
113
  <NavbarMobileSidebarToggle />
104
114
  </>
105
115
  }
106
116
  />
117
+ <NavbarContentLayout
118
+ left={
119
+ <>
120
+ <NavbarItems items={leftItems} />
121
+ </>
122
+ }
123
+ right={
124
+ <>
125
+ <NavbarItems items={rightItems} />
126
+ </>
127
+ }
128
+ />
107
129
  <SubNavbar />
108
130
  </div>
109
131
  );
@@ -0,0 +1,20 @@
1
+ export function SparklesIcon({ color = 'currentColor', size = 16 }) {
2
+ return (
3
+ <svg
4
+ width={size}
5
+ height={size}
6
+ viewBox="0 0 16 15"
7
+ fill="none"
8
+ xmlns="http://www.w3.org/2000/svg"
9
+ aria-hidden="true"
10
+ >
11
+ <path
12
+ d="M11.6673 12.5007C12.1093 12.5007 12.5333 12.6762 12.8458 12.9888C13.1584 13.3014 13.334 13.7253 13.334 14.1673C13.334 13.7253 13.5096 13.3014 13.8221 12.9888C14.1347 12.6762 14.5586 12.5007 15.0007 12.5007C14.5586 12.5007 14.1347 12.3251 13.8221 12.0125C13.5096 11.6999 13.334 11.276 13.334 10.834C13.334 11.276 13.1584 11.6999 12.8458 12.0125C12.5333 12.3251 12.1093 12.5007 11.6673 12.5007ZM11.6673 2.50065C12.1093 2.50065 12.5333 2.67625 12.8458 2.98881C13.1584 3.30137 13.334 3.72529 13.334 4.16732C13.334 3.72529 13.5096 3.30137 13.8221 2.98881C14.1347 2.67625 14.5586 2.50065 15.0007 2.50065C14.5586 2.50065 14.1347 2.32506 13.8221 2.0125C13.5096 1.69994 13.334 1.27601 13.334 0.833984C13.334 1.27601 13.1584 1.69994 12.8458 2.0125C12.5333 2.32506 12.1093 2.50065 11.6673 2.50065ZM5.83398 12.5007C5.83398 11.1746 6.36077 9.9028 7.29845 8.96512C8.23613 8.02744 9.5079 7.50065 10.834 7.50065C9.5079 7.50065 8.23613 6.97387 7.29845 6.03618C6.36077 5.0985 5.83398 3.82673 5.83398 2.50065C5.83398 3.82673 5.3072 5.0985 4.36952 6.03618C3.43184 6.97387 2.16007 7.50065 0.833984 7.50065C2.16007 7.50065 3.43184 8.02744 4.36952 8.96512C5.3072 9.9028 5.83398 11.1746 5.83398 12.5007Z"
13
+ stroke={color}
14
+ strokeWidth="1.66667"
15
+ strokeLinecap="round"
16
+ strokeLinejoin="round"
17
+ />
18
+ </svg>
19
+ );
20
+ }
@@ -6,6 +6,7 @@ import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
6
6
  import { useState, useCallback } from 'react';
7
7
 
8
8
  import { ApifySearch } from '@apify/docs-search-modal';
9
+ import { SparklesIcon } from './SparklesIcon';
9
10
 
10
11
  // needs to be imported as the last thing, so that it can override the default styles
11
12
  // TODO: update simple-import-sort to allow importing css as last.
@@ -106,6 +107,7 @@ function KapaAIButton({ onClick }) {
106
107
  {() => (
107
108
  <div onClick={onClick}>
108
109
  <button type="button" className="AskAI-Button" aria-label="Ask AI">
110
+ <SparklesIcon size={14} />
109
111
  Ask AI
110
112
  </button>
111
113
  </div>
@@ -26,19 +26,20 @@
26
26
  .AskAI-Button {
27
27
  height: 4rem;
28
28
  padding: 0.8rem 1.6rem !important;
29
- background-color: var(--ifm-color-primary);
29
+ background-color: rgba(255, 255, 255, 0);
30
30
  border-radius: 8px;
31
- color: var(--color-neutral-text-on-primary);
32
31
  font-family: inherit;
33
32
  font-size: 1.6rem;
34
- font-weight: 500;
33
+ font-weight: 400;
35
34
  line-height: 2.4rem;
36
- border: none;
35
+ border: 1px solid var(--color-neutral-border);
37
36
  box-shadow: none;
38
37
  outline: none;
39
38
  box-sizing: border-box;
40
39
  cursor: pointer;
41
- display: block;
40
+ display: flex;
41
+ align-items: center;
42
+ gap: 0.6rem;
42
43
  position: relative;
43
44
  text-align: center;
44
45
  transition: all var(--ifm-transition-fast) var(--ifm-transition-timing-default);
@@ -53,6 +54,12 @@
53
54
  display: none;
54
55
  }
55
56
 
57
+ @media (min-width: 769px) {
58
+ .DocSearch-Button {
59
+ width: 30rem;
60
+ }
61
+ }
62
+
56
63
  @media (max-width: 768px) {
57
64
  .SearchButton-Container {
58
65
  width: 100%;
@@ -551,34 +551,16 @@ aside > div > a > b {
551
551
  top: 10px;
552
552
  }
553
553
 
554
- .navbar .icon {
555
- font-size: 0;
556
- padding: 4px;
557
- line-height: 0;
558
- }
559
-
560
- .navbar .icon::before {
561
- content: '';
562
- display: block;
563
- width: 24px;
564
- height: 24px;
565
- background-size: cover;
566
- }
567
-
568
- .navbar .icon[href*='github']::before {
569
- background-image: url('/img/github-brand.svg');
570
- }
571
-
572
- html[data-theme='dark'] .navbar .navbar__link[href*='github']:before {
573
- background-image: url('/img/github-brand-dark.svg');
574
- }
575
-
576
- .navbar .icon[href*='discord']::before {
577
- background-image: url('/img/discord-brand.svg');
578
- }
579
-
580
- html[data-theme='dark'] .navbar .navbar__link[href*='discord']:before {
581
- background-image: url('/img/discord-brand-dark.svg');
554
+ .navbar .icon[href*='discord'] {
555
+ display: flex;
556
+ align-items: center;
557
+ justify-content: center;
558
+ width: 4rem;
559
+ height: 4rem;
560
+ background-color: var(--color-Neutral_BackgroundMuted);
561
+ border: 1px solid var(--color-neutral-border);
562
+ border-radius: 4px;
563
+ color: var(--ifm-navbar-link-color);
582
564
  }
583
565
 
584
566
  .navbar .icon svg[class*='iconExternalLink'],
@@ -679,7 +661,6 @@ article .card h2 {
679
661
  display: inline-block !important;
680
662
  width: 100%;
681
663
  overflow: hidden;
682
- white-space: nowrap;
683
664
  }
684
665
 
685
666
  .tsd-flag {
@@ -720,10 +701,6 @@ aside button[class*='collapseSidebarButton'] svg {
720
701
  transform: scale(0.7) rotate(180deg);
721
702
  }
722
703
 
723
- .table-of-contents__link {
724
- height: 20px;
725
- }
726
-
727
704
  .navbar .dropdown--hoverable::after {
728
705
  top: 100%;
729
706
  width: 100%;
@@ -1,3 +0,0 @@
1
- <svg width="80" height="80" viewBox="0 0 1000 1000" xmlns="http://www.w3.org/2000/svg">
2
- <path fill="#F5F6F7" d="M500 0C224 0 0 224 0 500s224 500 500 500 500-224 500-500S776 0 500 0M386 203h2l7 9c-128 36-186 92-186 92s15-8 41-20c76-34 136-43 161-45 4-1 8-1 12-1 43-6 92-7 143-2 67 8 139 28 213 68 0 0-56-53-176-90l9-11s97-2 199 74c0 0 102 185 102 412 0 0-60 103-216 108 0 0-26-30-47-57 93-26 128-84 128-84-29 19-57 32-81 41-36 15-70 25-103 31-68 12-130 9-183-1-40-8-75-19-104-30-16-7-34-15-52-24-2-2-4-3-6-4-1-1-2-1-3-2-13-7-20-12-20-12s34 56 124 83c-21 27-47 59-47 59-157-5-216-108-216-108 0-227 102-412 102-412 95-71 186-74 197-74m-18 264c-41 0-72 35-72 78s32 79 72 79 72-36 72-79c1-43-32-78-72-78m258 0c-40 0-72 35-72 78s32 79 72 79 72-36 72-79-32-78-72-78"/>
3
- </svg>
@@ -1,3 +0,0 @@
1
- <svg width="80" height="80" viewBox="0 0 1000 1000" xmlns="http://www.w3.org/2000/svg">
2
- <path fill="#333" d="M500 0C224 0 0 224 0 500s224 500 500 500 500-224 500-500S776 0 500 0M386 203h2l7 9c-128 36-186 92-186 92s15-8 41-20c76-34 136-43 161-45 4-1 8-1 12-1 43-6 92-7 143-2 67 8 139 28 213 68 0 0-56-53-176-90l9-11s97-2 199 74c0 0 102 185 102 412 0 0-60 103-216 108 0 0-26-30-47-57 93-26 128-84 128-84-29 19-57 32-81 41-36 15-70 25-103 31-68 12-130 9-183-1-40-8-75-19-104-30-16-7-34-15-52-24-2-2-4-3-6-4-1-1-2-1-3-2-13-7-20-12-20-12s34 56 124 83c-21 27-47 59-47 59-157-5-216-108-216-108 0-227 102-412 102-412 95-71 186-74 197-74m-18 264c-41 0-72 35-72 78s32 79 72 79 72-36 72-79c1-43-32-78-72-78m258 0c-40 0-72 35-72 78s32 79 72 79 72-36 72-79-32-78-72-78"/>
3
- </svg>