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 62dbc5d
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 17 deletions.
2 changes: 1 addition & 1 deletion components/Banner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export type BannerImage = StrapiImage['data']
const MainBanner = ({ bannerImages }: { bannerImages: BannerImage[] }) => {
const urls = bannerImages.map((img) => img.attributes.url)
return (
<div className="relative h-[500px] w-screen overflow-x-hidden bg-black">
<div className="relative h-[500px] w-full overflow-x-hidden bg-black">
{urls.length !== 0 ? <Carousel urls={urls} /> : <SingleBannerImage />}
<div className="absolute left-0 right-0 top-[180px] flex flex-col xl:left-40 xl:right-auto xl:flex-row">
<svg
Expand Down
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
2 changes: 1 addition & 1 deletion components/header/navbar/SideMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const SideMenu = ({ open, children }: SideMenuProps) => (
<div
className={classNames(
open ? 'translate-y-0' : '-translate-y-full',
'duration-400 fixed left-0 top-0 z-10 h-screen w-full overflow-x-hidden bg-darkgray px-4 py-16 transition ease-in-out descendant:mb-2 md:hidden'
'duration-400 fixed left-0 top-0 z-10 h-full w-full overflow-x-hidden bg-darkgray px-4 py-16 transition ease-in-out descendant:mb-2 md:hidden'
)}
>
{children}
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 62dbc5d

Please sign in to comment.