From cc41a9c033c1694c5e71524c5cae1fb5cbdc516a Mon Sep 17 00:00:00 2001 From: Pablo Felipe Date: Wed, 19 Jan 2022 18:01:25 -0300 Subject: [PATCH 1/7] Adding new NavBar template and styling it --- src/components/NavBar.tsx | 134 ++++++++++++++++++++++++-------------- 1 file changed, 84 insertions(+), 50 deletions(-) diff --git a/src/components/NavBar.tsx b/src/components/NavBar.tsx index c0bc089..1a10cc3 100644 --- a/src/components/NavBar.tsx +++ b/src/components/NavBar.tsx @@ -1,15 +1,41 @@ -/* This example requires Tailwind CSS v2.0+ */ +/* + This example requires Tailwind CSS v2.0+ + + This example requires some changes to your config: + + ``` + // tailwind.config.js + module.exports = { + // ... + plugins: [ + // ... + require('@tailwindcss/forms'), + ], + } + ``` +*/ import { Fragment } from 'react' import { Disclosure, Menu, Transition } from '@headlessui/react' +import { SearchIcon } from '@heroicons/react/solid' import { BellIcon, MenuIcon, XIcon } from '@heroicons/react/outline' import DittoImg from "../assets/ditto.png" - +const user = { + name: 'Tom Cook', + email: 'tom@example.com', + imageUrl: + 'https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=2&w=256&h=256&q=80', +} const navigation = [ - { name: 'Home', href: '#', current: true }, - { name: 'About Us', href: '#', current: false }, - { name: 'Search', href: '#', current: false }, + { name: 'Home', href: '#', current: true }, + { name: 'About Us', href: '#', current: false }, + { name: 'Search', href: '#', current: false }, +] +const userNavigation = [ + { name: 'Your Profile', href: '#' }, + { name: 'Settings', href: '#' }, + { name: 'Sign out', href: '#' }, ] function classNames(...classes:any) { @@ -18,36 +44,15 @@ function classNames(...classes:any) { export default function NavBar() { return ( - + {({ open }) => ( <> -
- -
-
-
-
- {/* Mobile menu button*/} - - Open main menu - {open ? ( - -
-
+
+
+
Ditto Icon - Ditto Icon @@ -55,36 +60,65 @@ export default function NavBar() { The Game Database
-
-
- {navigation.map((item) => ( - - {item.name} - - ))} +
+
+
+ +
+
+
+
+
+ {/* Mobile menu button */} + + Open menu + {open ? ( + +
+
- -
+ + +
{navigation.map((item) => ( From 873fe5235d84efb7451167768d950a270fef58dd Mon Sep 17 00:00:00 2001 From: Pablo Felipe Date: Thu, 20 Jan 2022 16:49:16 -0300 Subject: [PATCH 2/7] Putting Search bar to the right --- src/components/NavBar.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/NavBar.tsx b/src/components/NavBar.tsx index 1a10cc3..acb6b03 100644 --- a/src/components/NavBar.tsx +++ b/src/components/NavBar.tsx @@ -61,7 +61,7 @@ export default function NavBar() {
-
+