Skip to content

Commit

Permalink
npm run format
Browse files Browse the repository at this point in the history
  • Loading branch information
JohannaPeanut committed Aug 2, 2023
1 parent 8389d92 commit fdd6642
Show file tree
Hide file tree
Showing 27 changed files with 51 additions and 51 deletions.
2 changes: 1 addition & 1 deletion src/components/AwardPage/Profile/Profile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const Profile: React.FC<Props> = ({
<img
className={clsx(
mirror ? 'float-right ml-4' : 'float-left mr-4',
'h-24 w-24 rounded-full lg:h-40 lg:w-40'
'h-24 w-24 rounded-full lg:h-40 lg:w-40',
)}
src={src}
alt={`profilfoto ${name}`}
Expand Down
2 changes: 1 addition & 1 deletion src/components/AwardPage/QuoteBox/QuoteBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export const QuoteBox: React.FC<Props> = ({ children, mirror = false }) => {
<div
className={clsx(
style,
`mt-8 w-fit min-w-min rounded-b-[6rem] font-mono lg:rounded-b-[10rem]`
`mt-8 w-fit min-w-min rounded-b-[6rem] font-mono lg:rounded-b-[10rem]`,
)}
>
<p className="p-8 lg:p-16">{children}</p>
Expand Down
2 changes: 1 addition & 1 deletion src/components/CommunityEntries/CardCommunityEntry.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export const CardCommunityEntry: React.FC<Props> = ({
button="card"
className={clsx(
'flex h-full flex-col items-stretch gap-1 rounded-b-3xl bg-white sm:flex-row sm:gap-6',
className
className,
)}
href={link}
>
Expand Down
2 changes: 1 addition & 1 deletion src/components/ExamplePage/Pagination.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const Pagination: React.FC<PaginationProps> = ({
<div
className={clsx(
className,
'flex w-full flex-col items-center justify-between gap-2 bg-white/50 p-5 text-sm sm:flex-row lg:px-10'
'flex w-full flex-col items-center justify-between gap-2 bg-white/50 p-5 text-sm sm:flex-row lg:px-10',
)}
>
<p>Praxisbeispiele blättern</p>
Expand Down
4 changes: 2 additions & 2 deletions src/components/Layout/Breadcrumbs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,12 @@ export const Breadcrumbs: React.FC<Props> = ({ names = [], prefix = './' }) => {
className={clsx(
'h-4 w-[4px] ',
// the current breadcrumb has a lighter color
isLastItem(i) ? 'bg-white/40' : wikiColorsArray[i]
isLastItem(i) ? 'bg-white/40' : wikiColorsArray[i],
)}
/>
<Link
className={clsx(
'max-w-[9rem] truncate text-sm no-underline md:max-w-[12rem] lg:max-w-none'
'max-w-[9rem] truncate text-sm no-underline md:max-w-[12rem] lg:max-w-none',
)}
href={prefix + '../'.repeat(n - i - 1)}
>
Expand Down
4 changes: 2 additions & 2 deletions src/components/Layout/Footer/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const Footer: React.FC = () => {
>
<ul
className={clsx(
'grid grid-cols-2 gap-10 pb-6 text-sm text-gray-400 sm:grid-cols-3 md:flex md:flex-row md:justify-between'
'grid grid-cols-2 gap-10 pb-6 text-sm text-gray-400 sm:grid-cols-3 md:flex md:flex-row md:justify-between',
)}
>
{Object.keys(menuItems).map((key) => (
Expand Down Expand Up @@ -54,7 +54,7 @@ export const Footer: React.FC = () => {
{childKey}
</Link>
</li>
)
),
)}
</div>
) : (
Expand Down
2 changes: 1 addition & 1 deletion src/components/Layout/Hero.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const Hero: React.FC<Props> = ({
className={clsx(
'relative mb-4 flex flex-col justify-center gap-4 rounded-b-3xl px-8 pb-8 pt-36 md:mb-6 md:px-12 md:pb-16',
className,
bgColor
bgColor,
)}
>
{breadcrumbs && <div className="hidden md:block">{breadcrumbs}</div>}
Expand Down
2 changes: 1 addition & 1 deletion src/components/Layout/Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const Layout: React.FC<
breadcrumbs.push(
data.example.measure.topic.name,
data.example.measure.name,
data.example.title
data.example.title,
);
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/components/Layout/Navigation/NavigationDesktop.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const NavigationDesktop: React.FC<Props> = ({ path, className }) => {
<nav
className={clsx(
className,
'fixed z-10 flex w-full max-w-[1366px] items-center justify-between gap-8 bg-green-500 px-8 py-3'
'fixed z-10 flex w-full max-w-[1366px] items-center justify-between gap-8 bg-green-500 px-8 py-3',
)}
>
<Link href="/">
Expand All @@ -31,7 +31,7 @@ export const NavigationDesktop: React.FC<Props> = ({ path, className }) => {
'!text-sm',
path.startsWith(menuItems[key])
? menuLinkActiveStyles
: menuLinkStylesDefault
: menuLinkStylesDefault,
)}
>
{key}
Expand Down
8 changes: 4 additions & 4 deletions src/components/Layout/Navigation/NavigationMobile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export const NavigationMobile: React.FC<Props> = ({
className={clsx(
className,
open ? 'z-30' : 'z-10 ',
'fixed w-full bg-green-500'
'fixed w-full bg-green-500',
)}
>
<div className={clsx('z-30 mx-auto px-4 pb-2 sm:px-6 lg:px-8')}>
Expand Down Expand Up @@ -93,13 +93,13 @@ export const NavigationMobile: React.FC<Props> = ({
path ===
`${menuItems[key]}${menuItemsWithChildren[key][childKey]}`
? menuLinkActiveStyles
: menuLinkStylesDefault
: menuLinkStylesDefault,
)}
>
{childKey}
</Link>
</Menu.Item>
)
),
)}
</NavigationMobileDisclosure>
) : (
Expand All @@ -109,7 +109,7 @@ export const NavigationMobile: React.FC<Props> = ({
'py-3 !text-sm',
`${menuItems[key]}` === path
? menuLinkActiveStyles
: menuLinkStylesDefault
: menuLinkStylesDefault,
)}
>
{key}
Expand Down
8 changes: 4 additions & 4 deletions src/components/Layout/Navigation/SideNavigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export const SideNavigation: React.FC<Props> = ({ path }) => {
<ul
className={clsx(
sidePanelWidthClassName,
'shadow-r h-full overflow-y-auto bg-gray-100 px-4 py-3 pr-8'
'shadow-r h-full overflow-y-auto bg-gray-100 px-4 py-3 pr-8',
)}
>
<li className="mb-16 px-4">
Expand All @@ -47,7 +47,7 @@ export const SideNavigation: React.FC<Props> = ({ path }) => {
'!text-sm font-bold',
path === `${basePath}/${topic.slug}/`
? menuLinkActiveStyles
: menuLinkStylesDefault
: menuLinkStylesDefault,
)}
>
{topic.name}
Expand All @@ -61,10 +61,10 @@ export const SideNavigation: React.FC<Props> = ({ path }) => {
className={clsx(
'block pl-3.5 !text-sm',
path.startsWith(
`${basePath}/${topic.slug}/${measure.slug}/`
`${basePath}/${topic.slug}/${measure.slug}/`,
)
? menuLinkActiveStyles
: menuLinkStylesDefault
: menuLinkStylesDefault,
)}
>
{measure.name}
Expand Down
2 changes: 1 addition & 1 deletion src/components/MeasurePage/CardWrapperMeasurePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const CardWrapperMeasurePage: React.FC<Props> = ({
<div
className={clsx(
className,
'grid grid-cols-1 gap-5 sm:grid-cols-2 xl:grid-cols-3'
'grid grid-cols-1 gap-5 sm:grid-cols-2 xl:grid-cols-3',
)}
>
{children}
Expand Down
8 changes: 4 additions & 4 deletions src/components/SearchBar/SearchBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export const SearchBar: React.FC<Props> = ({ className }) => {
const [resultHeader, setResultHeader] = useState<string>('');
const [searchQuery, setSearchQuery] = useState<string>('');
const [controller, setController] = useState<AbortController>(
new AbortController()
new AbortController(),
);

// search API logic:
Expand All @@ -49,7 +49,7 @@ export const SearchBar: React.FC<Props> = ({ className }) => {
setSearchResults(results);
const nResults = Object.values(results).reduce(
(acc, cur) => acc + cur.length,
0
0,
);
if (nResults > 1) {
setResultHeader(`Die ${nResults} besten Ergebnisse für „${query}“`);
Expand Down Expand Up @@ -123,14 +123,14 @@ export const SearchBar: React.FC<Props> = ({ className }) => {
className={({ active }) =>
clsx(
'relative flex cursor-pointer select-none items-center gap-3 rounded px-2 py-2',
active && 'bg-gray-100'
active && 'bg-gray-100',
)
}
>
<span
className={clsx(
'inline-block h-5 w-5 flex-none rounded-full',
wikiColors[key]
wikiColors[key],
)}
aria-hidden="true"
/>
Expand Down
2 changes: 1 addition & 1 deletion src/components/StartPage/CardWrapperTopicsStartPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const CardWrapperTopicsLandingPage: React.FC<Props> = ({
<div
className={clsx(
className,
'grid grid-cols-1 gap-5 md:grid-cols-2 xl:grid-cols-3'
'grid grid-cols-1 gap-5 md:grid-cols-2 xl:grid-cols-3',
)}
>
{children}
Expand Down
10 changes: 5 additions & 5 deletions src/components/Text/Headings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const H1: React.FC<Props> = ({ id, className, children }) => {
id={id}
className={clsx(
'mb-5 text-3xl font-bold text-black md:mb-10 md:text-4xl',
className
className,
)}
>
{children}
Expand All @@ -29,7 +29,7 @@ export const H2: React.FC<Props> = ({ id, className, children }) => {
id={id}
className={clsx(
'!leading:snug mb-2 mt-8 font-mono text-xl font-normal text-black md:mb-5 md:mt-10 md:text-3xl md:!leading-normal',
className
className,
)}
>
{children}
Expand All @@ -43,7 +43,7 @@ export const H3: React.FC<Props> = ({ id, className, children }) => {
id={id}
className={clsx(
'mb-4 mt-8 text-lg font-bold text-black md:mb-6 md:mt-10 md:text-xl',
className
className,
)}
>
{children}
Expand All @@ -57,7 +57,7 @@ export const P: React.FC<Props> = ({ id, className, children }) => {
className={clsx(
'mb-4 mt-4 text-sm text-gray-700 md:mb-6 md:mt-6 md:text-base',
leadingClassName,
className
className,
)}
>
{children}
Expand All @@ -71,7 +71,7 @@ export const Caption: React.FC<Props> = ({ id, className, children }) => {
className={clsx(
'mb-4 mt-4 text-xs text-gray-700 md:mb-6 md:mt-6',
leadingClassName,
className
className,
)}
>
{children}
Expand Down
2 changes: 1 addition & 1 deletion src/components/TopicPage/CardMeasure.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const CardMeasure: React.FC<Props> = ({
button="card"
className={clsx(
'flex h-full flex-col gap-3 rounded-b-3xl bg-white p-6 sm:flex-row sm:items-start sm:gap-6',
className
className,
)}
href={link}
>
Expand Down
2 changes: 1 addition & 1 deletion src/components/WissensspeicherStartPage/CardTopic.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const CardTopic: React.FC<Props> = ({
button="card"
className={clsx(
'flex h-full flex-col gap-3 rounded-b-3xl bg-white p-6 sm:flex-row sm:gap-6',
className
className,
)}
href={link}
>
Expand Down
2 changes: 1 addition & 1 deletion src/components/core/Prose.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export const planFMarkdownProseClasses = clsx(
'prose-h3:text-base', // h3 size
'prose prose-sm md:prose-base', // responsive sizes
'prose-h3:m1-1 prose-h1:mb-2 prose-h2:mb-2 prose-h2:mt-1 prose-h3:mb-2 prose-p:mb-2 prose-p:mt-1',
'prose-li:m-0 prose-li:p-0'
'prose-li:m-0 prose-li:p-0',
);

export const Prose: React.FC<Props> = ({ markdownHTML, className }) => {
Expand Down
4 changes: 2 additions & 2 deletions src/components/core/articleProseClasses.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export const articleProseClasses = clsx(
// Basis
'prose max-w-none',
// H2
'prose-h2:mb-3 prose-h2:mt-6 prose-h2:font-mono prose-h2:text-xl prose-h2:font-normal prose-h2:text-black prose-h2:md:mb-6 prose-h2:md:mt-14 prose-h2:md:text-3xl'
'prose-h2:mb-3 prose-h2:mt-6 prose-h2:font-mono prose-h2:text-xl prose-h2:font-normal prose-h2:text-black prose-h2:md:mb-6 prose-h2:md:mt-14 prose-h2:md:text-3xl',
);

// Usage: `<Section className={articleProseClasses}><Content>HTML</Content></Section>`
Expand All @@ -30,5 +30,5 @@ export const planfProseClasses = clsx(
// <blockquote> / Quotebox
'prose-blockquote:rounded-tr-[6rem] prose-blockquote:lg:rounded-tr-[10rem] prose-blockquote:rounded-tl-sm prose-blockquote:bg-purple-100 prose-blockquote:text-left prose-blockquote:mt-8 prose-blockquote:w-fit prose-blockquote:min-w-min prose-blockquote:rounded-b-[6rem] prose-blockquote:font-mono prose-blockquote:lg:rounded-b-[10rem] prose-blockquote:p-8 prose-blockquote:lg:p-16 prose-blockquote:not-italic prose-blockquote:border-l-0',
// ul li
'prose-ul:list-disc prose-ul:my-6 prose-li:text-sm prose-li:md:text-base prose-li:text-gray-700'
'prose-ul:list-disc prose-ul:my-6 prose-li:text-sm prose-li:md:text-base prose-li:text-gray-700',
);
4 changes: 2 additions & 2 deletions src/components/core/links/Link.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export const Link: React.FC<LinkProps> = forwardRef<
button,
...props
},
ref
ref,
) => {
// external link
if (href.startsWith('http')) {
Expand Down Expand Up @@ -61,5 +61,5 @@ export const Link: React.FC<LinkProps> = forwardRef<
{children}
</GatsbyLink>
);
}
},
);
2 changes: 1 addition & 1 deletion src/components/core/links/YouTubePreview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const YouTubePreview: React.FC<Props> = ({
className={clsx(
'group relative flex aspect-video w-full items-center justify-center overflow-clip rounded-md',
{ 'my-8': !marginClass },
marginClass
marginClass,
)}
>
<div className="z-[1] flex h-20 w-20 items-center justify-center rounded-full bg-white/70 shadow backdrop-blur-md transition-all duration-300 group-hover:h-24 group-hover:w-24">
Expand Down
12 changes: 6 additions & 6 deletions src/components/core/links/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const hoverTranslateClassNames =

export const cardStylesForLinkElements = clsx(
hoverTranslateClassNames,
'active:ring-2 active:ring-purple-600' // activeStyleForLinkElement
'active:ring-2 active:ring-purple-600', // activeStyleForLinkElement
);

// WHITE BUTTON (white/purple text)
Expand All @@ -29,13 +29,13 @@ const whiteButtonStylesForLinkElement = clsx(
buttonBase,
whiteButtonBase,
'active:ring-2 active:ring-purple-600', // activeStyleForLinkElement
hoverTranslateClassNames // hoverStyleForLinkElement
hoverTranslateClassNames, // hoverStyleForLinkElement
);
export const whiteButtonStyles = clsx(
buttonBase,
whiteButtonBase,
'enabled:active:border-0 enabled:active:ring-2 enabled:active:ring-purple-600', // activeStyleForButtonElement
'enabled:hover:-translate-y-0.5 transition-all duration-200 enabled:hover:shadow-lg' // hoverStyleForButtonElement
'enabled:hover:-translate-y-0.5 transition-all duration-200 enabled:hover:shadow-lg', // hoverStyleForButtonElement
);

// BUTTON BLACK (black/white text)
Expand All @@ -44,18 +44,18 @@ const blackButtonStylesForLinkElement = clsx(
buttonBase,
blackButtonBase,
'active:hover:ring-2 active:ring-purple-600', // hoverStyleForLinkElement
hoverTranslateClassNames // activeStyleForLinkElement
hoverTranslateClassNames, // activeStyleForLinkElement
);
export const blackButtonStyles = clsx(
buttonBase,
blackButtonBase,
'enabled:active:border-0 enabled:active:ring-2 enabled:active:ring-purple-600', // hoverStyleForButtonElement
'enabled:hover:-translate-y-0.5 transition-all duration-200 enabled:hover:shadow-lg' // activeStyleForButtonElement
'enabled:hover:-translate-y-0.5 transition-all duration-200 enabled:hover:shadow-lg', // activeStyleForButtonElement
);

export const selectLinkStyle = (
button: LinkProps['button'],
className?: string
className?: string,
) => {
switch (button) {
case true:
Expand Down
2 changes: 1 addition & 1 deletion src/components/utils/sortByPosition.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export function sortByPosition<T extends { position: number }>(
array: readonly T[]
array: readonly T[],
): T[] {
return [...array].sort((a, b) => a.position - b.position);
}
2 changes: 1 addition & 1 deletion src/pages/award/plan-f-award-2022.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -671,7 +671,7 @@ const AwardPage: React.FC = () => {
{foldOut}
</AwardWinnerCard>
);
}
},
)}
</div>
))}
Expand Down
Loading

0 comments on commit fdd6642

Please sign in to comment.