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

feat: Footer theme Design #4

Merged
merged 2 commits into from
Nov 22, 2023
Merged
Show file tree
Hide file tree
Changes from all 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
4 changes: 2 additions & 2 deletions src/_footer.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ $gray-footer: #fcfcfc !default;
background-color: $gray-footer;
}

.copyright{
.copyright {
font-size: 15px;
}
}
13 changes: 10 additions & 3 deletions src/components/Footer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import LanguageSelector from './LanguageSelector';
ensureConfig([
'LMS_BASE_URL',
'LOGO_TRADEMARK_URL',
'SITE_NAME',
], 'Footer component');

const EVENT_NAMES = {
Expand Down Expand Up @@ -46,7 +47,7 @@ class SiteFooter extends React.Component {
return (
<footer
role="contentinfo"
className="footer border-top py-3 px-4"
className="footer border-top py-3 px-3"
>
<div className="container-fluid d-flex align-items-center mb-3">
<a
Expand All @@ -55,13 +56,19 @@ class SiteFooter extends React.Component {
aria-label={intl.formatMessage(messages['footer.logo.ariaLabel'])}
>
<img
style={{ maxHeight: 45 }}
style={{ maxHeight: 63 }}
src={logo || config.LOGO_TRADEMARK_URL}
alt={intl.formatMessage(messages['footer.logo.altText'])}
/>
</a>
<div className="flex-grow-1" />
<div><p className="copyright m-0">{intl.formatMessage(messages['footer.copyright'])}</p></div>
<div>
<p className="copyright m-0">
{intl.formatMessage(messages['footer.copyright'])}
{` ${config.SITE_NAME} © `}
{intl.formatMessage(messages['footer.copyright.date'])}
</p>
</div>
</div>

<div className="container-fluid d-flex">
Expand Down
7 changes: 6 additions & 1 deletion src/components/Footer.messages.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,14 @@ const messages = defineMessages({
},
'footer.copyright': {
id: 'footer.copyright',
defaultMessage: 'Copyright © 2023. All rights reserved.',
defaultMessage: 'All rights reserved.',
description: 'copyright text for the footer component',
},
'footer.copyright.date': {
id: 'footer.copyright.date',
defaultMessage: '2023',
description: 'copyright date for the footer component',
},
});

export default messages;
66 changes: 57 additions & 9 deletions src/components/__snapshots__/Footer.test.jsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

exports[`<Footer /> renders correctly renders with a language selector 1`] = `
<footer
className="footer d-flex border-top py-3 px-4"
className="footer border-top py-3 px-3"
role="contentinfo"
>
<div
className="container-fluid d-flex"
className="container-fluid d-flex align-items-center mb-3"
>
<a
aria-label="edX Home"
Expand All @@ -18,11 +18,27 @@ exports[`<Footer /> renders correctly renders with a language selector 1`] = `
src="https://edx-cdn.org/v3/default/logo-trademark.svg"
style={
Object {
"maxHeight": 45,
"maxHeight": 63,
}
}
/>
</a>
<div
className="flex-grow-1"
/>
<div>
<p
className="copyright m-0"
>
All rights reserved.
undefined ©
2023
</p>
</div>
</div>
<div
className="container-fluid d-flex"
>
<div
className="flex-grow-1"
/>
Expand Down Expand Up @@ -70,11 +86,11 @@ exports[`<Footer /> renders correctly renders with a language selector 1`] = `

exports[`<Footer /> renders correctly renders without a language selector 1`] = `
<footer
className="footer d-flex border-top py-3 px-4"
className="footer border-top py-3 px-3"
role="contentinfo"
>
<div
className="container-fluid d-flex"
className="container-fluid d-flex align-items-center mb-3"
>
<a
aria-label="edX Home"
Expand All @@ -86,25 +102,41 @@ exports[`<Footer /> renders correctly renders without a language selector 1`] =
src="https://edx-cdn.org/v3/default/logo-trademark.svg"
style={
Object {
"maxHeight": 45,
"maxHeight": 63,
}
}
/>
</a>
<div
className="flex-grow-1"
/>
<div>
<p
className="copyright m-0"
>
All rights reserved.
undefined ©
2023
</p>
</div>
</div>
<div
className="container-fluid d-flex"
>
<div
className="flex-grow-1"
/>
</div>
</footer>
`;

exports[`<Footer /> renders correctly renders without a language selector in es 1`] = `
<footer
className="footer d-flex border-top py-3 px-4"
className="footer border-top py-3 px-3"
role="contentinfo"
>
<div
className="container-fluid d-flex"
className="container-fluid d-flex align-items-center mb-3"
>
<a
aria-label="edX Home"
Expand All @@ -116,14 +148,30 @@ exports[`<Footer /> renders correctly renders without a language selector in es
src="https://edx-cdn.org/v3/default/logo-trademark.svg"
style={
Object {
"maxHeight": 45,
"maxHeight": 63,
}
}
/>
</a>
<div
className="flex-grow-1"
/>
<div>
<p
className="copyright m-0"
>
All rights reserved.
undefined ©
2023
</p>
</div>
</div>
<div
className="container-fluid d-flex"
>
<div
className="flex-grow-1"
/>
</div>
</footer>
`;