Skip to content

Commit

Permalink
prettier formatted code
Browse files Browse the repository at this point in the history
  • Loading branch information
Gregor Obreza committed Jun 27, 2024
1 parent baacd41 commit e76e5f4
Show file tree
Hide file tree
Showing 8 changed files with 46 additions and 44 deletions.
2 changes: 0 additions & 2 deletions src/components/HomepageFeatures/featuresSection.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
width: 100%;
}



.cards {
display: grid;
grid-template-columns: 1fr;
Expand Down
2 changes: 1 addition & 1 deletion src/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@

.footer__copyright {
font-size: 14px;
color: #777777
color: #777777;
}

.navbar {
Expand Down
8 changes: 4 additions & 4 deletions src/theme/Footer/Copyright/index.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import React from 'react';
import type {Props} from '@theme/Footer/Copyright';
import React from "react";
import type { Props } from "@theme/Footer/Copyright";

export default function FooterCopyright({copyright}: Props): JSX.Element {
export default function FooterCopyright({ copyright }: Props): JSX.Element {
return (
<div
className="footer__copyright"
// Developer provided the HTML, so assume it's safe.
// eslint-disable-next-line react/no-danger

Check failure on line 9 in src/theme/Footer/Copyright/index.tsx

View workflow job for this annotation

GitHub Actions / Lint and Check Links

Definition for rule 'react/no-danger' was not found
dangerouslySetInnerHTML={{__html: copyright}}
dangerouslySetInnerHTML={{ __html: copyright }}
/>
);
}
13 changes: 7 additions & 6 deletions src/theme/Footer/Layout/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import clsx from 'clsx';
import type {Props} from '@theme/Footer/Layout';
import React from "react";
import clsx from "clsx";
import type { Props } from "@theme/Footer/Layout";

export default function FooterLayout({
style,
Expand All @@ -10,9 +10,10 @@ export default function FooterLayout({
}: Props): JSX.Element {
return (
<footer
className={clsx('footer', {
'footer--dark': style === 'dark',
})}>
className={clsx("footer", {
"footer--dark": style === "dark",
})}
>
<div className="container container-fluid">
{links}
{(logo || copyright) && (
Expand Down
21 changes: 11 additions & 10 deletions src/theme/Footer/LinkItem/index.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import React from 'react';
import React from "react";

import Link from '@docusaurus/Link';
import useBaseUrl from '@docusaurus/useBaseUrl';
import isInternalUrl from '@docusaurus/isInternalUrl';
import IconExternalLink from '@theme/Icon/ExternalLink';
import type {Props} from '@theme/Footer/LinkItem';
import Link from "@docusaurus/Link";
import useBaseUrl from "@docusaurus/useBaseUrl";
import isInternalUrl from "@docusaurus/isInternalUrl";
import IconExternalLink from "@theme/Icon/ExternalLink";
import type { Props } from "@theme/Footer/LinkItem";

export default function FooterLinkItem({item}: Props): JSX.Element {
const {to, href, label, prependBaseUrlToHref, ...props} = item;
export default function FooterLinkItem({ item }: Props): JSX.Element {
const { to, href, label, prependBaseUrlToHref, ...props } = item;
const toUrl = useBaseUrl(to);
const normalizedHref = useBaseUrl(href, {forcePrependBaseUrl: true});
const normalizedHref = useBaseUrl(href, { forcePrependBaseUrl: true });

return (
<Link
Expand All @@ -21,7 +21,8 @@ export default function FooterLinkItem({item}: Props): JSX.Element {
: {
to: toUrl,
})}
{...props}>
{...props}
>
{label}
{href && !isInternalUrl(href) && <IconExternalLink />}
</Link>
Expand Down
20 changes: 11 additions & 9 deletions src/theme/Footer/Links/MultiColumn/index.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import React from 'react';
import LinkItem from '@theme/Footer/LinkItem';
import type {Props} from '@theme/Footer/Links/MultiColumn';
import React from "react";
import LinkItem from "@theme/Footer/LinkItem";
import type { Props } from "@theme/Footer/Links/MultiColumn";

type ColumnType = Props['columns'][number];
type ColumnItemType = ColumnType['items'][number];
type ColumnType = Props["columns"][number];
type ColumnItemType = ColumnType["items"][number];

function ColumnLinkItem({item}: {item: ColumnItemType}) {
function ColumnLinkItem({ item }: { item: ColumnItemType }) {
return item.html ? (
<li
className="footer__item"
// Developer provided the HTML, so assume it's safe.
// eslint-disable-next-line react/no-danger

Check failure on line 13 in src/theme/Footer/Links/MultiColumn/index.tsx

View workflow job for this annotation

GitHub Actions / Lint and Check Links

Definition for rule 'react/no-danger' was not found
dangerouslySetInnerHTML={{__html: item.html}}
dangerouslySetInnerHTML={{ __html: item.html }}
/>
) : (
<li key={item.href ?? item.to} className="footer__item">
Expand All @@ -20,7 +20,7 @@ function ColumnLinkItem({item}: {item: ColumnItemType}) {
);
}

function Column({column}: {column: ColumnType}) {
function Column({ column }: { column: ColumnType }) {
return (
<div className="col footer__col">
<div className="footer__title">{column.title}</div>
Expand All @@ -33,7 +33,9 @@ function Column({column}: {column: ColumnType}) {
);
}

export default function FooterLinksMultiColumn({columns}: Props): JSX.Element {
export default function FooterLinksMultiColumn({
columns,
}: Props): JSX.Element {
return (
<div className="row footer__links">
{columns.map((column, i) => (
Expand Down
12 changes: 6 additions & 6 deletions src/theme/Footer/Links/Simple/index.tsx
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
import React from 'react';
import LinkItem from '@theme/Footer/LinkItem';
import type {Props} from '@theme/Footer/Links/Simple';
import React from "react";
import LinkItem from "@theme/Footer/LinkItem";
import type { Props } from "@theme/Footer/Links/Simple";

function Separator() {
return <span className="footer__link-separator">·</span>;
}

function SimpleLinkItem({item}: {item: Props['links'][number]}) {
function SimpleLinkItem({ item }: { item: Props["links"][number] }) {
return item.html ? (
<span
className="footer__link-item"
// Developer provided the HTML, so assume it's safe.
// eslint-disable-next-line react/no-danger

Check failure on line 14 in src/theme/Footer/Links/Simple/index.tsx

View workflow job for this annotation

GitHub Actions / Lint and Check Links

Definition for rule 'react/no-danger' was not found
dangerouslySetInnerHTML={{__html: item.html}}
dangerouslySetInnerHTML={{ __html: item.html }}
/>
) : (
<LinkItem item={item} />
);
}

export default function FooterLinksSimple({links}: Props): JSX.Element {
export default function FooterLinksSimple({ links }: Props): JSX.Element {
return (
<div className="footer__links text--center">
<div className="footer__links">
Expand Down
12 changes: 6 additions & 6 deletions src/theme/Footer/Links/index.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import React from 'react';
import React from "react";

import {isMultiColumnFooterLinks} from '@docusaurus/theme-common';
import FooterLinksMultiColumn from '@theme/Footer/Links/MultiColumn';
import FooterLinksSimple from '@theme/Footer/Links/Simple';
import type {Props} from '@theme/Footer/Links';
import { isMultiColumnFooterLinks } from "@docusaurus/theme-common";
import FooterLinksMultiColumn from "@theme/Footer/Links/MultiColumn";
import FooterLinksSimple from "@theme/Footer/Links/Simple";
import type { Props } from "@theme/Footer/Links";

export default function FooterLinks({links}: Props): JSX.Element {
export default function FooterLinks({ links }: Props): JSX.Element {
return isMultiColumnFooterLinks(links) ? (
<FooterLinksMultiColumn columns={links} />
) : (
Expand Down

0 comments on commit e76e5f4

Please sign in to comment.