From 62dbc5d081807ae145b722cad03d9295de7be7bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20B=C3=A4ck?= Date: Mon, 4 Sep 2023 21:51:01 +0300 Subject: [PATCH] Update login button styling --- components/Banner.tsx | 2 +- components/PageSection.tsx | 10 ++++++---- components/TableOfContents.tsx | 14 ++++++++------ components/header/navbar/LoginButton.tsx | 4 ++-- components/header/navbar/SideMenu.tsx | 2 +- models/page.ts | 6 +++--- 6 files changed, 21 insertions(+), 17 deletions(-) diff --git a/components/Banner.tsx b/components/Banner.tsx index fa3691e..0802563 100644 --- a/components/Banner.tsx +++ b/components/Banner.tsx @@ -11,7 +11,7 @@ export type BannerImage = StrapiImage['data'] const MainBanner = ({ bannerImages }: { bannerImages: BannerImage[] }) => { const urls = bannerImages.map((img) => img.attributes.url) return ( -
+
{urls.length !== 0 ? : }
(
-

- {title} -

+ {title && ( +

+ {title} +

+ )}
{ {sections.map((section, i) => ( - - {section.attributes.title} - + {section.attributes.title && ( + + {section.attributes.title} + + )} ))} diff --git a/components/header/navbar/LoginButton.tsx b/components/header/navbar/LoginButton.tsx index 2d4b254..b42c212 100644 --- a/components/header/navbar/LoginButton.tsx +++ b/components/header/navbar/LoginButton.tsx @@ -11,7 +11,7 @@ const LoginButton = ({ className }: { className?: string }) => { signIn('keycloak') }} className={classNames( - 'hover:bg-gray-900 mx-3 rounded-lg border border-white p-2 text-white hover:font-bold', + 'mx-3 rounded-lg border border-white p-2 text-white hover:border-slate-300 hover:text-slate-300', className )} > @@ -24,7 +24,7 @@ const LoginButton = ({ className }: { className?: string }) => { signOut({ callbackUrl: '/' }) }} className={classNames( - 'mx-3 rounded-lg border border-teknologröd p-2 text-teknologröd hover:font-bold', + 'mx-3 rounded-lg border border-teknologröd p-2 text-teknologröd hover:border-red-800 hover:text-red-800', className )} > diff --git a/components/header/navbar/SideMenu.tsx b/components/header/navbar/SideMenu.tsx index fe75467..4509f43 100644 --- a/components/header/navbar/SideMenu.tsx +++ b/components/header/navbar/SideMenu.tsx @@ -10,7 +10,7 @@ const SideMenu = ({ open, children }: SideMenuProps) => (
{children} diff --git a/models/page.ts b/models/page.ts index 51bfa95..11967e1 100644 --- a/models/page.ts +++ b/models/page.ts @@ -21,8 +21,8 @@ export type PageType = { export interface Section { id: number attributes: { - title: string - content: string + title?: string + content?: string createdAt: Date updatedAt: Date publishedAt: Date @@ -35,7 +35,7 @@ export interface Section { export interface FileFolder { id: number attributes: { - title: string + title?: string folderId: string description?: string createdAt: Date