From 2b4201fc58d5265667c5634b22dd1cf58e29157d 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/PageSection.tsx | 10 ++++++---- components/TableOfContents.tsx | 14 ++++++++------ components/header/navbar/LoginButton.tsx | 4 ++-- models/page.ts | 6 +++--- 4 files changed, 19 insertions(+), 15 deletions(-) diff --git a/components/PageSection.tsx b/components/PageSection.tsx index 74ab747..3760089 100644 --- a/components/PageSection.tsx +++ b/components/PageSection.tsx @@ -5,7 +5,7 @@ import { FileFolder } from '@models/page' import DriveExplorer from './FileExplorer' type PageSectionProps = { - title: string + title?: string content?: string file_folders: FileFolder[] isPrivate: boolean @@ -18,9 +18,11 @@ const PageSection = ({ isPrivate, }: PageSectionProps) => (
-

- {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/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