Skip to content

Commit

Permalink
Update login button styling
Browse files Browse the repository at this point in the history
  • Loading branch information
backjonas committed Sep 4, 2023
1 parent 4b1440f commit 2b4201f
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 15 deletions.
10 changes: 6 additions & 4 deletions components/PageSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -18,9 +18,11 @@ const PageSection = ({
isPrivate,
}: PageSectionProps) => (
<div>
<h2 id={titleToAnchor(title)} className="scroll-mt-24">
{title}
</h2>
{title && (
<h2 id={titleToAnchor(title)} className="scroll-mt-24">
{title}
</h2>
)}
<div
dangerouslySetInnerHTML={{
__html: marked.parse(content ?? ''),
Expand Down
14 changes: 8 additions & 6 deletions components/TableOfContents.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,14 @@ const TableOfContents = ({ sections }: { sections: Section[] }) => {
<tbody>
{sections.map((section, i) => (
<tr key={i}>
<Link
className="no-underline hover:underline"
href={`#${titleToAnchor(section.attributes.title)}`}
>
{section.attributes.title}
</Link>
{section.attributes.title && (
<Link
className="no-underline hover:underline"
href={`#${titleToAnchor(section.attributes.title)}`}
>
{section.attributes.title}
</Link>
)}
</tr>
))}
</tbody>
Expand Down
4 changes: 2 additions & 2 deletions components/header/navbar/LoginButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
)}
>
Expand All @@ -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
)}
>
Expand Down
6 changes: 3 additions & 3 deletions models/page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -35,7 +35,7 @@ export interface Section {
export interface FileFolder {
id: number
attributes: {
title: string
title?: string
folderId: string
description?: string
createdAt: Date
Expand Down

0 comments on commit 2b4201f

Please sign in to comment.