Skip to content

Commit

Permalink
Top bar distinction feature (#1643)
Browse files Browse the repository at this point in the history
* feat: Add visual distinction between top bar and cards (#1422)

* removed shadow from header

* feat: Add visual distinction between top bar and cards (#1422)

* fix: removed bar from header and applied it to GeneralLayouts.tsx for th
  • Loading branch information
chris-nowicki authored Sep 6, 2023
1 parent 6c4090e commit 59c7e75
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 2 deletions.
2 changes: 1 addition & 1 deletion components/Header/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const Header: FC = () => {
const { results } = useResults()

return (
<header className="fixed top-0 left-0 z-30 row-start-1 row-end-2 flex h-[76px] w-screen items-center justify-between bg-light-primary dark:bg-dark">
<header className="fixed top-0 left-0 z-30 row-start-1 row-end-2 flex h-[76px] w-screen items-center justify-between bg-light-primary dark:bg-dark border-b border-b-light-primary dark:border-b-dark-primary">
<div className="bg-light-primary h-full w-fit flex-none px-6 py-4 dark:bg-dark lg:w-[290px]">
<Link href="/" aria-label="LinksHub Logo">
<Logo className="text-3xl" />
Expand Down
10 changes: 9 additions & 1 deletion layouts/GeneralLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,12 @@ import { SkipLink } from 'components/SkipLink/SkipLink'
import { useContext } from 'react'
import { IContext } from 'types'
import { GlobalContext } from 'context/GlobalContext'
import clsx from 'clsx'
import { usePathname } from 'next/navigation'

const GeneralLayout = ({ children }: { children: ReactNode }) => {
const { sidebar } = useContext<IContext>(GlobalContext)
const pathname = usePathname()

return (
<>
Expand All @@ -26,7 +29,12 @@ const GeneralLayout = ({ children }: { children: ReactNode }) => {
<Aside />
</nav>
<main
className="h-full px-4 lg:ml-[290px] lg:w-[calc(100%-290px)]"
className={clsx(
'h-full px-4 lg:ml-[290px] lg:w-[calc(100%-290px)]',

pathname != '/' &&
'lg:border-t lg:border-t-theme-primary lg:dark:border-t-theme-secondary transition-color ease-in-out duration-200'
)}
id="main"
>
{children}
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"@types/react": "18.0.31",
"@types/react-dom": "18.0.11",
"classnames": "^2.3.2",
"clsx": "^2.0.0",
"copy-to-clipboard": "^3.3.3",
"daisyui": "^2.51.5",
"eslint": "8.37.0",
Expand Down
8 changes: 8 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 comment on commit 59c7e75

@vercel
Copy link

@vercel vercel bot commented on 59c7e75 Sep 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.