@docusaurus/theme-classic 2.0.0-beta.8e9b829d9 → 2.0.0-beta.9
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/README.md +1 -1
- package/codeTranslations/ar.json +12 -6
- package/codeTranslations/base.json +12 -0
- package/codeTranslations/bn.json +6 -0
- package/codeTranslations/cs.json +62 -0
- package/codeTranslations/da.json +6 -0
- package/codeTranslations/de.json +8 -2
- package/codeTranslations/es.json +10 -4
- package/codeTranslations/fa.json +9 -3
- package/codeTranslations/fil.json +6 -0
- package/codeTranslations/fr.json +6 -0
- package/codeTranslations/he.json +6 -0
- package/codeTranslations/hi.json +6 -0
- package/codeTranslations/ja.json +6 -0
- package/codeTranslations/ko.json +6 -0
- package/codeTranslations/pl.json +6 -0
- package/codeTranslations/pt-BR.json +8 -2
- package/codeTranslations/pt-PT.json +6 -0
- package/codeTranslations/ru.json +6 -0
- package/codeTranslations/sr.json +62 -0
- package/codeTranslations/tr.json +9 -3
- package/codeTranslations/vi.json +10 -4
- package/codeTranslations/zh-Hans.json +6 -0
- package/codeTranslations/zh-Hant.json +6 -0
- package/lib/__tests__/validateThemeConfig.test.js +154 -4
- package/lib/index.js +2 -3
- package/lib/prism-include-languages.js +9 -5
- package/lib/theme/AnnouncementBar/index.js +8 -12
- package/lib/theme/AnnouncementBar/styles.module.css +23 -32
- package/lib/theme/BackToTopButton/index.js +27 -13
- package/lib/theme/BackToTopButton/styles.module.css +17 -14
- package/lib/theme/BlogArchivePage/index.js +89 -0
- package/lib/theme/BlogLayout/index.js +2 -6
- package/lib/theme/BlogListPage/index.js +1 -1
- package/lib/theme/BlogPostAuthor/index.js +51 -0
- package/lib/theme/BlogPostAuthor/styles.module.css +12 -0
- package/lib/theme/BlogPostAuthors/index.js +47 -0
- package/lib/theme/BlogPostAuthors/styles.module.css +11 -0
- package/lib/theme/BlogPostItem/index.js +58 -67
- package/lib/theme/BlogPostPage/index.js +33 -4
- package/lib/theme/BlogSidebar/styles.module.css +2 -2
- package/lib/theme/BlogTagsListPage/index.js +3 -28
- package/lib/theme/BlogTagsPostsPage/index.js +5 -8
- package/lib/theme/CodeBlock/index.js +44 -37
- package/lib/theme/CodeBlock/styles.module.css +1 -2
- package/lib/theme/DocItem/index.js +15 -40
- package/lib/theme/DocItem/styles.module.css +2 -12
- package/lib/theme/DocItemFooter/index.js +79 -0
- package/lib/theme/DocItemFooter/styles.module.css +18 -0
- package/lib/theme/DocPage/index.js +18 -13
- package/lib/theme/DocSidebar/index.js +11 -16
- package/lib/theme/DocSidebarItem/index.js +12 -10
- package/lib/theme/DocTagDocListPage/index.js +89 -0
- package/lib/theme/DocTagsListPage/index.js +44 -0
- package/lib/theme/DocVersionBanner/index.js +6 -4
- package/lib/theme/EditThisPage/index.js +3 -1
- package/lib/theme/Footer/index.js +5 -3
- package/lib/theme/Heading/index.js +7 -9
- package/lib/theme/Heading/styles.css +4 -6
- package/lib/theme/Heading/styles.module.css +9 -5
- package/lib/theme/IconClose/index.js +31 -0
- package/lib/theme/LastUpdated/index.js +4 -2
- package/lib/theme/LayoutHead/index.js +13 -11
- package/lib/theme/LayoutProviders/index.js +7 -5
- package/lib/theme/Logo/index.js +14 -12
- package/lib/theme/MDXComponents/index.js +27 -1
- package/lib/theme/MDXComponents/styles.css +11 -0
- package/lib/theme/MDXPage/index.js +2 -1
- package/lib/theme/Navbar/index.js +20 -3
- package/lib/theme/Navbar/styles.module.css +5 -1
- package/lib/theme/NavbarItem/DefaultNavbarItem.js +12 -4
- package/lib/theme/NavbarItem/DocNavbarItem.js +5 -3
- package/lib/theme/NavbarItem/DocsVersionDropdownNavbarItem.js +7 -1
- package/lib/theme/NavbarItem/DropdownNavbarItem.js +3 -3
- package/lib/theme/NavbarItem/{LocaleDropdownNavbarItem.js → LocaleDropdownNavbarItem/index.js} +3 -4
- package/lib/theme/NavbarItem/LocaleDropdownNavbarItem/styles.module.css +11 -0
- package/lib/theme/NavbarItem/index.js +5 -0
- package/lib/theme/Seo/index.js +10 -7
- package/lib/theme/TOC/index.js +9 -30
- package/lib/theme/TOC/styles.module.css +1 -1
- package/lib/theme/TOCCollapsible/index.js +5 -3
- package/lib/theme/TOCInline/index.js +7 -27
- package/lib/theme/TOCItems/index.js +78 -0
- package/lib/theme/Tabs/__tests__/index.test.js +123 -0
- package/lib/theme/Tabs/index.js +73 -50
- package/lib/theme/Tabs/styles.module.css +0 -13
- package/lib/theme/Tag/index.js +40 -0
- package/lib/theme/Tag/styles.module.css +70 -0
- package/lib/theme/TagsListByLetter/index.js +48 -0
- package/lib/theme/TagsListByLetter/styles.module.css +11 -0
- package/lib/theme/TagsListInline/index.js +44 -0
- package/lib/theme/TagsListInline/styles.module.css +15 -0
- package/lib/theme/ThemedImage/index.js +3 -5
- package/lib/theme/Toggle/index.js +23 -18
- package/lib/theme/Toggle/styles.module.css +91 -0
- package/lib/theme/hooks/useHideableNavbar.js +14 -31
- package/lib/theme/hooks/useTheme.js +2 -2
- package/lib/theme/hooks/useWindowSize.js +2 -7
- package/lib/theme/prism-include-languages.js +4 -3
- package/lib/translations.js +4 -4
- package/lib/types.d.ts +216 -105
- package/lib/validateThemeConfig.js +215 -254
- package/lib-next/__tests__/validateThemeConfig.test.js +154 -4
- package/lib-next/index.js +1 -2
- package/lib-next/prism-include-languages.js +0 -2
- package/lib-next/theme/AnnouncementBar/index.js +7 -12
- package/lib-next/theme/AnnouncementBar/styles.module.css +23 -32
- package/lib-next/theme/BackToTopButton/index.js +37 -17
- package/lib-next/theme/BackToTopButton/styles.module.css +17 -14
- package/lib-next/theme/BlogArchivePage/index.js +80 -0
- package/lib-next/theme/BlogLayout/index.js +4 -7
- package/lib-next/theme/BlogListPage/index.js +1 -0
- package/lib-next/theme/BlogPostAuthor/index.js +46 -0
- package/lib-next/theme/BlogPostAuthor/styles.module.css +12 -0
- package/lib-next/theme/BlogPostAuthors/index.js +34 -0
- package/lib-next/theme/BlogPostAuthors/styles.module.css +11 -0
- package/lib-next/theme/BlogPostItem/index.js +79 -86
- package/lib-next/theme/BlogPostPage/index.js +55 -8
- package/lib-next/theme/BlogSidebar/styles.module.css +2 -2
- package/lib-next/theme/BlogTagsListPage/index.js +7 -39
- package/lib-next/theme/BlogTagsPostsPage/index.js +3 -4
- package/lib-next/theme/CodeBlock/index.js +53 -49
- package/lib-next/theme/CodeBlock/styles.module.css +1 -2
- package/lib-next/theme/DocItem/index.js +27 -45
- package/lib-next/theme/DocItem/styles.module.css +2 -12
- package/lib-next/theme/DocItemFooter/index.js +79 -0
- package/lib-next/theme/DocItemFooter/styles.module.css +18 -0
- package/lib-next/theme/DocPage/index.js +18 -14
- package/lib-next/theme/DocSidebar/index.js +18 -15
- package/lib-next/theme/DocSidebarItem/index.js +31 -11
- package/lib-next/theme/DocTagDocListPage/index.js +89 -0
- package/lib-next/theme/DocTagsListPage/index.js +38 -0
- package/lib-next/theme/DocVersionBanner/index.js +16 -9
- package/lib-next/theme/EditThisPage/index.js +6 -1
- package/lib-next/theme/Footer/index.js +14 -3
- package/lib-next/theme/Heading/index.js +10 -13
- package/lib-next/theme/Heading/styles.css +4 -6
- package/lib-next/theme/Heading/styles.module.css +9 -5
- package/lib-next/theme/IconClose/index.js +23 -0
- package/lib-next/theme/LastUpdated/index.js +3 -2
- package/lib-next/theme/LayoutHead/index.js +9 -15
- package/lib-next/theme/LayoutProviders/index.js +8 -5
- package/lib-next/theme/Logo/index.js +23 -19
- package/lib-next/theme/MDXComponents/index.js +20 -1
- package/lib-next/theme/MDXComponents/styles.css +11 -0
- package/lib-next/theme/MDXPage/index.js +10 -2
- package/lib-next/theme/Navbar/index.js +27 -3
- package/lib-next/theme/Navbar/styles.module.css +5 -1
- package/lib-next/theme/NavbarItem/DefaultNavbarItem.js +15 -4
- package/lib-next/theme/NavbarItem/DocNavbarItem.js +5 -3
- package/lib-next/theme/NavbarItem/DocsVersionDropdownNavbarItem.js +12 -4
- package/lib-next/theme/NavbarItem/DropdownNavbarItem.js +4 -6
- package/lib-next/theme/NavbarItem/{LocaleDropdownNavbarItem.js → LocaleDropdownNavbarItem/index.js} +2 -6
- package/lib-next/theme/NavbarItem/LocaleDropdownNavbarItem/styles.module.css +11 -0
- package/lib-next/theme/NavbarItem/index.js +2 -0
- package/lib-next/theme/Seo/index.js +11 -7
- package/lib-next/theme/TOC/index.js +12 -36
- package/lib-next/theme/TOC/styles.module.css +1 -1
- package/lib-next/theme/TOCCollapsible/index.js +12 -3
- package/lib-next/theme/TOCInline/index.js +10 -28
- package/lib-next/theme/TOCItems/index.js +85 -0
- package/lib-next/theme/Tabs/__tests__/index.test.js +142 -0
- package/lib-next/theme/Tabs/index.js +91 -43
- package/lib-next/theme/Tabs/styles.module.css +0 -13
- package/lib-next/theme/Tag/index.js +27 -0
- package/lib-next/theme/Tag/styles.module.css +70 -0
- package/lib-next/theme/TagsListByLetter/index.js +42 -0
- package/lib-next/theme/TagsListByLetter/styles.module.css +11 -0
- package/lib-next/theme/TagsListInline/index.js +31 -0
- package/lib-next/theme/TagsListInline/styles.module.css +15 -0
- package/lib-next/theme/ThemedImage/index.js +3 -3
- package/lib-next/theme/Toggle/index.js +20 -15
- package/lib-next/theme/Toggle/styles.module.css +91 -0
- package/lib-next/theme/hooks/useHideableNavbar.js +31 -47
- package/lib-next/theme/hooks/useTheme.js +2 -2
- package/lib-next/theme/hooks/useWindowSize.js +2 -6
- package/lib-next/theme/prism-include-languages.js +2 -1
- package/lib-next/translations.js +6 -10
- package/lib-next/types.d.ts +216 -105
- package/lib-next/validateThemeConfig.js +40 -36
- package/package.json +23 -19
- package/src/__tests__/validateThemeConfig.test.js +154 -4
- package/src/index.ts +11 -9
- package/src/{prism-include-languages.js → prism-include-languages.ts} +0 -0
- package/src/theme/AnnouncementBar/index.tsx +8 -12
- package/src/theme/AnnouncementBar/styles.module.css +23 -32
- package/src/theme/BackToTopButton/index.tsx +39 -17
- package/src/theme/BackToTopButton/styles.module.css +17 -14
- package/src/theme/BlogArchivePage/index.tsx +91 -0
- package/src/theme/BlogLayout/index.tsx +4 -8
- package/src/theme/BlogListPage/index.tsx +1 -0
- package/src/theme/BlogPostAuthor/index.tsx +49 -0
- package/src/theme/BlogPostAuthor/styles.module.css +12 -0
- package/src/theme/BlogPostAuthors/index.tsx +36 -0
- package/src/theme/BlogPostAuthors/styles.module.css +11 -0
- package/src/theme/BlogPostItem/index.tsx +70 -80
- package/src/theme/BlogPostPage/index.tsx +57 -8
- package/src/theme/BlogSidebar/styles.module.css +2 -2
- package/src/theme/BlogTagsListPage/index.tsx +7 -41
- package/src/theme/BlogTagsPostsPage/index.tsx +3 -4
- package/src/theme/CodeBlock/index.tsx +63 -47
- package/src/theme/CodeBlock/styles.module.css +1 -2
- package/src/theme/DocItem/index.tsx +27 -46
- package/src/theme/DocItem/styles.module.css +2 -12
- package/src/theme/DocItemFooter/index.tsx +91 -0
- package/src/theme/DocItemFooter/styles.module.css +18 -0
- package/src/theme/DocPage/index.tsx +16 -12
- package/src/theme/DocSidebar/index.tsx +20 -16
- package/src/theme/DocSidebarItem/index.tsx +29 -10
- package/src/theme/DocTagDocListPage/index.tsx +89 -0
- package/src/theme/DocTagsListPage/index.tsx +41 -0
- package/src/theme/DocVersionBanner/index.tsx +26 -15
- package/src/theme/EditThisPage/index.tsx +6 -1
- package/src/theme/Footer/index.tsx +16 -3
- package/src/theme/Heading/index.tsx +10 -13
- package/src/theme/Heading/styles.css +4 -6
- package/src/theme/Heading/styles.module.css +9 -5
- package/src/theme/IconClose/index.tsx +26 -0
- package/src/theme/LastUpdated/index.tsx +3 -2
- package/src/theme/LayoutHead/index.tsx +9 -9
- package/src/theme/LayoutProviders/index.tsx +8 -5
- package/src/theme/Logo/index.tsx +19 -15
- package/src/theme/MDXComponents/index.tsx +20 -1
- package/src/theme/MDXComponents/styles.css +11 -0
- package/src/theme/MDXPage/index.tsx +10 -2
- package/src/theme/Navbar/index.tsx +26 -2
- package/src/theme/Navbar/styles.module.css +5 -1
- package/src/theme/NavbarItem/DefaultNavbarItem.tsx +15 -4
- package/src/theme/NavbarItem/DocNavbarItem.tsx +9 -5
- package/src/theme/NavbarItem/DocsVersionDropdownNavbarItem.tsx +15 -6
- package/src/theme/NavbarItem/DocsVersionNavbarItem.tsx +7 -3
- package/src/theme/NavbarItem/DropdownNavbarItem.tsx +4 -6
- package/src/theme/NavbarItem/{LocaleDropdownNavbarItem.tsx → LocaleDropdownNavbarItem/index.tsx} +6 -5
- package/src/theme/NavbarItem/LocaleDropdownNavbarItem/styles.module.css +11 -0
- package/src/theme/NavbarItem/index.tsx +6 -1
- package/src/theme/Seo/index.tsx +7 -4
- package/src/theme/TOC/index.tsx +13 -38
- package/src/theme/TOC/styles.module.css +1 -1
- package/src/theme/TOCCollapsible/index.tsx +8 -2
- package/src/theme/TOCInline/index.tsx +13 -32
- package/src/theme/TOCItems/index.tsx +96 -0
- package/src/theme/Tabs/__tests__/index.test.tsx +129 -0
- package/src/theme/Tabs/index.tsx +93 -49
- package/src/theme/Tabs/styles.module.css +0 -13
- package/src/theme/Tag/index.tsx +31 -0
- package/src/theme/Tag/styles.module.css +70 -0
- package/src/theme/TagsListByLetter/index.tsx +45 -0
- package/src/theme/TagsListByLetter/styles.module.css +11 -0
- package/src/theme/TagsListInline/index.tsx +35 -0
- package/src/theme/TagsListInline/styles.module.css +15 -0
- package/src/theme/ThemedImage/index.tsx +3 -3
- package/src/theme/Toggle/index.tsx +20 -15
- package/src/theme/Toggle/styles.module.css +91 -0
- package/src/theme/hooks/useContextualSearchFilters.ts +1 -1
- package/src/theme/hooks/useHideableNavbar.ts +32 -47
- package/src/theme/hooks/useTabGroupChoice.ts +2 -2
- package/src/theme/hooks/useTheme.ts +2 -2
- package/src/theme/hooks/useWindowSize.ts +2 -7
- package/src/theme/prism-include-languages.ts +3 -2
- package/src/translations.ts +6 -10
- package/src/types.d.ts +216 -105
- package/src/{validateThemeConfig.js → validateThemeConfig.ts} +46 -12
- package/tsconfig.json +0 -1
- package/update-code-translations.js +5 -4
- package/update-code-translations.test.js +1 -1
- package/update.js +151 -0
- package/lib/theme/Toggle/styles.css +0 -103
- package/lib/theme/hooks/useScrollPosition.js +0 -51
- package/lib/theme/hooks/useTOCHighlight.js +0 -87
- package/lib-next/theme/Toggle/styles.css +0 -103
- package/lib-next/theme/hooks/useScrollPosition.js +0 -42
- package/lib-next/theme/hooks/useTOCHighlight.js +0 -84
- package/src/theme/Toggle/styles.css +0 -103
- package/src/theme/hooks/useScrollPosition.ts +0 -52
- package/src/theme/hooks/useTOCHighlight.ts +0 -98
|
@@ -6,36 +6,85 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import React from 'react';
|
|
9
|
+
import Seo from '@theme/Seo';
|
|
9
10
|
import BlogLayout from '@theme/BlogLayout';
|
|
10
11
|
import BlogPostItem from '@theme/BlogPostItem';
|
|
11
12
|
import BlogPostPaginator from '@theme/BlogPostPaginator';
|
|
12
13
|
import type {Props} from '@theme/BlogPostPage';
|
|
13
14
|
import {ThemeClassNames} from '@docusaurus/theme-common';
|
|
15
|
+
import TOC from '@theme/TOC';
|
|
14
16
|
|
|
15
17
|
function BlogPostPage(props: Props): JSX.Element {
|
|
16
18
|
const {content: BlogPostContents, sidebar} = props;
|
|
17
|
-
const {
|
|
18
|
-
|
|
19
|
-
|
|
19
|
+
const {
|
|
20
|
+
// TODO this frontmatter is not validated/normalized, it's the raw user-provided one. We should expose normalized one too!
|
|
21
|
+
frontMatter,
|
|
22
|
+
assets,
|
|
23
|
+
metadata,
|
|
24
|
+
} = BlogPostContents;
|
|
25
|
+
const {title, description, nextItem, prevItem, date, tags, authors} =
|
|
26
|
+
metadata;
|
|
27
|
+
const {
|
|
28
|
+
hide_table_of_contents: hideTableOfContents,
|
|
29
|
+
keywords,
|
|
30
|
+
toc_min_heading_level: tocMinHeadingLevel,
|
|
31
|
+
toc_max_heading_level: tocMaxHeadingLevel,
|
|
32
|
+
} = frontMatter;
|
|
33
|
+
|
|
34
|
+
const image = assets.image ?? frontMatter.image;
|
|
20
35
|
|
|
21
36
|
return (
|
|
22
37
|
<BlogLayout
|
|
23
|
-
title={title}
|
|
24
|
-
description={description}
|
|
25
38
|
wrapperClassName={ThemeClassNames.wrapper.blogPages}
|
|
26
39
|
pageClassName={ThemeClassNames.page.blogPostPage}
|
|
27
40
|
sidebar={sidebar}
|
|
28
41
|
toc={
|
|
29
|
-
!hideTableOfContents &&
|
|
30
|
-
|
|
31
|
-
|
|
42
|
+
!hideTableOfContents &&
|
|
43
|
+
BlogPostContents.toc &&
|
|
44
|
+
BlogPostContents.toc.length > 0 ? (
|
|
45
|
+
<TOC
|
|
46
|
+
toc={BlogPostContents.toc}
|
|
47
|
+
minHeadingLevel={tocMinHeadingLevel}
|
|
48
|
+
maxHeadingLevel={tocMaxHeadingLevel}
|
|
49
|
+
/>
|
|
50
|
+
) : undefined
|
|
32
51
|
}>
|
|
52
|
+
<Seo
|
|
53
|
+
// TODO refactor needed: it's a bit annoying but Seo MUST be inside BlogLayout
|
|
54
|
+
// otherwise default image (set by BlogLayout) would shadow the custom blog post image
|
|
55
|
+
title={title}
|
|
56
|
+
description={description}
|
|
57
|
+
keywords={keywords}
|
|
58
|
+
image={image}>
|
|
59
|
+
<meta property="og:type" content="article" />
|
|
60
|
+
<meta property="article:published_time" content={date} />
|
|
61
|
+
|
|
62
|
+
{/* TODO double check those article metas array syntaxes, see https://ogp.me/#array */}
|
|
63
|
+
{authors.some((author) => author.url) && (
|
|
64
|
+
<meta
|
|
65
|
+
property="article:author"
|
|
66
|
+
content={authors
|
|
67
|
+
.map((author) => author.url)
|
|
68
|
+
.filter(Boolean)
|
|
69
|
+
.join(',')}
|
|
70
|
+
/>
|
|
71
|
+
)}
|
|
72
|
+
{tags.length > 0 && (
|
|
73
|
+
<meta
|
|
74
|
+
property="article:tag"
|
|
75
|
+
content={tags.map((tag) => tag.label).join(',')}
|
|
76
|
+
/>
|
|
77
|
+
)}
|
|
78
|
+
</Seo>
|
|
79
|
+
|
|
33
80
|
<BlogPostItem
|
|
34
81
|
frontMatter={frontMatter}
|
|
82
|
+
assets={assets}
|
|
35
83
|
metadata={metadata}
|
|
36
84
|
isBlogPostPage>
|
|
37
85
|
<BlogPostContents />
|
|
38
86
|
</BlogPostItem>
|
|
87
|
+
|
|
39
88
|
{(nextItem || prevItem) && (
|
|
40
89
|
<BlogPostPaginator nextItem={nextItem} prevItem={prevItem} />
|
|
41
90
|
)}
|
|
@@ -34,10 +34,10 @@
|
|
|
34
34
|
text-decoration: none;
|
|
35
35
|
}
|
|
36
36
|
.sidebarItemLinkActive {
|
|
37
|
-
color: var(--ifm-color-primary);
|
|
37
|
+
color: var(--ifm-color-primary) !important;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
@media
|
|
40
|
+
@media (max-width: 996px) {
|
|
41
41
|
.sidebar {
|
|
42
42
|
display: none;
|
|
43
43
|
}
|
|
@@ -7,51 +7,17 @@
|
|
|
7
7
|
|
|
8
8
|
import React from 'react';
|
|
9
9
|
|
|
10
|
-
import Link from '@docusaurus/Link';
|
|
11
10
|
import BlogLayout from '@theme/BlogLayout';
|
|
11
|
+
import TagsListByLetter from '@theme/TagsListByLetter';
|
|
12
12
|
import type {Props} from '@theme/BlogTagsListPage';
|
|
13
|
-
import {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
// tag's category should be customizable
|
|
18
|
-
return tag[0].toUpperCase();
|
|
19
|
-
}
|
|
13
|
+
import {
|
|
14
|
+
ThemeClassNames,
|
|
15
|
+
translateTagsPageTitle,
|
|
16
|
+
} from '@docusaurus/theme-common';
|
|
20
17
|
|
|
21
18
|
function BlogTagsListPage(props: Props): JSX.Element {
|
|
22
19
|
const {tags, sidebar} = props;
|
|
23
|
-
const title =
|
|
24
|
-
id: 'theme.tags.tagsPageTitle',
|
|
25
|
-
message: 'Tags',
|
|
26
|
-
description: 'The title of the tag list page',
|
|
27
|
-
});
|
|
28
|
-
|
|
29
|
-
const tagCategories: {[category: string]: string[]} = {};
|
|
30
|
-
Object.keys(tags).forEach((tag) => {
|
|
31
|
-
const category = getCategoryOfTag(tag);
|
|
32
|
-
tagCategories[category] = tagCategories[category] || [];
|
|
33
|
-
tagCategories[category].push(tag);
|
|
34
|
-
});
|
|
35
|
-
const tagsList = Object.entries(tagCategories).sort(([a], [b]) =>
|
|
36
|
-
a.localeCompare(b),
|
|
37
|
-
);
|
|
38
|
-
const tagsSection = tagsList
|
|
39
|
-
.map(([category, tagsForCategory]) => (
|
|
40
|
-
<article key={category}>
|
|
41
|
-
<h2>{category}</h2>
|
|
42
|
-
{tagsForCategory.map((tag) => (
|
|
43
|
-
<Link
|
|
44
|
-
className="padding-right--md"
|
|
45
|
-
href={tags[tag].permalink}
|
|
46
|
-
key={tag}>
|
|
47
|
-
{tags[tag].name} ({tags[tag].count})
|
|
48
|
-
</Link>
|
|
49
|
-
))}
|
|
50
|
-
<hr />
|
|
51
|
-
</article>
|
|
52
|
-
))
|
|
53
|
-
.filter((item) => item != null);
|
|
54
|
-
|
|
20
|
+
const title = translateTagsPageTitle();
|
|
55
21
|
return (
|
|
56
22
|
<BlogLayout
|
|
57
23
|
title={title}
|
|
@@ -63,7 +29,7 @@ function BlogTagsListPage(props: Props): JSX.Element {
|
|
|
63
29
|
}}
|
|
64
30
|
sidebar={sidebar}>
|
|
65
31
|
<h1>{title}</h1>
|
|
66
|
-
<
|
|
32
|
+
<TagsListByLetter tags={Object.values(tags)} />
|
|
67
33
|
</BlogLayout>
|
|
68
34
|
);
|
|
69
35
|
}
|
|
@@ -32,7 +32,7 @@ function useBlogPostsPlural() {
|
|
|
32
32
|
);
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
function
|
|
35
|
+
export default function BlogTagsPostsPage(props: Props): JSX.Element {
|
|
36
36
|
const {metadata, items, sidebar} = props;
|
|
37
37
|
const {allTagsPath, name: tagName, count} = metadata;
|
|
38
38
|
const blogPostsPlural = useBlogPostsPlural();
|
|
@@ -49,7 +49,7 @@ function BlogTagsPostPage(props: Props): JSX.Element {
|
|
|
49
49
|
<BlogLayout
|
|
50
50
|
title={title}
|
|
51
51
|
wrapperClassName={ThemeClassNames.wrapper.blogPages}
|
|
52
|
-
pageClassName={ThemeClassNames.page.
|
|
52
|
+
pageClassName={ThemeClassNames.page.blogTagPostListPage}
|
|
53
53
|
searchMetadatas={{
|
|
54
54
|
// assign unique search tag to exclude this page from search results!
|
|
55
55
|
tag: 'blog_tags_posts',
|
|
@@ -71,6 +71,7 @@ function BlogTagsPostPage(props: Props): JSX.Element {
|
|
|
71
71
|
<BlogPostItem
|
|
72
72
|
key={BlogPostContent.metadata.permalink}
|
|
73
73
|
frontMatter={BlogPostContent.frontMatter}
|
|
74
|
+
assets={BlogPostContent.assets}
|
|
74
75
|
metadata={BlogPostContent.metadata}
|
|
75
76
|
truncated>
|
|
76
77
|
<BlogPostContent />
|
|
@@ -79,5 +80,3 @@ function BlogTagsPostPage(props: Props): JSX.Element {
|
|
|
79
80
|
</BlogLayout>
|
|
80
81
|
);
|
|
81
82
|
}
|
|
82
|
-
|
|
83
|
-
export default BlogTagsPostPage;
|
|
@@ -18,49 +18,61 @@ import styles from './styles.module.css';
|
|
|
18
18
|
|
|
19
19
|
import {useThemeConfig, parseCodeBlockTitle} from '@docusaurus/theme-common';
|
|
20
20
|
|
|
21
|
-
const
|
|
21
|
+
const HighlightLinesRangeRegex = /{([\d,-]+)}/;
|
|
22
|
+
|
|
23
|
+
const HighlightLanguages = ['js', 'jsBlock', 'jsx', 'python', 'html'] as const;
|
|
24
|
+
type HighlightLanguage = typeof HighlightLanguages[number];
|
|
25
|
+
|
|
26
|
+
type HighlightLanguageConfig = {
|
|
27
|
+
start: string;
|
|
28
|
+
end: string;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
// Supported types of highlight comments
|
|
32
|
+
const HighlightComments: Record<HighlightLanguage, HighlightLanguageConfig> = {
|
|
33
|
+
js: {
|
|
34
|
+
start: '\\/\\/',
|
|
35
|
+
end: '',
|
|
36
|
+
},
|
|
37
|
+
jsBlock: {
|
|
38
|
+
start: '\\/\\*',
|
|
39
|
+
end: '\\*\\/',
|
|
40
|
+
},
|
|
41
|
+
jsx: {
|
|
42
|
+
start: '\\{\\s*\\/\\*',
|
|
43
|
+
end: '\\*\\/\\s*\\}',
|
|
44
|
+
},
|
|
45
|
+
python: {
|
|
46
|
+
start: '#',
|
|
47
|
+
end: '',
|
|
48
|
+
},
|
|
49
|
+
html: {
|
|
50
|
+
start: '<!--',
|
|
51
|
+
end: '-->',
|
|
52
|
+
},
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
// Supported highlight directives
|
|
56
|
+
const HighlightDirectives = [
|
|
57
|
+
'highlight-next-line',
|
|
58
|
+
'highlight-start',
|
|
59
|
+
'highlight-end',
|
|
60
|
+
];
|
|
61
|
+
|
|
22
62
|
const getHighlightDirectiveRegex = (
|
|
23
|
-
languages
|
|
63
|
+
languages: readonly HighlightLanguage[] = HighlightLanguages,
|
|
24
64
|
) => {
|
|
25
|
-
// supported types of comments
|
|
26
|
-
const comments = {
|
|
27
|
-
js: {
|
|
28
|
-
start: '\\/\\/',
|
|
29
|
-
end: '',
|
|
30
|
-
},
|
|
31
|
-
jsBlock: {
|
|
32
|
-
start: '\\/\\*',
|
|
33
|
-
end: '\\*\\/',
|
|
34
|
-
},
|
|
35
|
-
jsx: {
|
|
36
|
-
start: '\\{\\s*\\/\\*',
|
|
37
|
-
end: '\\*\\/\\s*\\}',
|
|
38
|
-
},
|
|
39
|
-
python: {
|
|
40
|
-
start: '#',
|
|
41
|
-
end: '',
|
|
42
|
-
},
|
|
43
|
-
html: {
|
|
44
|
-
start: '<!--',
|
|
45
|
-
end: '-->',
|
|
46
|
-
},
|
|
47
|
-
};
|
|
48
|
-
// supported directives
|
|
49
|
-
const directives = [
|
|
50
|
-
'highlight-next-line',
|
|
51
|
-
'highlight-start',
|
|
52
|
-
'highlight-end',
|
|
53
|
-
].join('|');
|
|
54
65
|
// to be more reliable, the opening and closing comment must match
|
|
55
66
|
const commentPattern = languages
|
|
56
|
-
.map(
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
)
|
|
67
|
+
.map((lang) => {
|
|
68
|
+
const {start, end} = HighlightComments[lang];
|
|
69
|
+
return `(?:${start}\\s*(${HighlightDirectives.join('|')})\\s*${end})`;
|
|
70
|
+
})
|
|
60
71
|
.join('|');
|
|
61
72
|
// white space is allowed, but otherwise it should be on it's own line
|
|
62
73
|
return new RegExp(`^\\s*(?:${commentPattern})\\s*$`);
|
|
63
74
|
};
|
|
75
|
+
|
|
64
76
|
// select comment styles based on language
|
|
65
77
|
const highlightDirectiveRegex = (lang: string) => {
|
|
66
78
|
switch (lang) {
|
|
@@ -89,7 +101,7 @@ const highlightDirectiveRegex = (lang: string) => {
|
|
|
89
101
|
|
|
90
102
|
export default function CodeBlock({
|
|
91
103
|
children,
|
|
92
|
-
className:
|
|
104
|
+
className: blockClassName,
|
|
93
105
|
metastring,
|
|
94
106
|
title,
|
|
95
107
|
}: Props): JSX.Element {
|
|
@@ -123,20 +135,19 @@ export default function CodeBlock({
|
|
|
123
135
|
? children.join('')
|
|
124
136
|
: (children as string);
|
|
125
137
|
|
|
126
|
-
if (metastring &&
|
|
138
|
+
if (metastring && HighlightLinesRangeRegex.test(metastring)) {
|
|
127
139
|
// Tested above
|
|
128
|
-
const highlightLinesRange = metastring.match(
|
|
140
|
+
const highlightLinesRange = metastring.match(HighlightLinesRangeRegex)![1];
|
|
129
141
|
highlightLines = rangeParser(highlightLinesRange).filter((n) => n > 0);
|
|
130
142
|
}
|
|
131
143
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
((languageClassName.replace(/language-/, '') as Language) as any);
|
|
144
|
+
const languageClassName = blockClassName
|
|
145
|
+
?.split(' ')
|
|
146
|
+
.find((str) => str.startsWith('language-'));
|
|
147
|
+
let language = languageClassName?.replace(/language-/, '') as Language;
|
|
137
148
|
|
|
138
149
|
if (!language && prism.defaultLanguage) {
|
|
139
|
-
language = prism.defaultLanguage;
|
|
150
|
+
language = prism.defaultLanguage as Language;
|
|
140
151
|
}
|
|
141
152
|
|
|
142
153
|
// only declaration OR directive highlight can be used for a block
|
|
@@ -201,7 +212,11 @@ export default function CodeBlock({
|
|
|
201
212
|
code={code}
|
|
202
213
|
language={language}>
|
|
203
214
|
{({className, style, tokens, getLineProps, getTokenProps}) => (
|
|
204
|
-
<div
|
|
215
|
+
<div
|
|
216
|
+
className={clsx(
|
|
217
|
+
styles.codeBlockContainer,
|
|
218
|
+
blockClassName?.replace(/language-[^ ]+/, ''),
|
|
219
|
+
)}>
|
|
205
220
|
{codeBlockTitle && (
|
|
206
221
|
<div style={style} className={styles.codeBlockTitle}>
|
|
207
222
|
{codeBlockTitle}
|
|
@@ -215,8 +230,8 @@ export default function CodeBlock({
|
|
|
215
230
|
style={style}>
|
|
216
231
|
<code className={styles.codeBlockLines}>
|
|
217
232
|
{tokens.map((line, i) => {
|
|
218
|
-
if (line.length === 1 && line[0].content === '') {
|
|
219
|
-
line[0].content = '
|
|
233
|
+
if (line.length === 1 && line[0].content === '\n') {
|
|
234
|
+
line[0].content = '';
|
|
220
235
|
}
|
|
221
236
|
|
|
222
237
|
const lineProps = getLineProps({line, key: i});
|
|
@@ -230,6 +245,7 @@ export default function CodeBlock({
|
|
|
230
245
|
{line.map((token, key) => (
|
|
231
246
|
<span key={key} {...getTokenProps({token, key})} />
|
|
232
247
|
))}
|
|
248
|
+
<br />
|
|
233
249
|
</span>
|
|
234
250
|
);
|
|
235
251
|
})}
|
|
@@ -7,22 +7,19 @@
|
|
|
7
7
|
|
|
8
8
|
import React from 'react';
|
|
9
9
|
import clsx from 'clsx';
|
|
10
|
-
|
|
11
|
-
import {useActivePlugin, useVersions} from '@theme/hooks/useDocs';
|
|
12
10
|
import useWindowSize from '@theme/hooks/useWindowSize';
|
|
13
11
|
import DocPaginator from '@theme/DocPaginator';
|
|
14
12
|
import DocVersionBanner from '@theme/DocVersionBanner';
|
|
15
13
|
import Seo from '@theme/Seo';
|
|
16
|
-
import LastUpdated from '@theme/LastUpdated';
|
|
17
14
|
import type {Props} from '@theme/DocItem';
|
|
15
|
+
import DocItemFooter from '@theme/DocItemFooter';
|
|
18
16
|
import TOC from '@theme/TOC';
|
|
19
17
|
import TOCCollapsible from '@theme/TOCCollapsible';
|
|
20
|
-
import EditThisPage from '@theme/EditThisPage';
|
|
21
18
|
import {MainHeading} from '@theme/Heading';
|
|
22
|
-
|
|
23
19
|
import styles from './styles.module.css';
|
|
20
|
+
import {ThemeClassNames} from '@docusaurus/theme-common';
|
|
24
21
|
|
|
25
|
-
function DocItem(props: Props): JSX.Element {
|
|
22
|
+
export default function DocItem(props: Props): JSX.Element {
|
|
26
23
|
const {content: DocContent, versionMetadata} = props;
|
|
27
24
|
const {metadata, frontMatter} = DocContent;
|
|
28
25
|
const {
|
|
@@ -30,23 +27,10 @@ function DocItem(props: Props): JSX.Element {
|
|
|
30
27
|
keywords,
|
|
31
28
|
hide_title: hideTitle,
|
|
32
29
|
hide_table_of_contents: hideTableOfContents,
|
|
30
|
+
toc_min_heading_level: tocMinHeadingLevel,
|
|
31
|
+
toc_max_heading_level: tocMaxHeadingLevel,
|
|
33
32
|
} = frontMatter;
|
|
34
|
-
const {
|
|
35
|
-
description,
|
|
36
|
-
title,
|
|
37
|
-
editUrl,
|
|
38
|
-
lastUpdatedAt,
|
|
39
|
-
formattedLastUpdatedAt,
|
|
40
|
-
lastUpdatedBy,
|
|
41
|
-
} = metadata;
|
|
42
|
-
|
|
43
|
-
const {pluginId} = useActivePlugin({failfast: true});
|
|
44
|
-
const versions = useVersions(pluginId);
|
|
45
|
-
|
|
46
|
-
// If site is not versioned or only one version is included
|
|
47
|
-
// we don't show the version badge
|
|
48
|
-
// See https://github.com/facebook/docusaurus/issues/3362
|
|
49
|
-
const showVersionBadge = versions.length > 1;
|
|
33
|
+
const {description, title} = metadata;
|
|
50
34
|
|
|
51
35
|
// We only add a title if:
|
|
52
36
|
// - user asks to hide it with frontmatter
|
|
@@ -74,8 +58,12 @@ function DocItem(props: Props): JSX.Element {
|
|
|
74
58
|
<DocVersionBanner versionMetadata={versionMetadata} />
|
|
75
59
|
<div className={styles.docItemContainer}>
|
|
76
60
|
<article>
|
|
77
|
-
{
|
|
78
|
-
<span
|
|
61
|
+
{versionMetadata.badge && (
|
|
62
|
+
<span
|
|
63
|
+
className={clsx(
|
|
64
|
+
ThemeClassNames.docs.docVersionBadge,
|
|
65
|
+
'badge badge--secondary',
|
|
66
|
+
)}>
|
|
79
67
|
Version: {versionMetadata.label}
|
|
80
68
|
</span>
|
|
81
69
|
)}
|
|
@@ -83,11 +71,17 @@ function DocItem(props: Props): JSX.Element {
|
|
|
83
71
|
{canRenderTOC && (
|
|
84
72
|
<TOCCollapsible
|
|
85
73
|
toc={DocContent.toc}
|
|
86
|
-
|
|
74
|
+
minHeadingLevel={tocMinHeadingLevel}
|
|
75
|
+
maxHeadingLevel={tocMaxHeadingLevel}
|
|
76
|
+
className={clsx(
|
|
77
|
+
ThemeClassNames.docs.docTocMobile,
|
|
78
|
+
styles.tocMobile,
|
|
79
|
+
)}
|
|
87
80
|
/>
|
|
88
81
|
)}
|
|
89
82
|
|
|
90
|
-
<div
|
|
83
|
+
<div
|
|
84
|
+
className={clsx(ThemeClassNames.docs.docMarkdown, 'markdown')}>
|
|
91
85
|
{/*
|
|
92
86
|
Title can be declared inside md content or declared through frontmatter and added manually
|
|
93
87
|
To make both cases consistent, the added title is added under the same div.markdown block
|
|
@@ -98,23 +92,7 @@ function DocItem(props: Props): JSX.Element {
|
|
|
98
92
|
<DocContent />
|
|
99
93
|
</div>
|
|
100
94
|
|
|
101
|
-
{
|
|
102
|
-
<footer className="row docusaurus-mt-lg">
|
|
103
|
-
<div className="col">
|
|
104
|
-
{editUrl && <EditThisPage editUrl={editUrl} />}
|
|
105
|
-
</div>
|
|
106
|
-
|
|
107
|
-
<div className={clsx('col', styles.lastUpdated)}>
|
|
108
|
-
{(lastUpdatedAt || lastUpdatedBy) && (
|
|
109
|
-
<LastUpdated
|
|
110
|
-
lastUpdatedAt={lastUpdatedAt}
|
|
111
|
-
formattedLastUpdatedAt={formattedLastUpdatedAt}
|
|
112
|
-
lastUpdatedBy={lastUpdatedBy}
|
|
113
|
-
/>
|
|
114
|
-
)}
|
|
115
|
-
</div>
|
|
116
|
-
</footer>
|
|
117
|
-
)}
|
|
95
|
+
<DocItemFooter {...props} />
|
|
118
96
|
</article>
|
|
119
97
|
|
|
120
98
|
<DocPaginator metadata={metadata} />
|
|
@@ -122,12 +100,15 @@ function DocItem(props: Props): JSX.Element {
|
|
|
122
100
|
</div>
|
|
123
101
|
{renderTocDesktop && (
|
|
124
102
|
<div className="col col--3">
|
|
125
|
-
<TOC
|
|
103
|
+
<TOC
|
|
104
|
+
toc={DocContent.toc}
|
|
105
|
+
minHeadingLevel={tocMinHeadingLevel}
|
|
106
|
+
maxHeadingLevel={tocMaxHeadingLevel}
|
|
107
|
+
className={ThemeClassNames.docs.docTocDesktop}
|
|
108
|
+
/>
|
|
126
109
|
</div>
|
|
127
110
|
)}
|
|
128
111
|
</div>
|
|
129
112
|
</>
|
|
130
113
|
);
|
|
131
114
|
}
|
|
132
|
-
|
|
133
|
-
export default DocItem;
|
|
@@ -5,26 +5,16 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
.docItemContainer article *:first-child,
|
|
8
|
+
.docItemContainer article > *:first-child,
|
|
9
9
|
.docItemContainer header + * {
|
|
10
10
|
margin-top: 0;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
margin-top: 0.2rem;
|
|
15
|
-
font-style: italic;
|
|
16
|
-
font-size: smaller;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
@media only screen and (min-width: 997px) {
|
|
13
|
+
@media (min-width: 997px) {
|
|
20
14
|
.docItemCol {
|
|
21
15
|
max-width: 75% !important;
|
|
22
16
|
}
|
|
23
17
|
|
|
24
|
-
.lastUpdated {
|
|
25
|
-
text-align: right;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
18
|
/* Prevent hydration FOUC, as the mobile TOC needs to be server-rendered */
|
|
29
19
|
.tocMobile {
|
|
30
20
|
display: none;
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import React from 'react';
|
|
9
|
+
import clsx from 'clsx';
|
|
10
|
+
|
|
11
|
+
import LastUpdated from '@theme/LastUpdated';
|
|
12
|
+
import type {Props} from '@theme/DocItem';
|
|
13
|
+
import EditThisPage from '@theme/EditThisPage';
|
|
14
|
+
import TagsListInline, {
|
|
15
|
+
Props as TagsListInlineProps,
|
|
16
|
+
} from '@theme/TagsListInline';
|
|
17
|
+
|
|
18
|
+
import styles from './styles.module.css';
|
|
19
|
+
import {ThemeClassNames} from '@docusaurus/theme-common';
|
|
20
|
+
|
|
21
|
+
function TagsRow(props: TagsListInlineProps) {
|
|
22
|
+
return (
|
|
23
|
+
<div
|
|
24
|
+
className={clsx(
|
|
25
|
+
ThemeClassNames.docs.docFooterTagsRow,
|
|
26
|
+
'row margin-bottom--sm',
|
|
27
|
+
)}>
|
|
28
|
+
<div className="col">
|
|
29
|
+
<TagsListInline {...props} />
|
|
30
|
+
</div>
|
|
31
|
+
</div>
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
type EditMetaRowProps = Pick<
|
|
36
|
+
Props['content']['metadata'],
|
|
37
|
+
'editUrl' | 'lastUpdatedAt' | 'lastUpdatedBy' | 'formattedLastUpdatedAt'
|
|
38
|
+
>;
|
|
39
|
+
function EditMetaRow({
|
|
40
|
+
editUrl,
|
|
41
|
+
lastUpdatedAt,
|
|
42
|
+
lastUpdatedBy,
|
|
43
|
+
formattedLastUpdatedAt,
|
|
44
|
+
}: EditMetaRowProps) {
|
|
45
|
+
return (
|
|
46
|
+
<div className={clsx(ThemeClassNames.docs.docFooterEditMetaRow, 'row')}>
|
|
47
|
+
<div className="col">{editUrl && <EditThisPage editUrl={editUrl} />}</div>
|
|
48
|
+
|
|
49
|
+
<div className={clsx('col', styles.lastUpdated)}>
|
|
50
|
+
{(lastUpdatedAt || lastUpdatedBy) && (
|
|
51
|
+
<LastUpdated
|
|
52
|
+
lastUpdatedAt={lastUpdatedAt}
|
|
53
|
+
formattedLastUpdatedAt={formattedLastUpdatedAt}
|
|
54
|
+
lastUpdatedBy={lastUpdatedBy}
|
|
55
|
+
/>
|
|
56
|
+
)}
|
|
57
|
+
</div>
|
|
58
|
+
</div>
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export default function DocItemFooter(props: Props): JSX.Element {
|
|
63
|
+
const {content: DocContent} = props;
|
|
64
|
+
const {metadata} = DocContent;
|
|
65
|
+
const {editUrl, lastUpdatedAt, formattedLastUpdatedAt, lastUpdatedBy, tags} =
|
|
66
|
+
metadata;
|
|
67
|
+
|
|
68
|
+
const canDisplayTagsRow = tags.length > 0;
|
|
69
|
+
const canDisplayEditMetaRow = !!(editUrl || lastUpdatedAt || lastUpdatedBy);
|
|
70
|
+
|
|
71
|
+
const canDisplayFooter = canDisplayTagsRow || canDisplayEditMetaRow;
|
|
72
|
+
|
|
73
|
+
if (!canDisplayFooter) {
|
|
74
|
+
return <></>;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
return (
|
|
78
|
+
<footer
|
|
79
|
+
className={clsx(ThemeClassNames.docs.docFooter, 'docusaurus-mt-lg')}>
|
|
80
|
+
{canDisplayTagsRow && <TagsRow tags={tags} />}
|
|
81
|
+
{canDisplayEditMetaRow && (
|
|
82
|
+
<EditMetaRow
|
|
83
|
+
editUrl={editUrl}
|
|
84
|
+
lastUpdatedAt={lastUpdatedAt}
|
|
85
|
+
lastUpdatedBy={lastUpdatedBy}
|
|
86
|
+
formattedLastUpdatedAt={formattedLastUpdatedAt}
|
|
87
|
+
/>
|
|
88
|
+
)}
|
|
89
|
+
</footer>
|
|
90
|
+
);
|
|
91
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
.lastUpdated {
|
|
9
|
+
margin-top: 0.2rem;
|
|
10
|
+
font-style: italic;
|
|
11
|
+
font-size: smaller;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
@media (min-width: 997px) {
|
|
15
|
+
.lastUpdated {
|
|
16
|
+
text-align: right;
|
|
17
|
+
}
|
|
18
|
+
}
|