@myst-theme/site 0.1.22 → 0.1.23
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": "@myst-theme/site",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.23",
|
|
4
4
|
"main": "./src/index.ts",
|
|
5
5
|
"types": "./src/index.ts",
|
|
6
6
|
"files": [
|
|
@@ -14,19 +14,18 @@
|
|
|
14
14
|
"lint:format": "prettier --check \"src/**/*.{ts,tsx,md}\""
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@curvenote/icons": "^0.0.3",
|
|
18
17
|
"@headlessui/react": "^1.7.8",
|
|
19
18
|
"@heroicons/react": "^2.0.14",
|
|
20
|
-
"@myst-theme/diagrams": "^0.1.
|
|
21
|
-
"@myst-theme/frontmatter": "^0.1.
|
|
22
|
-
"@myst-theme/jupyter": "^0.1.
|
|
23
|
-
"@myst-theme/providers": "^0.1.
|
|
19
|
+
"@myst-theme/diagrams": "^0.1.23",
|
|
20
|
+
"@myst-theme/frontmatter": "^0.1.23",
|
|
21
|
+
"@myst-theme/jupyter": "^0.1.23",
|
|
22
|
+
"@myst-theme/providers": "^0.1.23",
|
|
24
23
|
"classnames": "^2.3.2",
|
|
25
24
|
"lodash.throttle": "^4.1.1",
|
|
26
25
|
"myst-common": "^0.0.12",
|
|
27
|
-
"myst-config": "^0.0.
|
|
28
|
-
"myst-demo": "^0.1.
|
|
29
|
-
"myst-to-react": "^0.1.
|
|
26
|
+
"myst-config": "^0.0.9",
|
|
27
|
+
"myst-demo": "^0.1.23",
|
|
28
|
+
"myst-to-react": "^0.1.23",
|
|
30
29
|
"mystjs": "^0.0.15",
|
|
31
30
|
"nbtx": "^0.2.3",
|
|
32
31
|
"node-cache": "^5.1.2",
|
|
@@ -7,12 +7,14 @@ export function Navigation({
|
|
|
7
7
|
top,
|
|
8
8
|
height,
|
|
9
9
|
hide_toc,
|
|
10
|
+
footer,
|
|
10
11
|
}: {
|
|
11
12
|
children?: React.ReactNode;
|
|
12
13
|
projectSlug?: string;
|
|
13
14
|
top?: number;
|
|
14
15
|
height?: number;
|
|
15
16
|
hide_toc?: boolean;
|
|
17
|
+
footer?: React.ReactNode;
|
|
16
18
|
}) {
|
|
17
19
|
const [open, setOpen] = useNavOpen();
|
|
18
20
|
if (hide_toc) return <>{children}</>;
|
|
@@ -25,7 +27,7 @@ export function Navigation({
|
|
|
25
27
|
></div>
|
|
26
28
|
)}
|
|
27
29
|
{children}
|
|
28
|
-
<TableOfContents projectSlug={projectSlug} top={top} height={height} />
|
|
30
|
+
<TableOfContents projectSlug={projectSlug} top={top} height={height} footer={footer} />
|
|
29
31
|
</>
|
|
30
32
|
);
|
|
31
33
|
}
|
|
@@ -2,7 +2,6 @@ import React from 'react';
|
|
|
2
2
|
import classNames from 'classnames';
|
|
3
3
|
import { NavLink, useParams, useLocation } from '@remix-run/react';
|
|
4
4
|
import type { SiteManifest } from 'myst-config';
|
|
5
|
-
import { CreatedInCurvenote } from '@curvenote/icons';
|
|
6
5
|
import { useNavOpen, useSiteManifest, useUrlbase, withUrlbase } from '@myst-theme/providers';
|
|
7
6
|
import { getProjectHeadings } from '../../loaders';
|
|
8
7
|
import type { Heading } from '../../types';
|
|
@@ -106,12 +105,12 @@ export const TableOfContents = ({
|
|
|
106
105
|
projectSlug,
|
|
107
106
|
top,
|
|
108
107
|
height,
|
|
109
|
-
|
|
108
|
+
footer,
|
|
110
109
|
}: {
|
|
111
110
|
top?: number;
|
|
112
111
|
height?: number;
|
|
113
112
|
projectSlug?: string;
|
|
114
|
-
|
|
113
|
+
footer?: React.ReactNode;
|
|
115
114
|
}) => {
|
|
116
115
|
const [open] = useNavOpen();
|
|
117
116
|
const config = useSiteManifest();
|
|
@@ -145,11 +144,7 @@ export const TableOfContents = ({
|
|
|
145
144
|
>
|
|
146
145
|
<Headings folder={resolvedProjectSlug} headings={headings} sections={config?.projects} />
|
|
147
146
|
</nav>
|
|
148
|
-
{
|
|
149
|
-
<div className="flex-none py-4">
|
|
150
|
-
<CreatedInCurvenote />
|
|
151
|
-
</div>
|
|
152
|
-
)}
|
|
147
|
+
{footer && <div className="flex-none py-4">{footer}</div>}
|
|
153
148
|
</div>
|
|
154
149
|
);
|
|
155
150
|
};
|
|
@@ -10,7 +10,6 @@ import {
|
|
|
10
10
|
import type { SiteManifest, SiteNavItem } from 'myst-config';
|
|
11
11
|
import { ThemeButton } from './ThemeButton';
|
|
12
12
|
import { useNavOpen, useSiteManifest } from '@myst-theme/providers';
|
|
13
|
-
import { CurvenoteLogo } from '@curvenote/icons';
|
|
14
13
|
import { LoadingBar } from './Loading';
|
|
15
14
|
|
|
16
15
|
export const DEFAULT_NAV_HEIGHT = 60;
|
|
@@ -109,7 +108,7 @@ function NavItem({ item }: { item: SiteNavItem }) {
|
|
|
109
108
|
to={action.url || ''}
|
|
110
109
|
className={({ isActive }) =>
|
|
111
110
|
classNames(
|
|
112
|
-
'block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 hover:text-black',
|
|
111
|
+
' block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 hover:text-black ',
|
|
113
112
|
{
|
|
114
113
|
'text-black font-bold': isActive,
|
|
115
114
|
},
|
|
@@ -190,13 +189,12 @@ function HomeLink({ logo, logoText, name }: { logo?: string; logoText?: string;
|
|
|
190
189
|
prefetch="intent"
|
|
191
190
|
>
|
|
192
191
|
{logo && <img src={logo} className="h-9 mr-3" alt={logoText || name} height="2.25rem"></img>}
|
|
193
|
-
{nothingSet && <CurvenoteLogo className="mr-3" fill="#FFF" size={30} />}
|
|
194
192
|
<span
|
|
195
193
|
className={classNames('text-md sm:text-xl tracking-tight sm:mr-5', {
|
|
196
194
|
'sr-only': !(logoText || nothingSet),
|
|
197
195
|
})}
|
|
198
196
|
>
|
|
199
|
-
{logoText || '
|
|
197
|
+
{logoText || 'Made with MyST'}
|
|
200
198
|
</span>
|
|
201
199
|
</Link>
|
|
202
200
|
);
|