Skip to content

Commit d2db586

Browse files
committed
Upgrade all packages and improve navbar design
1 parent 1ea3c05 commit d2db586

File tree

8 files changed

+1319
-2204
lines changed

8 files changed

+1319
-2204
lines changed

components/Header/Navbar.component.jsx

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,7 @@ const Navbar = () => {
1313
return (
1414
<header>
1515
<nav id="header" className="fixed top-0 z-50 w-full py-1 bg-white ">
16-
<div
17-
id="navbar-div"
18-
className="container flex flex-wrap items-center justify-between px-6 py-3 mt-0 "
19-
>
16+
<div className="container flex flex-wrap items-center justify-between px-6 py-3 mx-auto mt-0">
2017
<Hamburger />
2118
<div
2219
className="order-3 hidden w-full md:flex md:items-center md:w-auto md:order-1"
@@ -25,14 +22,14 @@ const Navbar = () => {
2522
<ul className="items-center justify-between pt-4 text-base text-gray-700 md:flex md:pt-0">
2623
<li>
2724
<Link href="/produkter">
28-
<a className="inline-block px-4 py-2 no-underline hover:text-black hover:underline">
25+
<a className="inline-block py-2 pr-4 no-underline hover:text-black hover:underline">
2926
Produkter
3027
</a>
3128
</Link>
3229
</li>
3330
<li>
3431
<Link href="/kategorier">
35-
<a className="inline-block px-4 py-2 no-underline hover:text-black hover:underline">
32+
<a className="inline-block py-2 pr-4 no-underline hover:text-black hover:underline">
3633
Kategorier
3734
</a>
3835
</Link>

package-lock.json

Lines changed: 1277 additions & 2163 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "nextjs-woocommerce",
3-
"version": "1.0.5",
3+
"version": "1.0.6",
44
"description": "Nextjs WooCommerce webshop",
55
"main": "index.js",
66
"scripts": {
@@ -12,24 +12,26 @@
1212
"author": "",
1313
"license": "ISC",
1414
"dependencies": {
15-
"@apollo/client": "^3.2.5",
16-
"@types/react": "^16.9.55",
17-
"algoliasearch": "^4.5.1",
15+
"@apollo/client": "^3.3.6",
16+
"@types/react": "^17.0.0",
17+
"algoliasearch": "^4.8.3",
18+
"autoprefixer": "^10.1.0",
1819
"graphql": "^15.4.0",
19-
"next": "^10.0.0",
20+
"next": "^10.0.3",
2021
"node-fetch": "^2.6.1",
2122
"nprogress": "^0.2.0",
23+
"postcss": "^8.2.1",
2224
"react": "^17.0.1",
2325
"react-dom": "^17.0.1",
24-
"react-hook-form": "^6.9.6",
26+
"react-hook-form": "^6.13.0",
2527
"react-instantsearch-dom": "^6.8.2",
2628
"react-spring": "^8.0.27",
27-
"styled-components": "^5.2.0",
28-
"uuid": "^8.3.1"
29+
"styled-components": "^5.2.1",
30+
"uuid": "^8.3.2"
2931
},
3032
"devDependencies": {
31-
"babel-plugin-styled-components": "^1.11.1",
33+
"babel-plugin-styled-components": "^1.12.0",
3234
"postcss-preset-env": "^6.7.0",
33-
"tailwindcss": "^1.9.6"
35+
"tailwindcss": "^2.0.2"
3436
}
3537
}

postcss.config.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
module.exports = {
2-
plugins: ['tailwindcss', 'postcss-preset-env'],
3-
}
4-
2+
plugins: {
3+
tailwindcss: {},
4+
autoprefixer: {},
5+
},
6+
// plugins: ['tailwindcss', 'postcss-preset-env'],
7+
};

postcss.config.js.example

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module.exports = {
2+
plugins: ['tailwindcss', 'postcss-preset-env'],
3+
}
4+

styles/index.css

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -38,22 +38,6 @@
3838
display: none;
3939
}
4040

41-
/* Fix for annoying CSS bug with NavBar moving slightly on front page only */
42-
43-
@media only screen and (min-width: 1600px) {
44-
#navbar-div {
45-
margin-left: 330px;
46-
}
47-
}
48-
49-
@media only screen and (max-width: 769px) {
50-
#navbar-div {
51-
margin-left: auto;
52-
margin-right: auto;
53-
}
54-
}
55-
/* End fix */
56-
5741
.ais-SearchBox-reset {
5842
margin-left: 10px;
5943
}

tailwind.config.js

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
module.exports = {
22
purge: ['./components/**/*.jsx', './pages/**/*.js'],
3+
darkMode: false, // or 'media' or 'class'
34
theme: {
45
extend: {},
56
},
6-
variants: {},
7-
plugins: [],
8-
future: {
9-
removeDeprecatedGapUtilities: true,
10-
purgeLayersByDefault: true,
7+
variants: {
8+
extend: {},
119
},
12-
};
10+
plugins: [],
11+
}

tailwind.config.js.example

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
module.exports = {
2+
purge: ['./components/**/*.jsx', './pages/**/*.js'],
3+
theme: {
4+
extend: {},
5+
},
6+
variants: {},
7+
plugins: [],
8+
future: {
9+
removeDeprecatedGapUtilities: true,
10+
purgeLayersByDefault: true,
11+
},
12+
};

0 commit comments

Comments
 (0)