@patternfly/documentation-framework 2.0.0-alpha.4 → 2.0.0-alpha.41
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/CHANGELOG.md +350 -0
- package/app.js +12 -11
- package/components/autoLinkHeader/autoLinkHeader.css +2 -2
- package/components/cssVariables/cssSearch.js +3 -4
- package/components/cssVariables/cssVariables.css +4 -4
- package/components/cssVariables/cssVariables.js +72 -70
- package/components/example/example.css +29 -29
- package/components/example/example.js +4 -4
- package/components/footer/footer.css +15 -15
- package/components/footer/footer.js +13 -13
- package/components/functionsTable/functionsTable.js +57 -0
- package/components/gdprBanner/gdprBanner.css +2 -2
- package/components/gdprBanner/gdprBanner.js +3 -3
- package/components/inlineAlert/inlineAlert.js +1 -1
- package/components/propsTable/propsTable.js +85 -79
- package/components/sectionGallery/sectionDataListLayout.js +67 -0
- package/components/sectionGallery/sectionGallery.css +44 -0
- package/components/sectionGallery/sectionGallery.js +53 -0
- package/components/sectionGallery/sectionGalleryLayout.js +37 -0
- package/components/sectionGallery/sectionGalleryToolbar.js +30 -0
- package/components/sectionGallery/sectionGalleryWrapper.js +89 -0
- package/components/sideNav/sideNav.css +12 -12
- package/components/sideNav/sideNav.js +12 -5
- package/components/tableOfContents/tableOfContents.css +17 -17
- package/components/topNav/topNav.css +12 -12
- package/helpers/getTitle.js +2 -2
- package/layouts/sideNavLayout/sideNavLayout.css +7 -11
- package/layouts/sideNavLayout/sideNavLayout.js +57 -40
- package/package.json +28 -25
- package/pages/404/404.css +2 -2
- package/pages/404/index.js +4 -4
- package/pages/global-css-variables.md +16 -16
- package/pages/red-hat-font.md +1 -1
- package/routes.js +19 -5
- package/scripts/cli/build.js +6 -0
- package/scripts/cli/cli.js +2 -0
- package/scripts/cli/generate.js +2 -2
- package/scripts/cli/start.js +6 -8
- package/scripts/md/parseMD.js +40 -8
- package/scripts/md/styled-tags.js +2 -2
- package/scripts/tsDocgen.js +119 -91
- package/scripts/typeDocGen.js +209 -0
- package/scripts/webpack/webpack.base.config.js +34 -32
- package/scripts/webpack/webpack.client.config.js +11 -8
- package/scripts/webpack/webpack.server.config.js +8 -5
- package/scripts/writeScreenshots.js +3 -3
- package/templates/html.ejs +1 -3
- package/templates/mdx.css +155 -160
- package/templates/mdx.js +60 -43
- package/templates/patternfly-docs/content/extensions/extension/design-guidelines/design-guidelines.md +2 -0
- package/templates/patternfly-docs/content/extensions/extension/examples/basic.md +2 -0
- package/versions.json +29 -9
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
..ws-mdx-content-content {
|
|
2
|
+
max-width: initial !important;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.ws-section-gallery {
|
|
6
|
+
/* top placement */
|
|
7
|
+
margin-top: calc(var(--pf-v5-c-page__main-section--PaddingTop) * -1);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
/* Toolbar styles */
|
|
11
|
+
.ws-section-gallery .pf-v5-c-toolbar {
|
|
12
|
+
margin-left: calc(var(--pf-v5-c-page__main-section--PaddingLeft) * -1);
|
|
13
|
+
border-bottom: var(--pf-v5-c-page__sidebar--m-light--BorderRightWidth) solid var(--pf-v5-c-page__sidebar--m-light--BorderRightColor);
|
|
14
|
+
margin-bottom: var(--pf-v5-global--spacer--md);
|
|
15
|
+
width: calc(100% + var(--pf-v5-c-page__main-section--PaddingLeft) + var(--pf-v5-c-page__main-section--PaddingRight));
|
|
16
|
+
/* avoid hoverable data list items overlapping toolbar */
|
|
17
|
+
z-index: calc(var(--pf-v5-global--ZIndex--xs) + 2);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/* Match toolbar left-padding to gallery left-padding */
|
|
21
|
+
.ws-section-gallery .pf-v5-c-toolbar .pf-v5-c-toolbar__content {
|
|
22
|
+
--pf-v5-c-toolbar__content--PaddingLeft: var(--pf-v5-c-page__main-section--PaddingLeft);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/* Avoid toolbar wrap on smaller screens */
|
|
26
|
+
.ws-section-gallery .pf-v5-c-toolbar__content-section {
|
|
27
|
+
flex-wrap: nowrap;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/* Avoid link styling on gallery/data list item names */
|
|
31
|
+
.ws-section-gallery-item {
|
|
32
|
+
text-decoration: inherit;
|
|
33
|
+
color: inherit;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/* Ensure same height for all cards in a gallery row */
|
|
37
|
+
.ws-section-gallery .pf-v5-c-card {
|
|
38
|
+
height: 100%;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/* Limit width for data list view only */
|
|
42
|
+
.ws-section-gallery .pf-v5-c-data-list {
|
|
43
|
+
max-width: 956px;
|
|
44
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
import './sectionGallery.css';
|
|
4
|
+
import { SectionGalleryToolbar } from "./sectionGalleryToolbar";
|
|
5
|
+
import { SectionGalleryLayout } from "./sectionGalleryLayout";
|
|
6
|
+
import { SectionDataListLayout } from "./sectionDataListLayout";
|
|
7
|
+
import { SectionGalleryWrapper } from "./sectionGalleryWrapper";
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Helper component returns gallery of items with search toolbar and switchable gallery/data list views.
|
|
11
|
+
* @param {Object} illustrations - Object of preview images mapped to their snake_case item display name
|
|
12
|
+
* @param {string} section - Name of the navigation section to create the gallery within
|
|
13
|
+
* @param {Object} galleryItemsData - Object containing the image location & summary text mapped to the gallery item's hyphenated-name
|
|
14
|
+
* @param {string} [placeholderText=Search by name] - Optional text to be displayed as placeholder for SearchInput
|
|
15
|
+
* @param {string} [countText= items] - Optional text to be displayed after the number of search results
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
export const SectionGallery = ({
|
|
19
|
+
illustrations,
|
|
20
|
+
section,
|
|
21
|
+
subsection = null,
|
|
22
|
+
includeSubsections = false,
|
|
23
|
+
parseSubsections = false,
|
|
24
|
+
galleryItemsData,
|
|
25
|
+
placeholderText,
|
|
26
|
+
countText
|
|
27
|
+
}) => (
|
|
28
|
+
<SectionGalleryWrapper
|
|
29
|
+
illustrations={illustrations}
|
|
30
|
+
section={section}
|
|
31
|
+
subsection={subsection}
|
|
32
|
+
includeSubsections={includeSubsections}
|
|
33
|
+
parseSubsections={parseSubsections}
|
|
34
|
+
galleryItemsData={galleryItemsData}
|
|
35
|
+
>
|
|
36
|
+
{(sectionGalleryItems, searchTerm, setSearchTerm, layoutView, setLayoutView) => {
|
|
37
|
+
return (
|
|
38
|
+
<>
|
|
39
|
+
<SectionGalleryToolbar
|
|
40
|
+
galleryItems={sectionGalleryItems}
|
|
41
|
+
searchTerm={searchTerm}
|
|
42
|
+
setSearchTerm={setSearchTerm}
|
|
43
|
+
layoutView={layoutView}
|
|
44
|
+
setLayoutView={setLayoutView}
|
|
45
|
+
placeholderText={placeholderText}
|
|
46
|
+
countText={countText}
|
|
47
|
+
/>
|
|
48
|
+
<SectionGalleryLayout galleryItems={sectionGalleryItems} layoutView={layoutView} />
|
|
49
|
+
<SectionDataListLayout galleryItems={sectionGalleryItems} layoutView={layoutView} />
|
|
50
|
+
</>
|
|
51
|
+
)}}
|
|
52
|
+
</SectionGalleryWrapper>
|
|
53
|
+
);
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Gallery, GalleryItem, Card, CardTitle, CardBody, CardFooter, Label } from "@patternfly/react-core";
|
|
3
|
+
import { Link } from '../link/link';
|
|
4
|
+
|
|
5
|
+
export const SectionGalleryLayout = ({ galleryItems, layoutView }) => {
|
|
6
|
+
if (layoutView !== 'grid') {
|
|
7
|
+
return null;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
return (
|
|
11
|
+
<Gallery hasGutter>
|
|
12
|
+
{galleryItems.map(({idx, slug, id, itemName, illustration, isBeta}) => (
|
|
13
|
+
<GalleryItem span={4} key={idx}>
|
|
14
|
+
<Link to={slug} className="ws-section-gallery-item">
|
|
15
|
+
<Card
|
|
16
|
+
id={id}
|
|
17
|
+
key={idx}
|
|
18
|
+
isSelectableRaised
|
|
19
|
+
>
|
|
20
|
+
<CardTitle>{itemName}</CardTitle>
|
|
21
|
+
{illustration && (
|
|
22
|
+
<CardBody>
|
|
23
|
+
<img src={illustration} alt={`${itemName} illustration`} />
|
|
24
|
+
</CardBody>
|
|
25
|
+
)}
|
|
26
|
+
{isBeta && (
|
|
27
|
+
<CardFooter>
|
|
28
|
+
<Label color="blue">Beta feature</Label>
|
|
29
|
+
</CardFooter>
|
|
30
|
+
)}
|
|
31
|
+
</Card>
|
|
32
|
+
</Link>
|
|
33
|
+
</GalleryItem>
|
|
34
|
+
))}
|
|
35
|
+
</Gallery>
|
|
36
|
+
)
|
|
37
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Button, SearchInput, Toolbar, ToolbarContent, ToolbarGroup, ToolbarItem, Text, TextVariants, ToggleGroup, ToggleGroupItem } from '@patternfly/react-core';
|
|
3
|
+
import ListIcon from '@patternfly/react-icons/dist/esm/icons/list-icon';
|
|
4
|
+
import ThIcon from'@patternfly/react-icons/dist/esm/icons/th-icon';
|
|
5
|
+
|
|
6
|
+
export const SectionGalleryToolbar = ({ galleryItems, searchTerm, setSearchTerm, layoutView, setLayoutView, placeholderText ="Search by name", countText=" items" }) => (
|
|
7
|
+
<Toolbar isSticky>
|
|
8
|
+
<ToolbarContent>
|
|
9
|
+
<ToolbarItem variant="search-filter" widths={{default: '100%', md: '320px'}}>
|
|
10
|
+
<SearchInput onClear={false} value={searchTerm} placeholder={placeholderText} onChange={(_evt, val) => setSearchTerm(val)} />
|
|
11
|
+
</ToolbarItem>
|
|
12
|
+
{searchTerm && (
|
|
13
|
+
<ToolbarItem>
|
|
14
|
+
<Button variant="link" onClick={() => setSearchTerm('')}>Reset</Button>
|
|
15
|
+
</ToolbarItem>
|
|
16
|
+
)}
|
|
17
|
+
<ToolbarGroup variant="icon-button-group">
|
|
18
|
+
<ToolbarItem>
|
|
19
|
+
<ToggleGroup>
|
|
20
|
+
<ToggleGroupItem icon={<ThIcon />} aria-label="grid icon button" isSelected={layoutView === 'grid'} onChange={() => setLayoutView('grid')}></ToggleGroupItem>
|
|
21
|
+
<ToggleGroupItem icon={<ListIcon />} aria-label="list icon button" isSelected={layoutView === 'list'} onChange={() => setLayoutView('list')}></ToggleGroupItem>
|
|
22
|
+
</ToggleGroup>
|
|
23
|
+
</ToolbarItem>
|
|
24
|
+
</ToolbarGroup>
|
|
25
|
+
<ToolbarItem variant="pagination" spacer={{default: 'spacerMd', md: 'spacerNone'}} style={{'--pf-v5-c-toolbar__item--MinWidth': "max-content"}}>
|
|
26
|
+
<Text component={TextVariants.small}>{ galleryItems.length }{ countText }</Text>
|
|
27
|
+
</ToolbarItem>
|
|
28
|
+
</ToolbarContent>
|
|
29
|
+
</Toolbar>
|
|
30
|
+
);
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { groupedRoutes } from '../../routes';
|
|
3
|
+
|
|
4
|
+
export const SectionGalleryWrapper = ({section, subsection, galleryItemsData, illustrations, includeSubsections, parseSubsections, children }) => {
|
|
5
|
+
let sectionRoutes = subsection ? groupedRoutes[section][subsection] : groupedRoutes[section];
|
|
6
|
+
if (!includeSubsections || parseSubsections) {
|
|
7
|
+
const sectionRoutesArr = Object.entries(sectionRoutes);
|
|
8
|
+
// loop through galleryItems object and build new object to handle subsections
|
|
9
|
+
sectionRoutes = sectionRoutesArr.reduce((acc, [navName, routeData]) => {
|
|
10
|
+
// exit immediately if current item is isSubsection flag
|
|
11
|
+
if (navName === 'isSubsection') {
|
|
12
|
+
return acc;
|
|
13
|
+
}
|
|
14
|
+
// add current item
|
|
15
|
+
if (includeSubsections || !routeData.isSubsection) {
|
|
16
|
+
acc[navName] = routeData;
|
|
17
|
+
}
|
|
18
|
+
// drill down into current item if subsection and parseSubsections === true
|
|
19
|
+
if (parseSubsections && routeData.isSubsection) {
|
|
20
|
+
// loop through each subsection item & add
|
|
21
|
+
Object.entries(routeData).map(([subitemName, subitemData]) => {
|
|
22
|
+
if (subitemName !== 'isSubsection') {
|
|
23
|
+
acc[subitemName] = subitemData;
|
|
24
|
+
}
|
|
25
|
+
})
|
|
26
|
+
}
|
|
27
|
+
return acc;
|
|
28
|
+
}, {})
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const [searchTerm, setSearchTerm] = React.useState('');
|
|
32
|
+
const [layoutView, setLayoutView] = React.useState('grid');
|
|
33
|
+
const filteredItems = Object.entries(sectionRoutes)
|
|
34
|
+
.filter(([itemName, { slug }]) => (
|
|
35
|
+
// exclude current gallery page from results
|
|
36
|
+
slug !== location.pathname &&
|
|
37
|
+
itemName
|
|
38
|
+
.toLowerCase()
|
|
39
|
+
.includes(searchTerm.toLowerCase())
|
|
40
|
+
));
|
|
41
|
+
const sectionGalleryItems = filteredItems
|
|
42
|
+
.sort(([itemName1], [itemName2]) => itemName1.localeCompare(itemName2))
|
|
43
|
+
.map(([itemName, itemData], idx) => {
|
|
44
|
+
// Convert to lowercase-camelcase ex: File upload - multiple ==> file_upload_multiple
|
|
45
|
+
const illustrationName = itemName
|
|
46
|
+
.replace('-', '')
|
|
47
|
+
.replace(' ',' ')
|
|
48
|
+
.split(' ')
|
|
49
|
+
.join('_')
|
|
50
|
+
.toLowerCase();
|
|
51
|
+
const illustration = illustrations[illustrationName] || illustrations.default_placeholder;
|
|
52
|
+
const { title, id, sources, isSubsection = false } = itemData;
|
|
53
|
+
// Display beta label if tab other than a '-next' tab is marked Beta
|
|
54
|
+
const isBeta = !isSubsection && sources && sources.some(src => src.beta && !src.source.includes('-next'));
|
|
55
|
+
let slug = itemData.slug;
|
|
56
|
+
if (!slug && isSubsection) {
|
|
57
|
+
// Update slug to link to first page in subsection
|
|
58
|
+
const subsectionItems = Object.entries(itemData).filter(([name, _data]) => name !== 'isSubsection');
|
|
59
|
+
const sortedSubsectionItems = subsectionItems.sort((
|
|
60
|
+
[name1, {sortValue: sortValue1 = 50}],
|
|
61
|
+
[name2, {sortValue: sortValue2 = 50}]
|
|
62
|
+
) => {
|
|
63
|
+
if (sortValue1 === sortValue2) {
|
|
64
|
+
return name1.localeCompare(name2);
|
|
65
|
+
}
|
|
66
|
+
return sortValue1 > sortValue2 ? 1 : -1;
|
|
67
|
+
});
|
|
68
|
+
const firstSubsectionItem = sortedSubsectionItems[0];
|
|
69
|
+
slug = firstSubsectionItem[1].slug;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
return {
|
|
73
|
+
idx,
|
|
74
|
+
slug,
|
|
75
|
+
itemName,
|
|
76
|
+
illustration,
|
|
77
|
+
isBeta,
|
|
78
|
+
title,
|
|
79
|
+
id,
|
|
80
|
+
galleryItemsData
|
|
81
|
+
};
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
return (
|
|
85
|
+
<div className="ws-section-gallery">
|
|
86
|
+
{ children(sectionGalleryItems, searchTerm, setSearchTerm, layoutView, setLayoutView) }
|
|
87
|
+
</div>
|
|
88
|
+
)
|
|
89
|
+
};
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
.ws-page-sidebar .pf-c-nav {
|
|
2
|
-
--pf-c-nav__link--before--BorderBottomWidth: 0;
|
|
3
|
-
--pf-c-nav--m-light__link--hover--BackgroundColor: var(--pf-global--BackgroundColor--light-200);
|
|
4
|
-
--pf-c-nav--m-light__link--focus--BackgroundColor: var(--pf-global--BackgroundColor--light-200);
|
|
5
|
-
--pf-c-nav--m-light__link--m-current--BackgroundColor: var(--pf-global--BackgroundColor--light-200);
|
|
6
|
-
--pf-c-nav--m-light__link--active--BackgroundColor: var(--pf-global--BackgroundColor--light-200);
|
|
7
|
-
--pf-c-nav__link--m-current--BackgroundColor: var(--pf-global--BackgroundColor--200);
|
|
1
|
+
.ws-page-sidebar .pf-v5-c-nav {
|
|
2
|
+
--pf-v5-c-nav__link--before--BorderBottomWidth: 0;
|
|
3
|
+
--pf-v5-c-nav--m-light__link--hover--BackgroundColor: var(--pf-v5-global--BackgroundColor--light-200);
|
|
4
|
+
--pf-v5-c-nav--m-light__link--focus--BackgroundColor: var(--pf-v5-global--BackgroundColor--light-200);
|
|
5
|
+
--pf-v5-c-nav--m-light__link--m-current--BackgroundColor: var(--pf-v5-global--BackgroundColor--light-200);
|
|
6
|
+
--pf-v5-c-nav--m-light__link--active--BackgroundColor: var(--pf-v5-global--BackgroundColor--light-200);
|
|
7
|
+
--pf-v5-c-nav__link--m-current--BackgroundColor: var(--pf-v5-global--BackgroundColor--200);
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
.ws-side-nav-list .pf-c-nav__item.pf-m-expandable::before {
|
|
10
|
+
.ws-side-nav-list .pf-v5-c-nav__item.pf-m-expandable::before {
|
|
11
11
|
border-bottom: 0;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
.pf-c-nav__subsection-title {
|
|
15
|
-
color: var(--ws-toc-link--Color, var(--pf-global--Color--300));
|
|
16
|
-
font-size: var(--pf-global--FontSize--sm);
|
|
14
|
+
.pf-v5-c-nav__subsection-title {
|
|
15
|
+
color: var(--ws-toc-link--Color, var(--pf-v5-global--Color--300));
|
|
16
|
+
font-size: var(--pf-v5-global--FontSize--sm);
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
#ws-sticky-nav-tabs {
|
|
20
|
-
z-index: var(--pf-global--ZIndex--2xl);
|
|
20
|
+
z-index: var(--pf-v5-global--ZIndex--2xl);
|
|
21
21
|
}
|
|
@@ -12,19 +12,21 @@ const getIsActive = (location, section, subsection = null) => {
|
|
|
12
12
|
return location.pathname.startsWith(`${process.env.pathPrefix}${slug}`);
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
+
const defaultValue = 50;
|
|
16
|
+
|
|
15
17
|
const NavItem = ({ text, href }) => {
|
|
16
18
|
const isMobileView = window.innerWidth < Number.parseInt(globalBreakpointXl.value, 10);
|
|
17
19
|
return (
|
|
18
20
|
<PageContextConsumer key={href + text}>
|
|
19
21
|
{({onNavToggle, isNavOpen }) => (
|
|
20
|
-
<li key={href + text} className="pf-c-nav__item" onClick={() => isMobileView && onNavToggle()}>
|
|
22
|
+
<li key={href + text} className="pf-v5-c-nav__item" onClick={() => isMobileView && onNavToggle()}>
|
|
21
23
|
<Link
|
|
22
24
|
to={href}
|
|
23
25
|
getProps={({ isCurrent, href, location }) => {
|
|
24
26
|
const { pathname } = location;
|
|
25
27
|
return {
|
|
26
28
|
className: css(
|
|
27
|
-
'pf-c-nav__link',
|
|
29
|
+
'pf-v5-c-nav__link',
|
|
28
30
|
(isCurrent || pathname.startsWith(href + '/')) && 'pf-m-current'
|
|
29
31
|
)
|
|
30
32
|
}}
|
|
@@ -67,9 +69,14 @@ const ExpandableNav = ({groupedRoutes, location, section, subsection = null}) =>
|
|
|
67
69
|
}}
|
|
68
70
|
>
|
|
69
71
|
{Object.entries(routes || {})
|
|
70
|
-
.filter(([id,
|
|
71
|
-
.map(([id, { slug, isSubsection = false }]) => ({ text: id, href: slug, isSubsection }))
|
|
72
|
-
.sort(({
|
|
72
|
+
.filter(([id, navObj]) => !Boolean(navObj.hideNavItem) && (Object.entries(navObj).length > 0))
|
|
73
|
+
.map(([id, { slug, isSubsection = false, sortValue = defaultValue, subsectionSortValue = defaultValue }]) => ({ text: id, href: slug, isSubsection, sortValue: (isSubsection ? subsectionSortValue : sortValue) }))
|
|
74
|
+
.sort(({text: text1, sortValue: sortValue1}, {text: text2, sortValue: sortValue2}) => {
|
|
75
|
+
if (sortValue1 === sortValue2) {
|
|
76
|
+
return text1.localeCompare(text2);
|
|
77
|
+
}
|
|
78
|
+
return sortValue1 > sortValue2 ? 1 : -1;
|
|
79
|
+
})
|
|
73
80
|
.map(navObj => navObj.isSubsection
|
|
74
81
|
? ExpandableNav({groupedRoutes, location, section, subsection: navObj.text})
|
|
75
82
|
: NavItem(navObj)
|
|
@@ -1,39 +1,39 @@
|
|
|
1
1
|
.ws-toc {
|
|
2
2
|
align-self: flex-start;
|
|
3
3
|
position: sticky;
|
|
4
|
-
width: calc(100% + var(--pf-c-page__main-section--PaddingLeft) + var(--pf-c-page__main-section--PaddingRight));
|
|
5
|
-
background-color: var(--pf-global--BackgroundColor--200);
|
|
4
|
+
width: calc(100% + var(--pf-v5-c-page__main-section--PaddingLeft) + var(--pf-v5-c-page__main-section--PaddingRight));
|
|
5
|
+
background-color: var(--pf-v5-global--BackgroundColor--200);
|
|
6
6
|
z-index: 501;
|
|
7
|
-
margin: calc(var(--pf-c-page__main-section--PaddingTop) * -1) calc(var(--pf-c-page__main-section--PaddingRight) * -2) var(--pf-global--spacer--md) calc(var(--pf-c-page__main-section--PaddingLeft) * -1);
|
|
8
|
-
padding: var(--pf-global--spacer--md) 0 var(--pf-global--spacer--md) var(--pf-global--spacer--md);
|
|
9
|
-
box-shadow: var(--pf-global--BoxShadow--lg-bottom);
|
|
7
|
+
margin: calc(var(--pf-v5-c-page__main-section--PaddingTop) * -1) calc(var(--pf-v5-c-page__main-section--PaddingRight) * -2) var(--pf-v5-global--spacer--md) calc(var(--pf-v5-c-page__main-section--PaddingLeft) * -1);
|
|
8
|
+
padding: var(--pf-v5-global--spacer--md) 0 var(--pf-v5-global--spacer--md) var(--pf-v5-global--spacer--md);
|
|
9
|
+
box-shadow: var(--pf-v5-global--BoxShadow--lg-bottom);
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
.ws-toc.pf-m-expanded {
|
|
13
|
-
box-shadow: var(--pf-global--BoxShadow--sm-bottom)
|
|
13
|
+
box-shadow: var(--pf-v5-global--BoxShadow--sm-bottom)
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
/* Mobile jumplinks */
|
|
17
17
|
@media (max-width: 1450px) {
|
|
18
|
-
.ws-toc.pf-m-expanded .pf-c-jump-links__main {
|
|
18
|
+
.ws-toc.pf-m-expanded .pf-v5-c-jump-links__main {
|
|
19
19
|
max-height: 65vh;
|
|
20
20
|
overflow: auto;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
.ws-toc .pf-c-jump-links__header {
|
|
23
|
+
.ws-toc .pf-v5-c-jump-links__header {
|
|
24
24
|
position: sticky;
|
|
25
25
|
top: 0;
|
|
26
|
-
background-color: var(--pf-global--BackgroundColor--200);
|
|
26
|
+
background-color: var(--pf-v5-global--BackgroundColor--200);
|
|
27
27
|
z-index: 2;
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
.ws-toc .pf-c-jump-links__main {
|
|
31
|
+
.ws-toc .pf-v5-c-jump-links__main {
|
|
32
32
|
scrollbar-width: none;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
/* Hide TOC scrollbar Chrome, Safari & Opera */
|
|
36
|
-
.ws-toc .pf-c-jump-links__main::-webkit-scrollbar {
|
|
36
|
+
.ws-toc .pf-v5-c-jump-links__main::-webkit-scrollbar {
|
|
37
37
|
display: none;
|
|
38
38
|
}
|
|
39
39
|
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
-ms-overflow-style: none;
|
|
47
47
|
scrollbar-width: none;
|
|
48
48
|
order: 1;
|
|
49
|
-
padding: 0 var(--pf-global--spacer--lg) var(--pf-global--spacer--lg) var(--pf-global--spacer--2xl);
|
|
49
|
+
padding: 0 var(--pf-v5-global--spacer--lg) var(--pf-v5-global--spacer--lg) var(--pf-v5-global--spacer--2xl);
|
|
50
50
|
flex-grow: 1;
|
|
51
51
|
background: none;
|
|
52
52
|
margin: 0;
|
|
@@ -59,18 +59,18 @@
|
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
/* .ws-toc-link { */
|
|
62
|
-
.ws-toc-item .pf-c-jump-links__link {
|
|
62
|
+
.ws-toc-item .pf-v5-c-jump-links__link {
|
|
63
63
|
position: relative;
|
|
64
64
|
display: block;
|
|
65
|
-
color: var(--ws-toc-link--Color, var(--pf-global--Color--300));
|
|
66
|
-
font-size: var(--pf-global--FontSize--sm);
|
|
65
|
+
color: var(--ws-toc-link--Color, var(--pf-v5-global--Color--300));
|
|
66
|
+
font-size: var(--pf-v5-global--FontSize--sm);
|
|
67
67
|
margin: -4px 0;
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
-
.ws-toc-sublist > .ws-toc-item:first-child .pf-c-jump-links__link {
|
|
70
|
+
.ws-toc-sublist > .ws-toc-item:first-child .pf-v5-c-jump-links__link {
|
|
71
71
|
margin-top: 0;
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
-
.ws-toc-item.pf-m-current .pf-c-jump-links__link::before {
|
|
74
|
+
.ws-toc-item.pf-m-current .pf-v5-c-jump-links__link::before {
|
|
75
75
|
z-index: 1;
|
|
76
76
|
}
|
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
/* Don't bother with specifity war */
|
|
2
|
-
.ws-top-nav-link.pf-c-nav__link {
|
|
3
|
-
color: var(--pf-global--BackgroundColor--light-100);
|
|
2
|
+
.ws-top-nav-link.pf-v5-c-nav__link {
|
|
3
|
+
color: var(--pf-v5-global--BackgroundColor--light-100);
|
|
4
4
|
}
|
|
5
5
|
|
|
6
|
-
.ws-top-nav-link.pf-c-nav__link:active,
|
|
7
|
-
.ws-top-nav-link.pf-c-nav__link:hover,
|
|
8
|
-
.ws-top-nav-link.pf-c-nav__link.pf-m-current {
|
|
9
|
-
color: var(--pf-global--BackgroundColor--dark-100);
|
|
10
|
-
background-color: var(--pf-global--BackgroundColor--light-100);
|
|
6
|
+
.ws-top-nav-link.pf-v5-c-nav__link:active,
|
|
7
|
+
.ws-top-nav-link.pf-v5-c-nav__link:hover,
|
|
8
|
+
.ws-top-nav-link.pf-v5-c-nav__link.pf-m-current {
|
|
9
|
+
color: var(--pf-v5-global--BackgroundColor--dark-100);
|
|
10
|
+
background-color: var(--pf-v5-global--BackgroundColor--light-100);
|
|
11
11
|
transition: .5s;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
/* Don't bother with specifity war */
|
|
15
|
-
.ws-top-nav-link.pf-c-nav__link::before {
|
|
15
|
+
.ws-top-nav-link.pf-v5-c-nav__link::before {
|
|
16
16
|
top: 0 !important;
|
|
17
17
|
bottom: auto !important;
|
|
18
18
|
right: 0 !important;
|
|
19
19
|
left: 0 !important;
|
|
20
|
-
border-color: var(--pf-global--link--Color--light--hover) !important;
|
|
20
|
+
border-color: var(--pf-v5-global--link--Color--light--hover) !important;
|
|
21
21
|
transform: scaleX(0);
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
/* Animate bar growing outwards */
|
|
25
|
-
.ws-top-nav-link.pf-c-nav__link:active::before,
|
|
26
|
-
.ws-top-nav-link.pf-c-nav__link:hover::before,
|
|
27
|
-
.ws-top-nav-link.pf-c-nav__link.pf-m-current::before {
|
|
25
|
+
.ws-top-nav-link.pf-v5-c-nav__link:active::before,
|
|
26
|
+
.ws-top-nav-link.pf-v5-c-nav__link:hover::before,
|
|
27
|
+
.ws-top-nav-link.pf-v5-c-nav__link.pf-m-current::before {
|
|
28
28
|
transition: transform .5s;
|
|
29
29
|
transform: scaleX(1);
|
|
30
30
|
}
|
package/helpers/getTitle.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* Page layout */
|
|
2
|
-
/* tells .pf-c-page to consume the available space left over from the banners/footers */
|
|
2
|
+
/* tells .pf-v5-c-page to consume the available space left over from the banners/footers */
|
|
3
3
|
#ws-router {
|
|
4
4
|
display: flex;
|
|
5
5
|
flex-direction: column;
|
|
@@ -9,11 +9,7 @@
|
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
.ws-switcher-divider {
|
|
12
|
-
padding: 0 var(--pf-global--spacer--md);
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.ws-patternfly-3 > svg {
|
|
16
|
-
margin-left: var(--pf-global--spacer--sm);
|
|
12
|
+
padding: 0 var(--pf-v5-global--spacer--md);
|
|
17
13
|
}
|
|
18
14
|
|
|
19
15
|
@media (min-width: 1200px) {
|
|
@@ -22,8 +18,8 @@
|
|
|
22
18
|
}
|
|
23
19
|
}
|
|
24
20
|
|
|
25
|
-
.ws-page-sidebar > .pf-c-page__sidebar-body {
|
|
26
|
-
padding-top: var(--pf-global--spacer--md);
|
|
21
|
+
.ws-page-sidebar > .pf-v5-c-page__sidebar-body {
|
|
22
|
+
padding-top: var(--pf-v5-global--spacer--md);
|
|
27
23
|
}
|
|
28
24
|
|
|
29
25
|
/* Search */
|
|
@@ -31,12 +27,12 @@
|
|
|
31
27
|
/* Fix search results overflowing page */
|
|
32
28
|
min-width: 480px !important;
|
|
33
29
|
}
|
|
34
|
-
.ws-global-search.pf-c-input-group {
|
|
30
|
+
.ws-global-search.pf-v5-c-input-group {
|
|
35
31
|
/* remove white background on dark Masthead */
|
|
36
|
-
--pf-c-input-group--BackgroundColor: none;
|
|
32
|
+
--pf-v5-c-input-group--BackgroundColor: none;
|
|
37
33
|
}
|
|
38
34
|
|
|
39
35
|
/* For tiny (200px) viewports */
|
|
40
|
-
.ws-masthead .pf-c-toolbar__item {
|
|
36
|
+
.ws-masthead .pf-v5-c-toolbar__item {
|
|
41
37
|
min-width: 0;
|
|
42
38
|
}
|