Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

194 footer component update #195

Merged
merged 7 commits into from
Nov 15, 2023
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/assets/img/thank-you.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ Our icons were sourced from the following:
* [Twitter social badge icons created by Freepik - Flaticon](https://www.flaticon.com/free-icons/twitter-social-badge)
* [Vimeo icons created by Md Tanvirul Haque - Flaticon](https://www.flaticon.com/free-icons/vimeo)
* [Youtube icons created by Freepik - Flaticon](https://www.flaticon.com/free-icons/youtube)
* [Linkedin icons created by IconScout](https://iconscout.com/free-icon/linkedin-48)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's icon scout? the png I converted came from Mass media icons created by mohammed mahdi - Flaticon

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ooops i forgot to change this as well! the one from before was from icon scout.

15 changes: 15 additions & 0 deletions src/assets/svg/Linkedin.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import * as React from 'react'

const Linkedin = ({ height, fill }) => (
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suuuuuuuuuper nit picky, but can this file and variable name be changed to LinkedIn?

<svg
height={height}
width={height}
fill={fill}
viewBox="0 0 144 144"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you change all the quotes here to singles? surprised lint didn't catch it. or maybe it's not checking these files.

xmlns="http://www.w3.org/2000/svg"
>
<path d="M67.5 0h9c.4.1.7.2 1.1.2 10.8.8 21 3.8 30.3 9.4 19.1 11.4 30.9 28 35 50 .5 2.6.7 5.3 1.1 7.9v9c-.1.4-.2.7-.2 1.1-.9 12.3-4.8 23.7-11.7 34-11.5 17-27.3 27.5-47.6 31.3-2.7.5-5.4.8-8 1.1h-9c-.4-.1-.7-.2-1.1-.2-14.3-1.1-27.3-6.1-38.6-14.9-14.5-11.5-23.5-26.4-26.7-44.6-.5-2.6-.7-5.2-1.1-7.8v-9l.6-5.1c2.1-14.7 8-27.6 18-38.6C29.7 11.5 43.4 3.9 59.7 1.1 62.3.6 64.9.4 67.5 0zm41.8 107.6c0-.3.1-.5.1-.7 0-11.5.1-23.1-.1-34.6 0-2.1-.7-4.4-1.5-6.4-5.3-11.9-22.5-13.6-30.7-3.2-.3.4-.6.8-1 1.2-.1 0-.2-.1-.3-.1v-6.4H61v50.2h15.6V83.1c0-1.6 0-3.3.1-4.9.2-2.6 1.4-4.8 3.4-6.6 4.8-4.2 11.4-2.3 13 3.9.4 1.5.5 3.1.5 4.7v27.4h15.7zm-57.8 0V57.5H35.6v50.1h15.9zm-8-56.9c5 0 9-4 9.1-9 0-5-4-9-9-9.1-5 0-9 4-9 9s3.9 9 8.9 9.1z" />
</svg>
)

export default Linkedin
5 changes: 1 addition & 4 deletions src/components/Link/link.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
.link-group-links {
color: #000000;
display: block;
font-size: 16px;
margin-bottom: 5px;
text-decoration: none;
font-size: 13px;
}
4 changes: 3 additions & 1 deletion src/components/SocialIcon/SocialIcon.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import TikTok from '../../assets/svg/TikTok'
import Twitter from '../../assets/svg/Twitter'
import Vimeo from '../../assets/svg/Vimeo'
import YouTube from '../../assets/svg/YouTube'
import Linkedin from '../../assets/svg/Linkedin'
import './social-icon.css'

const iconsList = {
Expand All @@ -17,6 +18,7 @@ const iconsList = {
twitter: (height, color) => <Twitter height={height} fill={color} />,
vimeo: (height, color) => <Vimeo height={height} fill={color} />,
youtube: (height, color) => <YouTube height={height} fill={color} />,
linkedin: (height, color) => <Linkedin height={height} fill={color}/>,
}

const SocialIcon = ({ addClass, color, height, icon, url }) => (
Expand All @@ -29,7 +31,7 @@ SocialIcon.propTypes = {
addClass: PropTypes.string,
color: PropTypes.string,
height: PropTypes.number,
icon: PropTypes.oneOf(['facebook', 'instagram', 'rss', 'tiktok', 'twitter', 'vimeo', 'youtube']).isRequired,
icon: PropTypes.oneOf(['facebook', 'instagram', 'rss', 'tiktok', 'twitter', 'vimeo', 'youtube', 'linkedin']).isRequired,
url: PropTypes.string.isRequired,
}

Expand Down
6 changes: 4 additions & 2 deletions src/compounds/Footer/Footer.jsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
import React from 'react'
import PropTypes from 'prop-types'
import LinkGroup from '../LinkGroup/LinkGroup'
import Link from '../../components/Link/Link'
import SocialIcon from '../../components/SocialIcon/SocialIcon'

const Footer = ({ companyName, sections, socials, color, ...props }) => (
<footer id='footer' className={`container-fluid bg-primary py-4 text-${color}`}>
<footer id='footer' className={`container-fluid bg-primary py-3 text-${color}`}>
<div className='container'>
<div className='row'>
<div className='col-12 col-md-3 text-center text-md-start'>
<h5>© {companyName} {new Date().getFullYear()}</h5>
<h6>© {companyName} {new Date().getFullYear()}</h6>
<Link label='Legal Notices' href='/legal-notices' className={`text-${color} link-group-links text-decoration-none`}/>
</div>
<div
className='col-12 col-md-7 d-flex flex-column flex-sm-row
Expand Down
2 changes: 1 addition & 1 deletion src/compounds/LinkGroup/LinkGroup.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const LinkGroup = ({ header, headerStyle, links, linkStyle }) => (
key={name}
label={name}
target={target}
addClass='link-group-links'
addClass='link-group-links text-decoration-none mb-1 d-block'
style={linkStyle}
/>
)}
Expand Down
4 changes: 2 additions & 2 deletions src/compounds/LinkGroup/LinkGroup.stories.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Default.args = {
export const Alternate = Template.bind({})
Alternate.args = {
header: 'Header',
headerStyle: { fontSize: 20, color: '#EC88EE' },
headerStyle: { fontSize: 13, color: '#EC88EE' },
links,
linkStyle: { fontSize: 14, color: '#5E5CCF' },
linkStyle: { fontSize: 13, color: '#5E5CCF' },
}
4 changes: 4 additions & 0 deletions src/resources/args.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,10 @@ export const socials = [
icon: 'facebook',
url: 'www.facebook.com',
},
{
icon: 'linkedin',
url: 'www.linkedin.com',
},
]

export const shipTo = {
Expand Down