Skip to content

Commit

Permalink
actually add new lines to end of files
Browse files Browse the repository at this point in the history
  • Loading branch information
Blargian committed Feb 4, 2025
1 parent c152f35 commit 5dae430
Show file tree
Hide file tree
Showing 13 changed files with 137 additions and 0 deletions.
1 change: 1 addition & 0 deletions scripts/settings/autogenerate-settings.sh
Original file line number Diff line number Diff line change
Expand Up @@ -85,3 +85,4 @@ if [ -f ./clickhouse ]; then
fi

echo "[$SCRIPT_NAME] Autogenerating settings completed"

1 change: 1 addition & 0 deletions src/components/BlogBreadcrumbs/BlogBreadcrumbs.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,4 @@ const BlogBreadcrumbs = () => {
}

export default BlogBreadcrumbs

1 change: 1 addition & 0 deletions src/components/ButtonGroup/ButtonGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,4 @@ export const ButtonGroup = ({
type ButtonPosition = "left" | "center" | "right";

export default ButtonGroup;

1 change: 1 addition & 0 deletions src/components/ButtonGroup/styles.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -101,3 +101,4 @@
background: #EDEEF3;
border-radius: 4px;
}

1 change: 1 addition & 0 deletions src/css/custom.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1266,3 +1266,4 @@ input::-ms-input-placeholder { /* Microsoft Edge */
.blog-list-page .margin-bottom--xl, .blog-tags-post-list-page .margin-bottom--xl {
margin-bottom: 1rem !important;
}

1 change: 1 addition & 0 deletions src/theme/BlogTagsListPage/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,4 @@ export default function BlogTagsListPage({tags, sidebar}) {
</HtmlClassNameProvider>
);
}

1 change: 1 addition & 0 deletions src/theme/BlogTagsListPage/styles.module.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.kbTitle{
margin-bottom: 25px;
}

1 change: 1 addition & 0 deletions src/theme/BlogTagsPostsPage/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,4 @@ export default function BlogTagsPostsPage(props) {
</HtmlClassNameProvider>
);
}

1 change: 1 addition & 0 deletions src/theme/BlogTagsPostsPage/styles.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@
.kbTitle {
margin-bottom: 25px;
}

23 changes: 23 additions & 0 deletions src/theme/DocBreadcrumbs/Items/Home/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import React from 'react';
import Link from '@docusaurus/Link';
import useBaseUrl from '@docusaurus/useBaseUrl';
import {translate} from '@docusaurus/Translate';
import IconHome from '@theme/Icon/Home';
import styles from './styles.module.css';
export default function HomeBreadcrumbItem() {
const homeHref = useBaseUrl('/');
return (
<li className="breadcrumbs__item">
<Link
aria-label={translate({
id: 'theme.docs.breadcrumbs.home',
message: 'Home page',
description: 'The ARIA label for the home page in the breadcrumbs',
})}
className="breadcrumbs__link"
href={homeHref}>
<IconHome className={styles.breadcrumbHomeIcon} />
</Link>
</li>
);
}
7 changes: 7 additions & 0 deletions src/theme/DocBreadcrumbs/Items/Home/styles.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.breadcrumbHomeIcon {
position: relative;
top: 1px;
vertical-align: top;
height: 1.1rem;
width: 1.1rem;
}
93 changes: 93 additions & 0 deletions src/theme/DocBreadcrumbs/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
import React from 'react';
import clsx from 'clsx';
import {ThemeClassNames} from '@docusaurus/theme-common';
import {useSidebarBreadcrumbs} from '@docusaurus/plugin-content-docs/client';
import {useHomePageRoute} from '@docusaurus/theme-common/internal';
import Link from '@docusaurus/Link';
import {translate} from '@docusaurus/Translate';
import HomeBreadcrumbItem from '@theme/DocBreadcrumbs/Items/Home';
import styles from './styles.module.css';
// TODO move to design system folder
function BreadcrumbsItemLink({children, href, isLast}) {
const className = 'breadcrumbs__link';
if (isLast) {
return (
<span className={className} itemProp="name">
{children}
</span>
);
}
return href ? (
<Link className={className} href={href} itemProp="item">
<span itemProp="name">{children}</span>
</Link>
) : (
// TODO Google search console doesn't like breadcrumb items without href.
// The schema doesn't seem to require `id` for each `item`, although Google
// insist to infer one, even if it's invalid. Removing `itemProp="item
// name"` for now, since I don't know how to properly fix it.
// See https://github.com/facebook/docusaurus/issues/7241
<span className={className}>{children}</span>
);
}
// TODO move to design system folder
function BreadcrumbsItem({children, active, index, addMicrodata}) {
return (
<li
{...(addMicrodata && {
itemScope: true,
itemProp: 'itemListElement',
itemType: 'https://schema.org/ListItem',
})}
className={clsx('breadcrumbs__item', {
'breadcrumbs__item--active': active,
})}>
{children}
<meta itemProp="position" content={String(index + 1)} />
</li>
);
}
export default function DocBreadcrumbs() {
const breadcrumbs = useSidebarBreadcrumbs();
const homePageRoute = useHomePageRoute();
if (!breadcrumbs) {
return null;
}
return (
<nav
className={clsx(
ThemeClassNames.docs.docBreadcrumbs,
styles.breadcrumbsContainer,
)}
aria-label={translate({
id: 'theme.docs.breadcrumbs.navAriaLabel',
message: 'Breadcrumbs',
description: 'The ARIA label for the breadcrumbs',
})}>
<ul
className="breadcrumbs"
itemScope
itemType="https://schema.org/BreadcrumbList">
{homePageRoute && <HomeBreadcrumbItem />}
{breadcrumbs.map((item, idx) => {
const isLast = idx === breadcrumbs.length - 1;
const href =
item.type === 'category' && item.linkUnlisted
? undefined
: item.href;
return (
<BreadcrumbsItem
key={idx}
active={isLast}
index={idx}
addMicrodata={!!href}>
<BreadcrumbsItemLink href={href} isLast={isLast}>
{item.label}
</BreadcrumbsItemLink>
</BreadcrumbsItem>
);
})}
</ul>
</nav>
);
}
5 changes: 5 additions & 0 deletions src/theme/DocBreadcrumbs/styles.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

.breadcrumbsContainer {
--ifm-breadcrumb-size-multiplier: 0.8;
margin-bottom: 0.8rem;
}

0 comments on commit 5dae430

Please sign in to comment.