Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 482c9ed

Browse files
galleria to pages
1 parent 9270e74 commit 482c9ed

File tree

5 files changed

+86
-19
lines changed

5 files changed

+86
-19
lines changed
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
/* HAMBURGER */
2+
3+
.hamburger-sunny-container {
4+
width: 26px;
5+
height: 16px;
6+
cursor: pointer;
7+
z-index: 1000;
8+
border: none;
9+
background-color: transparent;
10+
display: none;
11+
}
12+
13+
@media only screen and (max-width: 700px) {
14+
.hamburger-sunny-container {
15+
display: block;
16+
}
17+
}
18+
19+
.hamburger-sunny {
20+
width: 26px;
21+
height: 2px;
22+
transition: all 300ms ease-in-out;
23+
display: block;
24+
transform-origin: 3px 1px;
25+
margin-bottom: 5.75px;
26+
background-color: white;
27+
}
28+
29+
.hamburger-sunny:first-of-type,
30+
.hamburger-sunny:last-of-type {
31+
content: "";
32+
display: block;
33+
transition: all 300ms ease-in-out;
34+
}
35+
36+
.hamburger-sunny:last-of-type {
37+
margin-bottom: 0px;
38+
}
39+
40+
/* HAMBURGER ACTIVE */
41+
42+
.hamburger-sunny-active:nth-of-type(2) {
43+
opacity: 0;
44+
}
45+
46+
.hamburger-sunny-active:first-of-type {
47+
transform: rotate(45deg);
48+
width: 28px;
49+
}
50+
51+
.hamburger-sunny-active:last-of-type {
52+
transform: rotate(-45deg);
53+
width: 28px;
54+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import React from 'react'
2+
import './HamburgerSunny.css'
3+
4+
const HamburgerSunny = ({ handleMobileNav, showMenu }) => {
5+
// delete class all-hamburger-containers when copypasting.
6+
return (
7+
<button className='hamburger-sunny-container'
8+
onClick={handleMobileNav}>
9+
<span className={showMenu ? 'hamburger-sunny hamburger-sunny-active' : 'hamburger-sunny'}></span>
10+
<span className={showMenu ? 'hamburger-sunny hamburger-sunny-active' : 'hamburger-sunny'}></span>
11+
<span className={showMenu ? 'hamburger-sunny hamburger-sunny-active' : 'hamburger-sunny'}></span>
12+
</button>
13+
)
14+
}
15+
16+
export default HamburgerSunny

‎src/components/junior/sunnySide/Nav/Nav.css‎

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -79,15 +79,6 @@
7979
color: white;
8080
}
8181

82-
/* HAMBURGER */
83-
84-
.sunnySide-nav-hamburger-btn {
85-
background-color: transparent;
86-
border: none;
87-
cursor: pointer;
88-
display: none;
89-
}
90-
9182
/* MOBILE NAV */
9283

9384
.sunnySide-nav-mobile-links {
@@ -165,10 +156,6 @@
165156
display: flex;
166157
}
167158

168-
.sunnySide-nav-hamburger-btn {
169-
display: block;
170-
}
171-
172159
.sunnySide-header-nav {
173160
margin-right: 0;
174161
}

‎src/components/junior/sunnySide/Nav/Nav.jsx‎

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
1-
import React from 'react'
1+
import React,{useState} from 'react'
22
import './Nav.css'
33
import logo from '../assets/sunnyside-agency-landing-page-main/images/logo.svg'
44
import hamburger from '../assets/sunnyside-agency-landing-page-main/images/icon-hamburger.svg'
5+
import HamburgerSunny from './HamburgerSunny'
56

67
const Nav = () => {
78

9+
const [showMenu, setShowMenu] = useState(false)
10+
const toggleMenu = () => setShowMenu(prev => !prev)
11+
812
const handleMobileNav = () => {
913
document.querySelector('.sunnySide-nav-mobile-links').classList.toggle('sunnySide-nav-mobile-links-active')
14+
toggleMenu();
1015
}
1116

1217
return (
@@ -23,11 +28,7 @@ const Nav = () => {
2328
<button>Contact</button>
2429
</li>
2530
</ul>
26-
<button className='sunnySide-nav-hamburger-btn'
27-
onClick={handleMobileNav}
28-
>
29-
<img src={hamburger} alt="" />
30-
</button>
31+
<HamburgerSunny handleMobileNav={handleMobileNav} showMenu={showMenu}></HamburgerSunny>
3132
<ul className='sunnySide-nav-mobile-links'
3233
>
3334
<li className="sunnySide-nav-mobile-link">About</li>

‎src/pages/data.js‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
11
export const pagesData = [
2+
{
3+
id:"8",
4+
title: "Galleria slideshow site",
5+
desc: "Art Gallery Slideshow with masonry layout, slideshow logic with auto/manual play and lightbox view",
6+
img: "https://res.cloudinary.com/dz209s6jk/image/upload/f_auto,q_auto,w_700/Challenges/mctvqcomxdsv3cgawo4f.jpg",
7+
category:"intermediate",
8+
type: "multi",
9+
link:"https://galleria-demo.netlify.app/",
10+
},
211
{
312
id:"7",
413
title: "Photosnap multi-page website",

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /