Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dark/light mode added to default layout and nav #147

Merged
merged 1 commit into from
Jan 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/features/DefaultLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ type DefaultLayoutProps = {

const DefaultLayout = ({ children }: DefaultLayoutProps) => {
return (
<div className="grid grid-cols-1 lg:grid-cols-[256px_repeat(3,_minmax(0,_1fr))] gap-10 h-screen">
<header className="col-span-1">
<div className="bg-cft-light-gray dark:bg-cft-black grid grid-cols-1 lg:grid-cols-[256px_repeat(3,_minmax(0,_1fr))] gap-10 h-screen">
<header className="bg-cft-light-gray dark:bg-cft-black col-span-1 ">
<Nav />
</header>
<main className="col-span-1 lg:col-span-3 pt-10 container px-20">
Expand Down
2 changes: 1 addition & 1 deletion src/features/Nav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import Link from "next/link";
const Nav = () => {
return (
<>
<nav className="w-screen lg:w-64 bg-cft-black shadow flex-col justify-between">
<nav className="w-screen lg:w-64 bg-cft-nav-gray dark:bg-cft-black shadow flex-col justify-between">
<div>
<div className="flex items-center justify-center my-6 cursor-pointer">
<Link href={'/'} passHref={true}>
Expand Down
4 changes: 2 additions & 2 deletions src/styles/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
@tailwind utilities;

body, html {
@apply bg-cft-black;
@apply text-white;
@apply bg-cft-light-gray dark:bg-cft-black;
@apply text-cft-black dark:text-cft-white;
}
1 change: 1 addition & 0 deletions tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ module.exports = {
'cft-black': '#121212',
'cft-light-gray': '#BEBCBC',
'cft-white': '#F9F9F9',
'cft-nav-gray': '#E6E6E6',
},
},
},
Expand Down