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

Add Updated Footer #5

Merged
merged 1 commit into from
Dec 11, 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
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Release CI
on:
push:
branches:
- master
- quince/indigo
jobs:
release:
name: Release
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 11 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@edx/frontend-component-footer",
"version": "1.0.0-semantically-released",
"name": "@edly-io/indigo-frontend-component-footer",
"version": "1.0.0",
"description": "Footer component for use when building Open edX frontend applications",
"main": "dist/index.js",
"publishConfig": {
Expand All @@ -24,14 +24,14 @@
},
"repository": {
"type": "git",
"url": "git+https://github.com/openedx/frontend-component-footer.git"
"url": "git+https://github.com/edly-io/frontend-component-footer.git"
},
"author": "edX",
"license": "AGPL-3.0",
"bugs": {
"url": "https://github.com/openedx/frontend-component-footer/issues"
"url": "https://github.com/edly-io/frontend-component-footer/issues"
},
"homepage": "https://github.com/openedx/frontend-component-footer#readme",
"homepage": "https://github.com/edly-io/frontend-component-footer#readme",
"devDependencies": {
"@edx/brand": "npm:@edx/[email protected]",
"@edx/browserslist-config": "^1.1.1",
Expand Down Expand Up @@ -63,5 +63,11 @@
"prop-types": "^15.5.10",
"react": "^16.9.0 || ^17.0.0",
"react-dom": "^16.9.0 || ^17.0.0"
},
"release": {
"branches": [
"master",
"quince/indigo"
]
}
}
53 changes: 33 additions & 20 deletions src/components/Footer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import { injectIntl, intlShape } from '@edx/frontend-platform/i18n';
import { sendTrackEvent } from '@edx/frontend-platform/analytics';
import { ensureConfig } from '@edx/frontend-platform/config';
import { AppContext } from '@edx/frontend-platform/react';
import { Image } from '@edx/paragon';
import { getConfig } from '@edx/frontend-platform';

import messages from './Footer.messages';
import LanguageSelector from './LanguageSelector';
Expand Down Expand Up @@ -41,34 +43,45 @@ class SiteFooter extends React.Component {
intl,
} = this.props;
const showLanguageSelector = supportedLanguages.length > 0 && onLanguageSelected;
const { config } = this.context;
const config = getConfig();

return (
<footer
role="contentinfo"
className="footer d-flex border-top py-3 px-4"
>
<div className="container-fluid d-flex">
<a
className="d-block"
href={config.LMS_BASE_URL}
aria-label={intl.formatMessage(messages['footer.logo.ariaLabel'])}
>
<img
style={{ maxHeight: 45 }}
src={logo || config.LOGO_TRADEMARK_URL}
alt={intl.formatMessage(messages['footer.logo.altText'])}
/>
</a>
<div className="flex-grow-1" />
<div className="wrapper wrapper-footer">
<footer id="footer" className="tutor-container">
<div className="footer-top">
<div className="powered-area">
<ul className="logo-list">
<li>{intl.formatMessage(messages['footer.poweredby.text'])}</li>
<li>
<a href="https://docs.tutor.overhang.io" rel="noreferrer" target="_blank">
<Image
src={`${config.LMS_BASE_URL}/static/indigo/images/tutor-logo.png`}
alt={intl.formatMessage(messages['footer.tutorlogo.altText'])}
width="57"
/>
</a>
</li>
<li>
<a href="https://open.edx.org" rel="noreferrer" target="_blank">
<Image
src={logo || `${config.LMS_BASE_URL}/static/indigo/images/openedx-logo.png`}
alt={intl.formatMessage(messages['footer.logo.altText'])}
width="79"
/>
</a>
</li>
</ul>
</div>
</div>
<span className="copyright-site">{intl.formatMessage(messages['footer.copyright.text'])}</span>
{showLanguageSelector && (
<LanguageSelector
options={supportedLanguages}
onSubmit={onLanguageSelected}
/>
)}
</div>
</footer>
</footer>
</div>
);
}
}
Expand Down
15 changes: 15 additions & 0 deletions src/components/Footer.messages.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,16 +136,31 @@ const messages = defineMessages({
defaultMessage: 'Download the edX mobile app from Google Play',
description: 'The label for the link to download the google version of the edX app.',
},
'footer.poweredby.text': {
id: 'footer.poweredby.text',
defaultMessage: 'Powered by',
description: 'text for the footer',
},
'footer.logo.altText': {
id: 'footer.logo.altText',
defaultMessage: 'Powered by Open edX',
description: 'alt text for the footer logo.',
},
'footer.tutorlogo.altText': {
id: 'footer.tutorlogo.altText',
defaultMessage: 'Runs on Tutor',
description: 'alt text for the footer tutor logo',
},
'footer.logo.ariaLabel': {
id: 'footer.logo.ariaLabel',
defaultMessage: 'edX Home',
description: 'aria-label for the footer logo.',
},
'footer.copyright.text': {
id: 'footer.copyright.text',
defaultMessage: 'Copyrights ©2023. All Rights Reserved.',
description: 'copyright text for the footer',
},
'footer.ariaLabel': {
id: 'footer.ariaLabel',
defaultMessage: 'Page Footer',
Expand Down
Loading