@apify/docs-theme 1.0.25 → 1.0.27

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.25",
3
+ "version": "1.0.27",
4
4
  "description": "",
5
5
  "main": "./src/index.js",
6
6
  "files": [
@@ -0,0 +1,61 @@
1
+ import React from 'react';
2
+ import Link from '@docusaurus/Link';
3
+ import useBaseUrl from '@docusaurus/useBaseUrl';
4
+ import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
5
+ import { useThemeConfig } from '@docusaurus/theme-common';
6
+ import ThemedImage from '@theme/ThemedImage';
7
+
8
+ function LogoThemedImage({ logo, alt, imageClassName }) {
9
+ const sources = {
10
+ light: useBaseUrl(logo.src),
11
+ dark: useBaseUrl(logo.srcDark || logo.src),
12
+ };
13
+ const themedImage = (
14
+ <ThemedImage
15
+ className={logo.className}
16
+ sources={sources}
17
+ height={logo.height}
18
+ width={logo.width}
19
+ alt={alt}
20
+ style={logo.style}
21
+ />
22
+ );
23
+ // Is this extra div really necessary?
24
+ // introduced in https://github.com/facebook/docusaurus/pull/5666
25
+ return imageClassName ? (
26
+ <div className={imageClassName}>{themedImage}</div>
27
+ ) : (
28
+ themedImage
29
+ );
30
+ }
31
+ export default function Logo(props) {
32
+ const {
33
+ siteConfig: { title },
34
+ } = useDocusaurusContext();
35
+ const {
36
+ navbar: { title: navbarTitle, logo },
37
+ } = useThemeConfig();
38
+ const { imageClassName, titleClassName, ...propsRest } = props;
39
+ const logoLink = useBaseUrl(logo?.href || '/');
40
+ // If visible title is shown, fallback alt text should be
41
+ // an empty string to mark the logo as decorative.
42
+ const fallbackAlt = navbarTitle ? '' : title;
43
+ // Use logo alt text if provided (including empty string),
44
+ // and provide a sensible fallback otherwise.
45
+ const alt = logo?.alt ?? fallbackAlt;
46
+ return (
47
+ <Link
48
+ to={logoLink}
49
+ {...propsRest}
50
+ {...(logo?.target && { target: logo.target })}>
51
+ {logo && (
52
+ <LogoThemedImage
53
+ logo={logo}
54
+ alt={alt}
55
+ imageClassName={imageClassName}
56
+ />
57
+ )}
58
+ {!logo ? <b className={titleClassName}>{navbarTitle}</b> : null}
59
+ </Link>
60
+ );
61
+ }
@@ -182,6 +182,7 @@ html.plugin-pages .main-wrapper {
182
182
 
183
183
  .main-wrapper > div {
184
184
  max-width: var(--max-layout-width);
185
+ margin: auto;
185
186
  }
186
187
 
187
188
  aside > div > a {
@@ -591,27 +592,3 @@ html[data-theme='dark'] .actionLink:hover::after {
591
592
  background-image: url('/img/arrow-right-primary.svg');
592
593
  margin-left: 8px;
593
594
  }
594
-
595
-
596
- pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}/*!
597
- Theme: GitHub
598
- Description: Light theme as seen on github.com
599
- Author: github.com
600
- Maintainer: @Hirse
601
- Updated: 2021-05-15
602
-
603
- Outdated base version: https://github.com/primer/github-syntax-light
604
- Current colors taken from GitHub's CSS
605
- */
606
- .hljs{color:#24292e;background:#fff}.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-template-tag,.hljs-template-variable,.hljs-type,.hljs-variable.language_{color:#d73a49}.hljs-title,.hljs-title.class_,.hljs-title.class_.inherited__,.hljs-title.function_{color:#6f42c1}.hljs-attr,.hljs-attribute,.hljs-literal,.hljs-meta,.hljs-number,.hljs-operator,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-id,.hljs-variable{color:#005cc5}.hljs-meta .hljs-string,.hljs-regexp,.hljs-string{color:#032f62}.hljs-built_in,.hljs-symbol{color:#e36209}.hljs-code,.hljs-comment,.hljs-formula{color:#6a737d}.hljs-name,.hljs-quote,.hljs-selector-pseudo,.hljs-selector-tag{color:#22863a}.hljs-subst{color:#24292e}.hljs-section{color:#005cc5;font-weight:700}.hljs-bullet{color:#735c0f}.hljs-emphasis{color:#24292e;font-style:italic}.hljs-strong{color:#24292e;font-weight:700}.hljs-addition{color:#22863a;background-color:#f0fff4}.hljs-deletion{color:#b31d28;background-color:#ffeef0}
607
-
608
- /*!
609
- Theme: GitHub Dark Dimmed
610
- Description: Dark dimmed theme as seen on github.com
611
- Author: github.com
612
- Maintainer: @Hirse
613
- Updated: 2021-05-15
614
-
615
- Colors taken from GitHub's CSS
616
- */
617
- html[data-theme="dark"] .hljs{color:#adbac7;background:#22272e}html[data-theme="dark"] .hljs-doctag,html[data-theme="dark"] .hljs-keyword,html[data-theme="dark"] .hljs-meta .hljs-keyword,html[data-theme="dark"] .hljs-template-tag,html[data-theme="dark"] .hljs-template-variable,html[data-theme="dark"] .hljs-type,html[data-theme="dark"] .hljs-variable.language_{color:#f47067}html[data-theme="dark"] .hljs-title,html[data-theme="dark"] .hljs-title.class_,html[data-theme="dark"] .hljs-title.class_.inherited__,html[data-theme="dark"] .hljs-title.function_{color:#dcbdfb}html[data-theme="dark"] .hljs-attr,html[data-theme="dark"] .hljs-attribute,html[data-theme="dark"] .hljs-literal,html[data-theme="dark"] .hljs-meta,html[data-theme="dark"] .hljs-number,html[data-theme="dark"] .hljs-operator,html[data-theme="dark"] .hljs-selector-attr,html[data-theme="dark"] .hljs-selector-class,html[data-theme="dark"] .hljs-selector-id,html[data-theme="dark"] .hljs-variable{color:#6cb6ff}html[data-theme="dark"] .hljs-meta .hljs-string,html[data-theme="dark"] .hljs-regexp,html[data-theme="dark"] .hljs-string{color:#96d0ff}html[data-theme="dark"] .hljs-built_in,html[data-theme="dark"] .hljs-symbol{color:#f69d50}html[data-theme="dark"] .hljs-code,html[data-theme="dark"] .hljs-comment,html[data-theme="dark"] .hljs-formula{color:#768390}html[data-theme="dark"] .hljs-name,html[data-theme="dark"] .hljs-quote,html[data-theme="dark"] .hljs-selector-pseudo,html[data-theme="dark"] .hljs-selector-tag{color:#8ddb8c}html[data-theme="dark"] .hljs-subst{color:#adbac7}html[data-theme="dark"] .hljs-section{color:#316dca;font-weight:700}html[data-theme="dark"] .hljs-bullet{color:#eac55f}html[data-theme="dark"] .hljs-emphasis{color:#adbac7;font-style:italic}html[data-theme="dark"] .hljs-strong{color:#adbac7;font-weight:700}html[data-theme="dark"] .hljs-addition{color:#b4f1b4;background-color:#1b4721}html[data-theme="dark"] .hljs-deletion{color:#ffd8d3;background-color:#78191b}