Skip to content

Commit 2b2cd9e

Browse files
committed
Deleting the Nav.module.css file and creating the scss for the Nav component that contains all the scss styling and referencing the scss file in Nav component
1 parent 1f51fa1 commit 2b2cd9e

File tree

3 files changed

+145
-139
lines changed

3 files changed

+145
-139
lines changed

components/Nav.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import Link from "next/link";
22
import { useEffect, useState } from "react";
3-
import styles from "../styles/Nav.module.css";
3+
import styles from "../styles/Nav.module.scss";
44
import { linksNav } from "../utils/links";
55

66
export default function Nav() {

styles/Nav.module.css

Lines changed: 0 additions & 138 deletions
This file was deleted.

styles/Nav.module.scss

Lines changed: 144 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,144 @@
1+
.navContainer {
2+
width: 80%;
3+
position: relative;
4+
margin: 0 auto;
5+
}
6+
7+
.header {
8+
width: 100%;
9+
padding: 1em 0;
10+
}
11+
12+
.align {
13+
display: flex;
14+
align-items: center;
15+
}
16+
17+
.nav {
18+
width: 100%;
19+
overflow: hidden;
20+
visibility: hidden;
21+
height: 0;
22+
position: absolute;
23+
font-size: 1em;
24+
}
25+
26+
.navToggle {
27+
cursor: pointer;
28+
border: 0;
29+
width: 3em;
30+
height: 3em;
31+
padding: 0;
32+
background-color: transparent;
33+
color: black;
34+
transition: opacity 250ms ease;
35+
position: absolute;
36+
right: 0;
37+
38+
&:hover,
39+
&:focus {
40+
opacity: 0.75;
41+
}
42+
}
43+
44+
.hamburger {
45+
width: 50%;
46+
position: relative;
47+
48+
&,
49+
&::before,
50+
&::after {
51+
display: block;
52+
margin: 0 auto;
53+
height: 3px;
54+
background: black;
55+
}
56+
57+
&::before,
58+
&::after {
59+
content: "";
60+
width: 100%;
61+
}
62+
63+
&::before {
64+
transform: translateY(-6px);
65+
}
66+
67+
&::after {
68+
transform: translateY(3px);
69+
}
70+
}
71+
72+
73+
// .nav {
74+
// visibility: hidden;
75+
// height: 0;
76+
// position: absolute;
77+
// font-size: 1em;
78+
// }
79+
80+
.navVisible {
81+
visibility: visible;
82+
height: auto;
83+
position: relative;
84+
text-align: start;
85+
padding-top: 1em;
86+
}
87+
88+
.navList {
89+
margin: 0;
90+
padding: 0;
91+
list-style: none;
92+
}
93+
94+
.navItem {
95+
margin-top: 0.75em;
96+
}
97+
98+
.navLink {
99+
text-decoration: none;
100+
color: black;
101+
102+
&:focus,
103+
&:hover {
104+
opacity: 0.65;
105+
}
106+
}
107+
108+
.logo {
109+
border-radius: 50%;
110+
height: 5em;
111+
cursor: pointer;
112+
113+
&:hover {
114+
opacity: 0.6;
115+
}
116+
}
117+
118+
@media (min-width: 768px) {
119+
.navToggle {
120+
display: none;
121+
}
122+
123+
.nav {
124+
visibility: visible;
125+
display: flex;
126+
align-items: center;
127+
justify-content: flex-end;
128+
height: auto;
129+
position: relative;
130+
}
131+
132+
.navList {
133+
display: flex;
134+
}
135+
136+
.navItem {
137+
margin: 0 0 0 1.5em;
138+
}
139+
140+
.row {
141+
display: flex;
142+
justify-content: space-between;
143+
}
144+
}

0 commit comments

Comments
 (0)