From 8e294e44b82ee46937567ceccc8453faa0fc8cd9 Mon Sep 17 00:00:00 2001 From: lillijo Date: Mon, 1 Jul 2024 18:39:58 +0200 Subject: [PATCH] formatting --- .../components/filters/filters.server.tsx | 25 +++-- .../filters/filtersGroups.server.tsx | 23 +++-- .../(landing)/components/landing.server.tsx | 4 +- .../(landing)/components/project/writing.tsx | 2 +- .../components/content/header.server.tsx | 2 +- .../content/project/audioPlayer.server.tsx | 4 +- .../components/content/projects.server.tsx | 4 +- .../components/content/toggleMute.client.tsx | 2 +- .../components/sidebar/sidebar.server.tsx | 2 +- .../info/components/content/about.server.tsx | 19 ++-- .../components/content/content.server.tsx | 6 +- .../components/content/info/info.server.tsx | 4 +- .../content/info/item/item.client.tsx | 18 ++-- .../content/info/item/title.client.tsx | 9 +- .../info/components/headers/header.server.tsx | 13 ++- .../components/headers/headers.server.tsx | 4 +- src/app/[locale]/loading.tsx | 8 +- .../components/map/index.server.tsx | 2 +- .../components/map/useMapFunctions.ts | 13 ++- .../[[...slug]]/components/place.server.tsx | 2 +- .../[[...slug]]/components/program.server.tsx | 4 +- .../[locale]/locations/[[...slug]]/page.tsx | 6 +- .../filterGroups/filterGroup/filterGroup.tsx | 19 ++-- .../filterGroups/filterGroup/filters.tsx | 2 +- .../filterGroups/filterGroup/header.tsx | 26 ++--- .../components/filterGroups/filterGroups.tsx | 3 +- src/app/[locale]/program/@sidebar/default.tsx | 2 +- .../components/projects/container.server.tsx | 2 +- .../components/sidebarToggle.client.tsx | 56 ++++++----- src/app/[locale]/program/page.tsx | 2 +- .../project/[id]/components/audioplayer.tsx | 7 +- .../[id]/components/content/element.tsx | 2 +- src/app/[locale]/saved/page.tsx | 2 +- src/app/[locale]/saved/saved.client.tsx | 2 +- .../[[...slug]]/components/container.tsx | 2 +- .../timeline/[[...slug]]/components/days.tsx | 4 +- .../components/eventLocation.server.tsx | 2 +- .../timeline/[[...slug]]/components/scale.tsx | 2 +- .../[[...slug]]/components/scrollTo.tsx | 4 +- .../components/timetable.server.tsx | 2 +- src/components/containers/border.tsx | 2 +- src/components/filterBar/index.tsx | 30 +++--- src/components/filterTag.tsx | 6 +- src/components/filters/filterGroup.tsx | 2 +- .../header/navigation/colorSchemeSwitcher.tsx | 2 +- .../header/navigation/desktop/desktop.tsx | 32 +++---- .../header/navigation/localeSwitcher.tsx | 2 +- src/components/image.tsx | 5 +- src/components/jumpToTop.tsx | 16 ++-- src/components/modal/modal.tsx | 2 +- src/components/navigationLink.tsx | 6 +- src/components/saveButton.client.tsx | 9 +- src/components/smoothButton.tsx | 96 ++++++++++++------- src/styles/app.css | 15 ++- 54 files changed, 311 insertions(+), 231 deletions(-) diff --git a/src/app/[locale]/(landing)/components/filters/filters.server.tsx b/src/app/[locale]/(landing)/components/filters/filters.server.tsx index 91cb794..a525818 100644 --- a/src/app/[locale]/(landing)/components/filters/filters.server.tsx +++ b/src/app/[locale]/(landing)/components/filters/filters.server.tsx @@ -1,24 +1,21 @@ -import {Suspense} from 'react'; -import LandingFiltersGroups from "@/app/(landing)/components/filters/filtersGroups.server"; -import {ReactNodeProps} from "@/types/types"; +import { Suspense } from 'react'; +import LandingFiltersGroups from '@/app/(landing)/components/filters/filtersGroups.server'; +import { ReactNodeProps } from '@/types/types'; export default async function LandingFilters() { return ( - - - + + + ); } - -function LandingFiltersContainer({children}: ReactNodeProps) { +function LandingFiltersContainer({ children }: ReactNodeProps) { return ( -
-
- {children} -
-
+
+
{children}
+
); -} \ No newline at end of file +} diff --git a/src/app/[locale]/(landing)/components/filters/filtersGroups.server.tsx b/src/app/[locale]/(landing)/components/filters/filtersGroups.server.tsx index 6d4d6ec..f52b726 100644 --- a/src/app/[locale]/(landing)/components/filters/filtersGroups.server.tsx +++ b/src/app/[locale]/(landing)/components/filters/filtersGroups.server.tsx @@ -4,17 +4,16 @@ import { getGraphQLFilters } from '@/api/graphql/filters'; export default async function LandingFiltersGroups() { const filters = await getGraphQLFilters(); return ( - <> - {Object.entries(filters).map(([key, value], index) => ( - - ) - )} - + <> + {Object.entries(filters).map(([key, value], index) => ( + + ))} + ); } diff --git a/src/app/[locale]/(landing)/components/landing.server.tsx b/src/app/[locale]/(landing)/components/landing.server.tsx index c65759e..c1624b3 100644 --- a/src/app/[locale]/(landing)/components/landing.server.tsx +++ b/src/app/[locale]/(landing)/components/landing.server.tsx @@ -15,7 +15,7 @@ export default function Landing({ searchParams }: LandingProps) { extractProjectLanguageSearchParam(searchParams); return ( -
+
@@ -28,7 +28,7 @@ export default function Landing({ searchParams }: LandingProps) { function LandingContainer({ children }: { children: ReactNode }) { return ( -
+
{children}
); diff --git a/src/app/[locale]/(landing)/components/project/writing.tsx b/src/app/[locale]/(landing)/components/project/writing.tsx index 034f8fc..33611f4 100644 --- a/src/app/[locale]/(landing)/components/project/writing.tsx +++ b/src/app/[locale]/(landing)/components/project/writing.tsx @@ -21,7 +21,7 @@ export default function LandingProjectWriting({ } function LandingProjectWritingContainer({ children }: { children: ReactNode }) { return ( -
+
{children}
); diff --git a/src/app/[locale]/design/components/content/header.server.tsx b/src/app/[locale]/design/components/content/header.server.tsx index d54cabd..7980344 100644 --- a/src/app/[locale]/design/components/content/header.server.tsx +++ b/src/app/[locale]/design/components/content/header.server.tsx @@ -12,7 +12,7 @@ export default function DesignContentHeader() { function DesignContentHeaderContainer({ children }: HtmlProps) { return (
-
+

{children}

diff --git a/src/app/[locale]/design/components/content/project/audioPlayer.server.tsx b/src/app/[locale]/design/components/content/project/audioPlayer.server.tsx index 038381a..f90f2f3 100644 --- a/src/app/[locale]/design/components/content/project/audioPlayer.server.tsx +++ b/src/app/[locale]/design/components/content/project/audioPlayer.server.tsx @@ -1,7 +1,9 @@ import { HtmlProps } from '@/components/html/html'; import AudioPlayer from '@/components/audioPlayer'; -export default function DesignContentProjectAudioPlayer({ languageSearchParam }) { +export default function DesignContentProjectAudioPlayer({ + languageSearchParam, +}) { return ( ( ))} -
+
); } @@ -17,7 +17,7 @@ function DesignContentProjectsContainer({ children }: HtmlProps) { return (
-
+
{children}
diff --git a/src/app/[locale]/design/components/content/toggleMute.client.tsx b/src/app/[locale]/design/components/content/toggleMute.client.tsx index 7ed361f..7a758a4 100644 --- a/src/app/[locale]/design/components/content/toggleMute.client.tsx +++ b/src/app/[locale]/design/components/content/toggleMute.client.tsx @@ -30,7 +30,7 @@ export default function ToggleMute() { export function MuteButton({ handleClick, children }) { return ( diff --git a/src/components/header/navigation/desktop/desktop.tsx b/src/components/header/navigation/desktop/desktop.tsx index 141c4ba..1813bc2 100644 --- a/src/components/header/navigation/desktop/desktop.tsx +++ b/src/components/header/navigation/desktop/desktop.tsx @@ -11,28 +11,24 @@ export default function HeaderNavigationDesktop() { const t = useTranslations('Navigation'); return ( - -
- -
-
- {t('program')} - {t('locations')} - {t('timeline')} -
- {t('info')} - - - + +
+
+
+ {t('program')} + {t('locations')} + {t('timeline')} +
+ {t('info')} + + + +
); } function NavigationDesktopContainer({ children }: HtmlProps) { - return ( - - ); + return ; } diff --git a/src/components/header/navigation/localeSwitcher.tsx b/src/components/header/navigation/localeSwitcher.tsx index d2bf372..9fa9e3d 100644 --- a/src/components/header/navigation/localeSwitcher.tsx +++ b/src/components/header/navigation/localeSwitcher.tsx @@ -31,7 +31,7 @@ export default function LocaleSwitcher() { return (
); } diff --git a/src/components/modal/modal.tsx b/src/components/modal/modal.tsx index 53033dd..1ad6649 100644 --- a/src/components/modal/modal.tsx +++ b/src/components/modal/modal.tsx @@ -28,7 +28,7 @@ export default function Modal({ children }: { children: React.ReactNode }) { - + ); } diff --git a/src/components/smoothButton.tsx b/src/components/smoothButton.tsx index a01257c..c19b093 100644 --- a/src/components/smoothButton.tsx +++ b/src/components/smoothButton.tsx @@ -1,54 +1,65 @@ 'use client'; import cx from 'classnames'; -import {ReactNodeProps} from "@/types/types"; +import { ReactNodeProps } from '@/types/types'; -const bgMapper: {[key: string]: string} = { +const bgMapper: { [key: string]: string } = { primary: 'bg-primary', secondary: 'bg-secondary', - highlight: 'bg-highlight' -} + highlight: 'bg-highlight', +}; -const hoverBgMapper: {[key: string]: string} = { +const hoverBgMapper: { [key: string]: string } = { primary: 'hover:bg-secondary', secondary: 'hover:bg-primary', - highlight: 'hover:bg-highlight' -} + highlight: 'hover:bg-highlight', +}; -const shadowMapper: {[key: string]: any} = { +const shadowMapper: { [key: string]: any } = { bottom: { tr: { - primary: 'shadow-[0_8px_0_0_rgb(var(--primary))] group-hover:shadow-[0_8px_0_0_rgb(var(--secondary))]', - secondary: 'shadow-[0_8px_0_0_rgb(var(--secondary))] group-hover:shadow-[0_8px_0_0_rgb(var(--primary))]', - highlight: 'shadow-[0_8px_0_0_rgb(var(--highlight))] group-hover:shadow-[0_8px_0_0_rgb(var(--highlight))]', + primary: + 'shadow-[0_8px_0_0_rgb(var(--primary))] group-hover:shadow-[0_8px_0_0_rgb(var(--secondary))]', + secondary: + 'shadow-[0_8px_0_0_rgb(var(--secondary))] group-hover:shadow-[0_8px_0_0_rgb(var(--primary))]', + highlight: + 'shadow-[0_8px_0_0_rgb(var(--highlight))] group-hover:shadow-[0_8px_0_0_rgb(var(--highlight))]', }, bl: { - primary: 'shadow-[8px_0_0_0_rgb(var(--primary))] group-hover:shadow-[8px_0_0_0_rgb(var(--secondary))]', - secondary: 'shadow-[8px_0_0_0_rgb(var(--secondary))] group-hover:shadow-[8px_0_0_0_rgb(var(--primary))]', - highlight: 'shadow-[8px_0_0_0_rgb(var(--highlight))] group-hover:shadow-[8px_0_0_0_rgb(var(--highlight))]', + primary: + 'shadow-[8px_0_0_0_rgb(var(--primary))] group-hover:shadow-[8px_0_0_0_rgb(var(--secondary))]', + secondary: + 'shadow-[8px_0_0_0_rgb(var(--secondary))] group-hover:shadow-[8px_0_0_0_rgb(var(--primary))]', + highlight: + 'shadow-[8px_0_0_0_rgb(var(--highlight))] group-hover:shadow-[8px_0_0_0_rgb(var(--highlight))]', }, }, top: { tl: { - primary: 'shadow-[8px_0_0_0_rgb(var(--primary))] group-hover:shadow-[8px_0_0_0_rgb(var(--secondary))]', - secondary: 'shadow-[8px_0_0_0_rgb(var(--secondary))] group-hover:shadow-[8px_0_0_0_rgb(var(--primary))]', - highlight: 'shadow-[8px_0_0_0_rgb(var(--highlight))] group-hover:shadow-[8px_0_0_0_rgb(var(--highlight))]', + primary: + 'shadow-[8px_0_0_0_rgb(var(--primary))] group-hover:shadow-[8px_0_0_0_rgb(var(--secondary))]', + secondary: + 'shadow-[8px_0_0_0_rgb(var(--secondary))] group-hover:shadow-[8px_0_0_0_rgb(var(--primary))]', + highlight: + 'shadow-[8px_0_0_0_rgb(var(--highlight))] group-hover:shadow-[8px_0_0_0_rgb(var(--highlight))]', }, br: { - primary: 'shadow-[0_-8px_0_0_rgb(var(--primary))] group-hover:shadow-[0_-8px_0_0_rgb(var(--secondary))]', - secondary: 'shadow-[0_-8px_0_0_rgb(var(--secondary))] group-hover:shadow-[0_-8px_0_0_rgb(var(--primary))]', - highlight: 'shadow-[0_-8px_0_0_rgb(var(--highlight))] group-hover:shadow-[0_-8px_0_0_rgb(var(--highlight))]', - } - } -} - + primary: + 'shadow-[0_-8px_0_0_rgb(var(--primary))] group-hover:shadow-[0_-8px_0_0_rgb(var(--secondary))]', + secondary: + 'shadow-[0_-8px_0_0_rgb(var(--secondary))] group-hover:shadow-[0_-8px_0_0_rgb(var(--primary))]', + highlight: + 'shadow-[0_-8px_0_0_rgb(var(--highlight))] group-hover:shadow-[0_-8px_0_0_rgb(var(--highlight))]', + }, + }, +}; export type SmoothButtonProps = { - onClick?: (e: any) => void, + onClick?: (e: any) => void; bottom?: boolean; top?: boolean; color?: 'primary' | 'secondary' | 'highlight'; title?: string; -} & ReactNodeProps +} & ReactNodeProps; export default function SmoothButton({ onClick = (_) => {}, @@ -63,8 +74,9 @@ export default function SmoothButton({ onClick={(e) => onClick(e)} className={cx( 'group absolute h-content-header w-content-header hover:text-highlight', - bgMapper[color], hoverBgMapper[color], - bottom ? 'bottom-0 right-0 rounded-tl-border rounded-br-border' : '', + bgMapper[color], + hoverBgMapper[color], + bottom ? 'bottom-0 right-0 rounded-br-border rounded-tl-border' : '', top ? 'right-0 top-0 rounded-bl-border rounded-tr-border' : '', )} title={title} @@ -72,14 +84,34 @@ export default function SmoothButton({ {children} {bottom && ( <> -
-
+
+
)} {top && ( <> -
-
+
+
)} diff --git a/src/styles/app.css b/src/styles/app.css index be2a35f..8f59dac 100644 --- a/src/styles/app.css +++ b/src/styles/app.css @@ -69,14 +69,21 @@ body { } ::-webkit-scrollbar { - display: none; + width: 2px; } -* { - -ms-overflow-style: none; - scrollbar-width: none; +::-webkit-scrollbar-track { + background: #f1f1f1; } +/* Handle on hover */ +::-webkit-scrollbar-thumb:hover { + background: #555; +} +/* Handle */ +::-webkit-scrollbar-thumb { + background: #888; +} @media (prefers-color-scheme: dark) { :root { --primary: 255, 255, 255;