Skip to content

Commit b88cdbe

Browse files
authored
Merge pull request #120 from Web-Dev-Path/chore/footer-revamp-social-media
Chore/footer revamp social media
2 parents b1168b4 + b6577a8 commit b88cdbe

File tree

8 files changed

+118
-20
lines changed

8 files changed

+118
-20
lines changed

CHANGELOG.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
5151

5252
- component file structure
5353
- ButtonLink.js styles
54-
55-
### Changed
56-
5754
- components folder structure
5855
- relative to absolute imports with aliases
5956
- updated to React 18 and Next.js latest
57+
- footer styling update + social media icons

components/layout/Footer.js

Lines changed: 32 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import Link from 'next/link';
22
import footerStyles from '@/styles/Footer.module.scss';
3-
import { linksNav } from '@/utils/links';
3+
import { linksNav, linksSocial } from '@/utils/links';
44
import NewsletterSubscribe from '@/components/mailchimp/NewsletterSubscribe';
55
import Image from 'next/image';
66
import Container from '@/components/containers/Container';
@@ -10,17 +10,6 @@ export default function Footer() {
1010
<footer className={footerStyles.footer}>
1111
<NewsletterSubscribe />
1212
<Container className={footerStyles.footer__inner}>
13-
<nav className={footerStyles.footer__nav} aria-label='Main'>
14-
<ul className={footerStyles.footer__navList}>
15-
{linksNav.map(link => (
16-
<li className={footerStyles.footer__navItem} key={link.text}>
17-
<Link href={link.href}>
18-
<a title={link.text}>{link.text}</a>
19-
</Link>
20-
</li>
21-
))}
22-
</ul>
23-
</nav>
2413
<Link href='/'>
2514
<a className={footerStyles.footer__logo} title='Go to the Homepage'>
2615
<Image
@@ -31,6 +20,37 @@ export default function Footer() {
3120
/>
3221
</a>
3322
</Link>
23+
<div className={footerStyles.footer__navSocialsDiv}>
24+
<nav className={footerStyles.footer__nav} aria-label='Main'>
25+
<ul className={footerStyles.footer__navList}>
26+
{linksNav.map(link => (
27+
<li className={footerStyles.footer__navItem} key={link.text}>
28+
<Link href={link.href}>
29+
<a title={link.text}>{link.text}</a>
30+
</Link>
31+
</li>
32+
))}
33+
</ul>
34+
</nav>
35+
<div className={footerStyles.footer__socialIcons}>
36+
<ul className={footerStyles.footer__socialList}>
37+
{linksSocial.filter(link => link.isVisible).map(link => (
38+
<li className={footerStyles.footer__socialItem} key={link.text}>
39+
<Link href={link.href}>
40+
<a title={link.text} target='_blank'>
41+
<Image
42+
href={link.href}
43+
src={link.src}
44+
height={65}
45+
width={47}
46+
/>
47+
</a>
48+
</Link>
49+
</li>
50+
))}
51+
</ul>
52+
</div>
53+
</div>
3454
</Container>
3555
<Container>
3656
<p className={footerStyles.footer__copyright}>

next.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,6 @@ module.exports = withPWA({
55
dest: 'public',
66
register: true,
77
skipWaiting: true,
8+
disable: process.env.NODE_ENV === 'development',
89
},
910
});

public/images/svg/GitHub.svg

Lines changed: 9 additions & 0 deletions
Loading

public/images/svg/LinkedIn.svg

Lines changed: 9 additions & 0 deletions
Loading

public/images/svg/YouTube.svg

Lines changed: 9 additions & 0 deletions
Loading

styles/Footer.module.scss

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,13 @@
1717
}
1818
}
1919

20+
&__navSocialsDiv {
21+
display: flex;
22+
flex-direction: column;
23+
}
24+
2025
&__nav {
26+
2127
@include tablet {
2228
min-width: 6.5rem;
2329
order: 2;
@@ -30,10 +36,18 @@
3036

3137
&__navList {
3238
padding: 0;
39+
40+
@include tablet {
41+
display: flex;
42+
}
3343
}
3444

3545
&__navItem {
3646
margin: 0.5rem 0;
47+
48+
@include tablet {
49+
padding-left: 50px;
50+
}
3751
}
3852

3953
&__logo {
@@ -52,10 +66,39 @@
5266
}
5367
}
5468

69+
&__socialList {
70+
display: flex;
71+
justify-content: center;
72+
margin: revert;
73+
padding: 0;
74+
75+
@include tablet {
76+
justify-content: end;
77+
}
78+
}
79+
80+
&__socialItem {
81+
cursor: pointer;
82+
@include transition(all 0.3s ease);
83+
84+
&:hover {
85+
opacity: 0.6;
86+
}
87+
88+
@include tablet {
89+
padding-left: 28px;
90+
max-width: 100%;
91+
}
92+
}
93+
5594
&__copyright {
5695
text-align: center;
5796
margin: 0;
5897
font-size: 1rem;
5998
padding-bottom: 2.5rem;
99+
100+
@include tablet {
101+
text-align: end;
102+
}
60103
}
61104
}

utils/links.js

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,23 @@ export const linksNav = [
1212
export const linksSocial = [
1313
{
1414
id: 1,
15-
text: 'Github',
15+
text: 'LinkedIn',
1616
href: '#',
17-
src: '/images/svg/iconmonstr-github.svg',
17+
src: '/images/svg/LinkedIn.svg',
18+
isVisible: false,
1819
},
1920
{
2021
id: 2,
21-
text: 'Twitter',
22-
href: '#',
23-
src: '/images/svg/iconmonstr-twitter.svg',
22+
text: 'YouTube',
23+
href: 'https://www.youtube.com/channel/UCCLwmU7r4IUWZOtH3bCEN6g',
24+
src: '/images/svg/YouTube.svg',
25+
isVisible: true,
26+
},
27+
{
28+
id: 3,
29+
text: 'GitHub',
30+
href: 'https://github.com/Web-Dev-Path',
31+
src: '/images/svg/GitHub.svg',
32+
isVisible: true,
2433
},
2534
];

0 commit comments

Comments
 (0)