From 2f6baccd1a04a55977ad5e9507172e6eadb89c3b Mon Sep 17 00:00:00 2001 From: Bochkovskyi Date: Thu, 25 Jan 2024 17:42:42 +0200 Subject: [PATCH 01/24] add darkMode support --- tailwind.config.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tailwind.config.ts b/tailwind.config.ts index a436c7f..4cf83ad 100644 --- a/tailwind.config.ts +++ b/tailwind.config.ts @@ -6,6 +6,7 @@ const config: Config = { './src/components/**/*.{js,ts,jsx,tsx,mdx}', './src/app/**/*.{js,ts,jsx,tsx,mdx}', ], + darkMode: 'class', plugins: [], theme: { extend: { @@ -17,7 +18,7 @@ const config: Config = { 'top-down': 'top-down 0.5s ease forwards', 'top-up': 'top-up 0.5s ease forwards', }, - boxShadow: { blur: '0 4px 30px rgba(0, 0, 0, 0.1);' }, + boxShadow: { blur: '0 4px 30px rgba(0, 0, 0, 0.1)' }, colors: { accent: '#ff5100', dark: '#1a1a1a', From 00effe409c25a6d0cc40c67fb898b53cc5481894 Mon Sep 17 00:00:00 2001 From: Bochkovskyi Date: Thu, 25 Jan 2024 17:43:33 +0200 Subject: [PATCH 02/24] update buttonVariants and variants prop usage --- src/components/ui/button.tsx | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/src/components/ui/button.tsx b/src/components/ui/button.tsx index 82b859e..8f772e2 100644 --- a/src/components/ui/button.tsx +++ b/src/components/ui/button.tsx @@ -2,7 +2,10 @@ import { classnames } from '@/utils' import Link from 'next/link' import { FC, ReactNode } from 'react' -type ButtonVariant = 'outline' | 'solid' +const buttonVariants = { + outline: 'text-accent bg-transparent md:hover:text-light md:hover:bg-accent', + solid: 'text-light bg-accent md:hover:bg-opacity-80', +} type ButtonProps = { children: ReactNode @@ -11,12 +14,7 @@ type ButtonProps = { href?: string onClick?: () => void type?: 'button' | 'reset' | 'submit' - variant?: ButtonVariant -} - -const buttonStyles: Record = { - outline: 'text-accent bg-transparent md:hover:text-light md:hover:bg-accent', - solid: 'text-light bg-accent md:hover:bg-opacity-80', + variant?: keyof typeof buttonVariants } const Button: FC = ({ @@ -34,7 +32,7 @@ const Button: FC = ({ = ({ + ) + } + + return ( + + ) +} + +export default ThemeToggler From 76ed4bc9d75ebc83cbfb8b56aefd08724770bb99 Mon Sep 17 00:00:00 2001 From: Bochkovskyi Date: Fri, 26 Jan 2024 15:50:54 +0200 Subject: [PATCH 19/24] uupdate styles --- src/components/pages/hero.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/pages/hero.tsx b/src/components/pages/hero.tsx index 073579a..3ee2985 100644 --- a/src/components/pages/hero.tsx +++ b/src/components/pages/hero.tsx @@ -9,7 +9,10 @@ import styles from './hero.module.css' const Hero: FC = () => { return (
From 391b8cfc15968c7ab0ba07c66d1ade45f3223d44 Mon Sep 17 00:00:00 2001 From: Bochkovskyi Date: Fri, 26 Jan 2024 15:51:46 +0200 Subject: [PATCH 20/24] add tailwind prettier plugin --- package-lock.json | 72 ++++++++++++++++++++++++++++++++++++++++++++++- package.json | 3 +- 2 files changed, 73 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 25fbdff..3ae6c3f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -26,7 +26,8 @@ "husky": "^8.0.3", "lint-staged": "^15.2.0", "postcss": "^8", - "prettier": "3.2.4", + "prettier": "^3.2.4", + "prettier-plugin-tailwindcss": "^0.5.11", "tailwindcss": "^3.3.0", "typescript": "^5" } @@ -5409,6 +5410,75 @@ "url": "https://github.com/prettier/prettier?sponsor=1" } }, + "node_modules/prettier-plugin-tailwindcss": { + "version": "0.5.11", + "resolved": "https://registry.npmjs.org/prettier-plugin-tailwindcss/-/prettier-plugin-tailwindcss-0.5.11.tgz", + "integrity": "sha512-AvI/DNyMctyyxGOjyePgi/gqj5hJYClZ1avtQvLlqMT3uDZkRbi4HhGUpok3DRzv9z7Lti85Kdj3s3/1CeNI0w==", + "dev": true, + "engines": { + "node": ">=14.21.3" + }, + "peerDependencies": { + "@ianvs/prettier-plugin-sort-imports": "*", + "@prettier/plugin-pug": "*", + "@shopify/prettier-plugin-liquid": "*", + "@trivago/prettier-plugin-sort-imports": "*", + "prettier": "^3.0", + "prettier-plugin-astro": "*", + "prettier-plugin-css-order": "*", + "prettier-plugin-import-sort": "*", + "prettier-plugin-jsdoc": "*", + "prettier-plugin-marko": "*", + "prettier-plugin-organize-attributes": "*", + "prettier-plugin-organize-imports": "*", + "prettier-plugin-style-order": "*", + "prettier-plugin-svelte": "*" + }, + "peerDependenciesMeta": { + "@ianvs/prettier-plugin-sort-imports": { + "optional": true + }, + "@prettier/plugin-pug": { + "optional": true + }, + "@shopify/prettier-plugin-liquid": { + "optional": true + }, + "@trivago/prettier-plugin-sort-imports": { + "optional": true + }, + "prettier-plugin-astro": { + "optional": true + }, + "prettier-plugin-css-order": { + "optional": true + }, + "prettier-plugin-import-sort": { + "optional": true + }, + "prettier-plugin-jsdoc": { + "optional": true + }, + "prettier-plugin-marko": { + "optional": true + }, + "prettier-plugin-organize-attributes": { + "optional": true + }, + "prettier-plugin-organize-imports": { + "optional": true + }, + "prettier-plugin-style-order": { + "optional": true + }, + "prettier-plugin-svelte": { + "optional": true + }, + "prettier-plugin-twig-melody": { + "optional": true + } + } + }, "node_modules/prop-types": { "version": "15.8.1", "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", diff --git a/package.json b/package.json index 7746f84..946ddca 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,8 @@ "husky": "^8.0.3", "lint-staged": "^15.2.0", "postcss": "^8", - "prettier": "3.2.4", + "prettier": "^3.2.4", + "prettier-plugin-tailwindcss": "^0.5.11", "tailwindcss": "^3.3.0", "typescript": "^5" } From 6250552c46a6f6449a11621143b2e3302c998ea2 Mon Sep 17 00:00:00 2001 From: Bochkovskyi Date: Fri, 26 Jan 2024 15:59:23 +0200 Subject: [PATCH 21/24] update styles --- src/app/globals.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/globals.css b/src/app/globals.css index f1a8956..86568d9 100644 --- a/src/app/globals.css +++ b/src/app/globals.css @@ -8,7 +8,7 @@ html { } body { - @apply text-dark; + @apply text-dark dark:text-light; } .no-scroll { @@ -16,7 +16,7 @@ body { } .menu-icon { - @apply before:absolute before:top-0 before:left-0 before:h-0.5 after:h-0.5; + @apply before:absolute before:left-0 before:top-0 before:h-0.5 after:h-0.5; } @media (min-width: theme('screens.md')) { From e046f6a951de271415906a79115ecee2300c4a92 Mon Sep 17 00:00:00 2001 From: Bochkovskyi Date: Fri, 26 Jan 2024 16:14:52 +0200 Subject: [PATCH 22/24] utilize prettier tailwind plugin --- .prettierrc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.prettierrc b/.prettierrc index fa51da2..c357370 100644 --- a/.prettierrc +++ b/.prettierrc @@ -1,6 +1,8 @@ { - "trailingComma": "es5", + "plugins": ["prettier-plugin-tailwindcss"], "tabWidth": 2, + "tailwindConfig": "./tailwind.config.ts", + "trailingComma": "es5", "semi": false, "singleQuote": true } From ba90e888c731652a038e832bb32a299651480a19 Mon Sep 17 00:00:00 2001 From: Bochkovskyi Date: Fri, 26 Jan 2024 16:16:14 +0200 Subject: [PATCH 23/24] format with prettier --- src/app/layout.tsx | 4 ++-- src/components/header/header.tsx | 6 +++--- src/components/header/menu/menu-icon/menu-icon-bar.tsx | 2 +- src/components/header/menu/menu-icon/menu-icon.tsx | 2 +- src/components/header/menu/menu-item.tsx | 2 +- src/components/header/menu/menu.tsx | 2 +- src/components/pages/hero.tsx | 4 ++-- src/components/ui/button.tsx | 10 +++++----- src/components/ui/content.tsx | 2 +- src/components/ui/socials/socials-item.tsx | 4 ++-- src/components/ui/socials/socials.tsx | 2 +- src/components/ui/theme-toggler.tsx | 6 +++--- 12 files changed, 23 insertions(+), 23 deletions(-) diff --git a/src/app/layout.tsx b/src/app/layout.tsx index 09626b0..199b661 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -20,11 +20,11 @@ export default function RootLayout({ return (
-
{children}
+
{children}
11111
diff --git a/src/components/header/header.tsx b/src/components/header/header.tsx index 1cf1ff6..9c76bd6 100644 --- a/src/components/header/header.tsx +++ b/src/components/header/header.tsx @@ -14,7 +14,7 @@ const Header: FC = ({ className }) => { return (
@@ -23,8 +23,8 @@ const Header: FC = ({ className }) => { My Work Contact Me -
- +
+
diff --git a/src/components/header/menu/menu-icon/menu-icon-bar.tsx b/src/components/header/menu/menu-icon/menu-icon-bar.tsx index 871c73d..b400caf 100644 --- a/src/components/header/menu/menu-icon/menu-icon-bar.tsx +++ b/src/components/header/menu/menu-icon/menu-icon-bar.tsx @@ -7,7 +7,7 @@ const MenuIconBar: FC = ({ className }) => { return ( diff --git a/src/components/header/menu/menu-icon/menu-icon.tsx b/src/components/header/menu/menu-icon/menu-icon.tsx index a3e635d..6ec2ae1 100644 --- a/src/components/header/menu/menu-icon/menu-icon.tsx +++ b/src/components/header/menu/menu-icon/menu-icon.tsx @@ -15,7 +15,7 @@ const MenuIcon: FC = ({ className }) => { return (
= ({ children, className, href }) => { return (
  • {children} diff --git a/src/components/header/menu/menu.tsx b/src/components/header/menu/menu.tsx index 7880b44..e47029c 100644 --- a/src/components/header/menu/menu.tsx +++ b/src/components/header/menu/menu.tsx @@ -15,7 +15,7 @@ const Menu: FC = ({ children, className }) => { return (
      { >
      -

      +

      Hi, I'm Anton Bochkovskyi

      -

      +

      Motivated Junior Front-End Developer with a passion for creating engaging, elegant and responsive user interfaces.

      diff --git a/src/components/ui/button.tsx b/src/components/ui/button.tsx index 6cb2446..d0011cf 100644 --- a/src/components/ui/button.tsx +++ b/src/components/ui/button.tsx @@ -3,11 +3,11 @@ import Link from 'next/link' import { FC, ReactNode } from 'react' const buttonVariants = { - icon: 'p-2 bg-transparent md:hover:text-accent', + icon: 'bg-transparent p-2 md:hover:text-accent', outline: - 'px-5 py-2 rounded-md border-2 border-accent text-accent bg-transparent md:hover:text-light md:hover:bg-accent', + 'rounded-md border-2 border-accent bg-transparent px-5 py-2 text-accent md:hover:bg-accent md:hover:text-light', solid: - 'px-5 py-2 rounded-md border-2 border-accent text-light bg-accent md:hover:bg-opacity-80', + 'rounded-md border-2 border-accent bg-accent px-5 py-2 text-light md:hover:bg-opacity-80', } type ButtonProps = { @@ -34,7 +34,7 @@ const Button: FC = ({ {href ? ( = ({ ) : ( ) } @@ -28,9 +28,9 @@ const ThemeToggler: FC = ({ className }) => { return ( ) From 19f442de75009862f39e39ae433741e275077692 Mon Sep 17 00:00:00 2001 From: Bochkovskyi Date: Fri, 26 Jan 2024 16:18:58 +0200 Subject: [PATCH 24/24] update styles --- src/components/ui/theme-toggler.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/ui/theme-toggler.tsx b/src/components/ui/theme-toggler.tsx index f5ded0c..13521ac 100644 --- a/src/components/ui/theme-toggler.tsx +++ b/src/components/ui/theme-toggler.tsx @@ -20,7 +20,7 @@ const ThemeToggler: FC = ({ className }) => { if (!mounted) { return ( ) }