Skip to content

Commit

Permalink
Upgrade all packages and improve navbar design
Browse files Browse the repository at this point in the history
  • Loading branch information
w3bdesign committed Dec 14, 2020
1 parent 1ea3c05 commit d2db586
Show file tree
Hide file tree
Showing 8 changed files with 1,319 additions and 2,204 deletions.
9 changes: 3 additions & 6 deletions components/Header/Navbar.component.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,7 @@ const Navbar = () => {
return (
<header>
<nav id="header" className="fixed top-0 z-50 w-full py-1 bg-white ">
<div
id="navbar-div"
className="container flex flex-wrap items-center justify-between px-6 py-3 mt-0 "
>
<div className="container flex flex-wrap items-center justify-between px-6 py-3 mx-auto mt-0">
<Hamburger />
<div
className="order-3 hidden w-full md:flex md:items-center md:w-auto md:order-1"
Expand All @@ -25,14 +22,14 @@ const Navbar = () => {
<ul className="items-center justify-between pt-4 text-base text-gray-700 md:flex md:pt-0">
<li>
<Link href="/produkter">
<a className="inline-block px-4 py-2 no-underline hover:text-black hover:underline">
<a className="inline-block py-2 pr-4 no-underline hover:text-black hover:underline">
Produkter
</a>
</Link>
</li>
<li>
<Link href="/kategorier">
<a className="inline-block px-4 py-2 no-underline hover:text-black hover:underline">
<a className="inline-block py-2 pr-4 no-underline hover:text-black hover:underline">
Kategorier
</a>
</Link>
Expand Down
3,440 changes: 1,277 additions & 2,163 deletions package-lock.json

Large diffs are not rendered by default.

22 changes: 12 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nextjs-woocommerce",
"version": "1.0.5",
"version": "1.0.6",
"description": "Nextjs WooCommerce webshop",
"main": "index.js",
"scripts": {
Expand All @@ -12,24 +12,26 @@
"author": "",
"license": "ISC",
"dependencies": {
"@apollo/client": "^3.2.5",
"@types/react": "^16.9.55",
"algoliasearch": "^4.5.1",
"@apollo/client": "^3.3.6",
"@types/react": "^17.0.0",
"algoliasearch": "^4.8.3",
"autoprefixer": "^10.1.0",
"graphql": "^15.4.0",
"next": "^10.0.0",
"next": "^10.0.3",
"node-fetch": "^2.6.1",
"nprogress": "^0.2.0",
"postcss": "^8.2.1",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"react-hook-form": "^6.9.6",
"react-hook-form": "^6.13.0",
"react-instantsearch-dom": "^6.8.2",
"react-spring": "^8.0.27",
"styled-components": "^5.2.0",
"uuid": "^8.3.1"
"styled-components": "^5.2.1",
"uuid": "^8.3.2"
},
"devDependencies": {
"babel-plugin-styled-components": "^1.11.1",
"babel-plugin-styled-components": "^1.12.0",
"postcss-preset-env": "^6.7.0",
"tailwindcss": "^1.9.6"
"tailwindcss": "^2.0.2"
}
}
9 changes: 6 additions & 3 deletions postcss.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
module.exports = {
plugins: ['tailwindcss', 'postcss-preset-env'],
}

plugins: {
tailwindcss: {},
autoprefixer: {},
},
// plugins: ['tailwindcss', 'postcss-preset-env'],
};
4 changes: 4 additions & 0 deletions postcss.config.js.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = {
plugins: ['tailwindcss', 'postcss-preset-env'],
}

16 changes: 0 additions & 16 deletions styles/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -38,22 +38,6 @@
display: none;
}

/* Fix for annoying CSS bug with NavBar moving slightly on front page only */

@media only screen and (min-width: 1600px) {
#navbar-div {
margin-left: 330px;
}
}

@media only screen and (max-width: 769px) {
#navbar-div {
margin-left: auto;
margin-right: auto;
}
}
/* End fix */

.ais-SearchBox-reset {
margin-left: 10px;
}
Expand Down
11 changes: 5 additions & 6 deletions tailwind.config.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
module.exports = {
purge: ['./components/**/*.jsx', './pages/**/*.js'],
darkMode: false, // or 'media' or 'class'
theme: {
extend: {},
},
variants: {},
plugins: [],
future: {
removeDeprecatedGapUtilities: true,
purgeLayersByDefault: true,
variants: {
extend: {},
},
};
plugins: [],
}
12 changes: 12 additions & 0 deletions tailwind.config.js.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
module.exports = {
purge: ['./components/**/*.jsx', './pages/**/*.js'],
theme: {
extend: {},
},
variants: {},
plugins: [],
future: {
removeDeprecatedGapUtilities: true,
purgeLayersByDefault: true,
},
};

0 comments on commit d2db586

Please sign in to comment.