Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6db2d70e97 | ||
|
|
3ab4adf10b | ||
|
|
a482325eac |
10968
package-lock.json
generated
10968
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -40,6 +40,7 @@
|
||||
"@commitlint/config-angular": "^6.0.2",
|
||||
"@commitlint/prompt": "^6.0.2",
|
||||
"@commitlint/prompt-cli": "^6.0.2",
|
||||
"@edx/edx-bootstrap": "^2.2.1",
|
||||
"@edx/frontend-i18n": "^1.0.4",
|
||||
"@edx/frontend-logging": "^2.0.2",
|
||||
"@edx/paragon": "^4.2.4",
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
"footer.site-footer.link.media-kit": "Media Kit",
|
||||
"footer.site-footer.link.donate": "Donate",
|
||||
"footer.site-footer.copyright-text": "{copyrightSymbol} {startDate}–{endDate} {siteName} Inc.",
|
||||
"footer.site-footer.trademark-text": "EdX, Open edX, and MicroMasters are registered trademarks of edX Inc. | {icpLicense}",
|
||||
"footer.site-footer.trademark-text": "EdX, Open edX, and MicroMasters are registered trademarks of edX Inc. | 深圳市恒宇博科技有限公司 {icpLicense}",
|
||||
"footer.site-footer.site-logo.alt-text": "{siteName} logo",
|
||||
"footer.site-footer.site-logo.aria-label": "{siteName} Home",
|
||||
"footer.site-footer.facebook.title": "Facebook",
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
"footer.site-footer.link.media-kit": "Media Kit",
|
||||
"footer.site-footer.link.donate": "Donate",
|
||||
"footer.site-footer.copyright-text": "{copyrightSymbol} {startDate}–{endDate} {siteName} Inc.",
|
||||
"footer.site-footer.trademark-text": "EdX, Open edX, and MicroMasters are registered trademarks of edX Inc. | {icpLicense}",
|
||||
"footer.site-footer.trademark-text": "EdX, Open edX, and MicroMasters are registered trademarks of edX Inc. | 深圳市恒宇博科技有限公司 {icpLicense}",
|
||||
"footer.site-footer.site-logo.alt-text": "{siteName} logo",
|
||||
"footer.site-footer.site-logo.aria-label": "{siteName} Home",
|
||||
"footer.site-footer.facebook.title": "Facebook",
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
"footer.site-footer.link.media-kit": "Media Kit",
|
||||
"footer.site-footer.link.donate": "Donate",
|
||||
"footer.site-footer.copyright-text": "{copyrightSymbol} {startDate}–{endDate} {siteName} Inc.",
|
||||
"footer.site-footer.trademark-text": "EdX, Open edX, and MicroMasters are registered trademarks of edX Inc. | {icpLicense}",
|
||||
"footer.site-footer.trademark-text": "EdX, Open edX, and MicroMasters are registered trademarks of edX Inc. | 深圳市恒宇博科技有限公司 {icpLicense}",
|
||||
"footer.site-footer.site-logo.alt-text": "{siteName} logo",
|
||||
"footer.site-footer.site-logo.aria-label": "{siteName} Home",
|
||||
"footer.site-footer.facebook.title": "Facebook",
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
"footer.site-footer.link.media-kit": "多媒体工具箱",
|
||||
"footer.site-footer.link.donate": "捐献",
|
||||
"footer.site-footer.copyright-text": "{copyrightSymbol} {startDate}–{endDate} {siteName} Inc.",
|
||||
"footer.site-footer.trademark-text": "EdX, Open edX, and MicroMasters are registered trademarks of edX Inc. | {icpLicense}",
|
||||
"footer.site-footer.trademark-text": "EdX, Open edX, and MicroMasters are registered trademarks of edX Inc. | 深圳市恒宇博科技有限公司 {icpLicense}",
|
||||
"footer.site-footer.site-logo.alt-text": "{siteName} logo",
|
||||
"footer.site-footer.site-logo.aria-label": "{siteName} 主页",
|
||||
"footer.site-footer.facebook.title": "脸书",
|
||||
|
||||
169
src/index.jsx
169
src/index.jsx
@@ -1,6 +1,5 @@
|
||||
import React from 'react';
|
||||
import { render } from 'react-dom';
|
||||
import { IntlProvider } from '@edx/frontend-i18n';
|
||||
|
||||
/* eslint-disable import/no-extraneous-dependencies */
|
||||
import {
|
||||
@@ -8,7 +7,6 @@ import {
|
||||
faTwitterSquare,
|
||||
faYoutubeSquare,
|
||||
faLinkedin,
|
||||
faGooglePlusSquare,
|
||||
faRedditSquare,
|
||||
} from '@fortawesome/free-brands-svg-icons';
|
||||
import { faLanguage } from '@fortawesome/free-solid-svg-icons';
|
||||
@@ -20,6 +18,80 @@ import './index.scss';
|
||||
import FooterLogo from './edx-footer.png';
|
||||
|
||||
|
||||
const edXLinks = [
|
||||
{
|
||||
title: 'About',
|
||||
url: 'https://www.example.com/about-us',
|
||||
},
|
||||
{
|
||||
title: 'edX for Business',
|
||||
url: 'https://business.edx.org',
|
||||
queryParams: { utm_test: 'utm_test_value' },
|
||||
},
|
||||
{
|
||||
title: 'Affiliates',
|
||||
url: 'https://www.example.com/affiliate-program',
|
||||
},
|
||||
{
|
||||
title: 'Open edX',
|
||||
url: 'https://www.example.com/open',
|
||||
},
|
||||
{
|
||||
title: 'Careers',
|
||||
url: 'https://www.example.com/careers',
|
||||
},
|
||||
{
|
||||
title: 'News',
|
||||
url: 'https://www.example.com/news-announcements',
|
||||
},
|
||||
];
|
||||
|
||||
const legalLinks = [
|
||||
{
|
||||
title: 'Terms of Service & Honor Code',
|
||||
url: 'https://www.example.com/terms-of-service',
|
||||
},
|
||||
{
|
||||
title: 'Privacy Policy',
|
||||
url: 'https://www.example.com/privacy-policy',
|
||||
},
|
||||
{
|
||||
title: 'Accessibility Policy',
|
||||
url: 'https://www.example.com/accessibility',
|
||||
},
|
||||
{
|
||||
title: 'Trademark Policy',
|
||||
url: 'https://www.example.com/trademarks',
|
||||
},
|
||||
{
|
||||
title: 'Sitemap',
|
||||
url: 'https://www.example.com/sitemap',
|
||||
},
|
||||
];
|
||||
|
||||
const connectLinks = [
|
||||
{
|
||||
title: 'Blog',
|
||||
url: 'https://www.example.com/blog',
|
||||
},
|
||||
{
|
||||
title: 'Contact Us',
|
||||
url: 'https://www.example.com/contact',
|
||||
},
|
||||
{
|
||||
title: 'Help Center',
|
||||
url: 'https://www.example.com/support',
|
||||
},
|
||||
{
|
||||
title: 'Media Kit',
|
||||
url: 'https://www.example.com/media-kit',
|
||||
},
|
||||
{
|
||||
title: 'Donate',
|
||||
url: 'https://www.example.com/donate',
|
||||
},
|
||||
];
|
||||
|
||||
const socialLinks = [
|
||||
{
|
||||
title: 'Facebook',
|
||||
@@ -45,12 +117,6 @@ const socialLinks = [
|
||||
icon: <FontAwesomeIcon icon={faLinkedin} className="social-icon" size="2x" />,
|
||||
screenReaderText: 'Follow edX on LinkedIn',
|
||||
},
|
||||
{
|
||||
title: 'Google+',
|
||||
url: 'https://plus.google.com',
|
||||
icon: <FontAwesomeIcon icon={faGooglePlusSquare} className="social-icon" size="2x" />,
|
||||
screenReaderText: 'Follow edX on Google+',
|
||||
},
|
||||
{
|
||||
title: 'Reddit',
|
||||
url: 'https://reddit.com',
|
||||
@@ -61,42 +127,57 @@ const socialLinks = [
|
||||
|
||||
|
||||
const App = () => (
|
||||
<IntlProvider locale="en">
|
||||
<SiteFooter
|
||||
siteName="edX"
|
||||
siteLogo={FooterLogo}
|
||||
marketingSiteBaseUrl="https://www.example.com"
|
||||
enterpriseMarketingLink={{
|
||||
url: 'https://business.edx.org',
|
||||
queryParams: { utm_test: 'utm_test_value' },
|
||||
}}
|
||||
supportUrl="https://www.example.com/support"
|
||||
contactUrl="https://www.example.com/contact"
|
||||
openSourceUrl="https://www.example.com/open"
|
||||
termsOfServiceUrl="https://www.example.com/terms-of-service"
|
||||
privacyPolicyUrl="https://www.example.com/privacy-policy"
|
||||
appleAppStoreUrl="https://store.apple.com"
|
||||
googlePlayUrl="https://play.google.com"
|
||||
handleAllTrackEvents={() => {}}
|
||||
socialLinks={socialLinks}
|
||||
supportedLanguages={[
|
||||
{
|
||||
label: 'English',
|
||||
value: 'en',
|
||||
}, {
|
||||
label: 'español',
|
||||
value: 'es-419',
|
||||
},
|
||||
]}
|
||||
languageForm={{
|
||||
activeLanguage: 'en',
|
||||
screenReaderLabel: 'Choose Language',
|
||||
submitLabel: 'Apply',
|
||||
icon: <FontAwesomeIcon icon={faLanguage} size="2x" className="text-primary" />,
|
||||
onLanguageSelected: () => {},
|
||||
}}
|
||||
/>
|
||||
</IntlProvider>
|
||||
<SiteFooter
|
||||
siteLogo={{
|
||||
src: FooterLogo,
|
||||
altText: 'edx Logo',
|
||||
ariaLabel: 'edX Home',
|
||||
}}
|
||||
ariaLabel="Page Footer"
|
||||
marketingSiteBaseUrl="https://www.example.com"
|
||||
appleAppStore={{
|
||||
url: 'https://store.apple.com',
|
||||
altText: 'Download the edX mobile app from the Apple App Store',
|
||||
}}
|
||||
googlePlay={{
|
||||
url: 'https://play.google.com',
|
||||
altText: 'Download the edX mobile app from Google Play',
|
||||
}}
|
||||
handleAllTrackEvents={() => {}}
|
||||
linkSectionOne={{
|
||||
title: 'edX',
|
||||
linkList: edXLinks,
|
||||
}}
|
||||
linkSectionTwo={{
|
||||
title: 'Legal',
|
||||
linkList: legalLinks,
|
||||
}}
|
||||
linkSectionThree={{
|
||||
title: 'Connect',
|
||||
linkList: connectLinks,
|
||||
}}
|
||||
socialLinks={socialLinks}
|
||||
supportedLanguages={[
|
||||
{
|
||||
label: 'English',
|
||||
value: 'en',
|
||||
}, {
|
||||
label: 'español',
|
||||
value: 'es-419',
|
||||
},
|
||||
]}
|
||||
languageForm={{
|
||||
activeLanguage: 'en',
|
||||
screenReaderLabel: 'Choose Language',
|
||||
submitLabel: 'Apply',
|
||||
icon: <FontAwesomeIcon icon={faLanguage} size="2x" className="text-primary" />,
|
||||
onLanguageSelected: () => {},
|
||||
}}
|
||||
copyright="© 2012–2019 edX Inc."
|
||||
trademark={(
|
||||
<React.Fragment>EdX, Open edX, and MicroMasters are registered trademarks of edX Inc. | 深圳市恒宇博科技有限公司 <a href="http://www.beian.miit.gov.cn">粤ICP备17044299号-2</a></React.Fragment>
|
||||
)}
|
||||
/>
|
||||
);
|
||||
|
||||
render(<App />, document.getElementById('root'));
|
||||
|
||||
@@ -1,91 +0,0 @@
|
||||
import { defineMessages } from '@edx/frontend-i18n';
|
||||
|
||||
const messages = defineMessages({
|
||||
'footer.site-footer.site-logo.alt-text': {
|
||||
id: 'footer.site-footer.site-logo.alt-text',
|
||||
defaultMessage: '{siteName} logo',
|
||||
description: 'The alt description of the site logo',
|
||||
},
|
||||
'footer.site-footer.site-logo.aria-label': {
|
||||
id: 'footer.site-footer.site-logo.aria-label',
|
||||
defaultMessage: '{siteName} Home',
|
||||
description: 'Aria label for the site logo which goes to the marketing site',
|
||||
},
|
||||
'footer.site-footer.facebook.title': {
|
||||
id: 'footer.site-footer.facebook.title',
|
||||
defaultMessage: 'Facebook',
|
||||
description: 'Facebook button title',
|
||||
},
|
||||
'footer.site-footer.facebook.screen-reader-text': {
|
||||
id: 'footer.site-footer.facebook.screen-reader-text',
|
||||
defaultMessage: 'Like {siteName} on Facebook',
|
||||
description: 'Facebook button screen reader text',
|
||||
},
|
||||
'footer.site-footer.twitter.title': {
|
||||
id: 'footer.site-footer.twitter.title',
|
||||
defaultMessage: 'Twitter',
|
||||
description: 'Twitter button title',
|
||||
},
|
||||
'footer.site-footer.twitter.screen-reader-text': {
|
||||
id: 'footer.site-footer.twitter.screen-reader-text',
|
||||
defaultMessage: 'Follow {siteName} on Twitter',
|
||||
description: 'Twitter button screen reader text',
|
||||
},
|
||||
'footer.site-footer.youtube.title': {
|
||||
id: 'footer.site-footer.youtube.title',
|
||||
defaultMessage: 'Youtube',
|
||||
description: 'Youtube button title',
|
||||
},
|
||||
'footer.site-footer.youtube.screen-reader-text': {
|
||||
id: 'footer.site-footer.youtube.screen-reader-text',
|
||||
defaultMessage: 'Subscribe to the {siteName} YouTube channel',
|
||||
description: 'Youtube button screen reader text',
|
||||
},
|
||||
'footer.site-footer.linkedin.title': {
|
||||
id: 'footer.site-footer.linkedin.title',
|
||||
defaultMessage: 'LinkedIn',
|
||||
description: 'LinkedIn button title',
|
||||
},
|
||||
'footer.site-footer.linkedin.screen-reader-text': {
|
||||
id: 'footer.site-footer.linkedin.screen-reader-text',
|
||||
defaultMessage: 'Follow {siteName} on LinkedIn',
|
||||
description: 'LinkedIn button screen reader text',
|
||||
},
|
||||
'footer.site-footer.google-plus.title': {
|
||||
id: 'footer.site-footer.google-plus.title',
|
||||
defaultMessage: 'Google+',
|
||||
description: 'Google+ button title',
|
||||
},
|
||||
'footer.site-footer.google-plus.screen-reader-text': {
|
||||
id: 'footer.site-footer.google-plus.screen-reader-text',
|
||||
defaultMessage: 'Follow {siteName} on Google+',
|
||||
description: 'Google+ button screen reader text',
|
||||
},
|
||||
'footer.site-footer.reddit.title': {
|
||||
id: 'footer.site-footer.reddit.title',
|
||||
defaultMessage: 'Reddit',
|
||||
description: 'Reddit button title',
|
||||
},
|
||||
'footer.site-footer.reddit.screen-reader-text': {
|
||||
id: 'footer.site-footer.reddit.screen-reader-text',
|
||||
defaultMessage: 'Subscribe to the {siteName} subreddit',
|
||||
description: 'Reddit button screen reader text',
|
||||
},
|
||||
'footer.site-footer.apple-app-store.alt-text': {
|
||||
id: 'footer.site-footer.apple-app-store.alt-text',
|
||||
defaultMessage: 'Download the {siteName} mobile app from the Apple App Store',
|
||||
description: 'Apple App Store button alt description',
|
||||
},
|
||||
'footer.site-footer.google-play.alt-text': {
|
||||
id: 'footer.site-footer.google-play.alt-text',
|
||||
defaultMessage: 'Download the {siteName} mobile app from Google Play',
|
||||
description: 'Google Play button alt description',
|
||||
},
|
||||
'footer.site-footer.footer.aria-label': {
|
||||
id: 'footer.site-footer.footer.aria-label',
|
||||
defaultMessage: 'Page Footer',
|
||||
description: 'Aria label for the footer',
|
||||
},
|
||||
});
|
||||
|
||||
export default messages;
|
||||
@@ -1,14 +1,12 @@
|
||||
import React from 'react';
|
||||
import renderer from 'react-test-renderer';
|
||||
import { mount } from 'enzyme';
|
||||
import { IntlProvider } from '@edx/frontend-i18n';
|
||||
|
||||
import {
|
||||
faFacebookSquare,
|
||||
faTwitterSquare,
|
||||
faYoutubeSquare,
|
||||
faLinkedin,
|
||||
faGooglePlusSquare,
|
||||
faRedditSquare,
|
||||
} from '@fortawesome/free-brands-svg-icons';
|
||||
import { faLanguage } from '@fortawesome/free-solid-svg-icons';
|
||||
@@ -18,6 +16,80 @@ import FooterLogo from '../../../edx-footer.png';
|
||||
import SiteFooter, { EVENT_NAMES } from './index';
|
||||
|
||||
|
||||
const edXLinks = [
|
||||
{
|
||||
title: 'About',
|
||||
url: 'https://www.example.com/about-us',
|
||||
},
|
||||
{
|
||||
title: 'edX for Business',
|
||||
url: 'https://business.edx.org',
|
||||
queryParams: { utm_test: 'utm_test_value' },
|
||||
},
|
||||
{
|
||||
title: 'Affiliates',
|
||||
url: 'https://www.example.com/affiliate-program',
|
||||
},
|
||||
{
|
||||
title: 'Open edX',
|
||||
url: 'https://www.example.com/open',
|
||||
},
|
||||
{
|
||||
title: 'Careers',
|
||||
url: 'https://www.example.com/careers',
|
||||
},
|
||||
{
|
||||
title: 'News',
|
||||
url: 'https://www.example.com/news-announcements',
|
||||
},
|
||||
];
|
||||
|
||||
const legalLinks = [
|
||||
{
|
||||
title: 'Terms of Service & Honor Code',
|
||||
url: 'https://www.example.com/terms-of-service',
|
||||
},
|
||||
{
|
||||
title: 'Privacy Policy',
|
||||
url: 'https://www.example.com/privacy-policy',
|
||||
},
|
||||
{
|
||||
title: 'Accessibility Policy',
|
||||
url: 'https://www.example.com/accessibility',
|
||||
},
|
||||
{
|
||||
title: 'Trademark Policy',
|
||||
url: 'https://www.example.com/trademarks',
|
||||
},
|
||||
{
|
||||
title: 'Sitemap',
|
||||
url: 'https://www.example.com/sitemap',
|
||||
},
|
||||
];
|
||||
|
||||
const connectLinks = [
|
||||
{
|
||||
title: 'Blog',
|
||||
url: 'https://www.example.com/blog',
|
||||
},
|
||||
{
|
||||
title: 'Contact Us',
|
||||
url: 'https://www.example.com/contact',
|
||||
},
|
||||
{
|
||||
title: 'Help Center',
|
||||
url: 'https://www.example.com/support',
|
||||
},
|
||||
{
|
||||
title: 'Media Kit',
|
||||
url: 'https://www.example.com/media-kit',
|
||||
},
|
||||
{
|
||||
title: 'Donate',
|
||||
url: 'https://www.example.com/donate',
|
||||
},
|
||||
];
|
||||
|
||||
const socialLinks = [
|
||||
{
|
||||
title: 'Facebook',
|
||||
@@ -43,12 +115,6 @@ const socialLinks = [
|
||||
icon: <FontAwesomeIcon icon={faLinkedin} className="social-icon" size="2x" />,
|
||||
screenReaderText: 'Follow edX on LinkedIn',
|
||||
},
|
||||
{
|
||||
title: 'Google+',
|
||||
url: 'https://plus.google.com',
|
||||
icon: <FontAwesomeIcon icon={faGooglePlusSquare} className="social-icon" size="2x" />,
|
||||
screenReaderText: 'Follow edX on Google+',
|
||||
},
|
||||
{
|
||||
title: 'Reddit',
|
||||
url: 'https://reddit.com',
|
||||
@@ -77,28 +143,43 @@ const languageForm = {
|
||||
|
||||
const completeSiteFooterComponent = mockHandleAllTrackEvents =>
|
||||
(
|
||||
<IntlProvider locale="en">
|
||||
<SiteFooter
|
||||
siteName="example"
|
||||
siteLogo={FooterLogo}
|
||||
marketingSiteBaseUrl="https://www.example.com"
|
||||
supportUrl="https://www.example.com/support"
|
||||
contactUrl="https://www.example.com/contact"
|
||||
openSourceUrl="https://www.example.com/open"
|
||||
termsOfServiceUrl="https://www.example.com/terms-of-service"
|
||||
privacyPolicyUrl="https://www.example.com/privacy-policy"
|
||||
socialLinks={socialLinks}
|
||||
appleAppStoreUrl="https://store.apple.com"
|
||||
googlePlayUrl="https://play.google.com"
|
||||
handleAllTrackEvents={mockHandleAllTrackEvents}
|
||||
supportedLanguages={supportedLanguages}
|
||||
languageForm={languageForm}
|
||||
enterpriseMarketingLink={{
|
||||
url: 'https://business.edx.org',
|
||||
queryParams: { utm_test: 'utm_test_value' },
|
||||
}}
|
||||
/>
|
||||
</IntlProvider>
|
||||
<SiteFooter
|
||||
siteLogo={{
|
||||
src: FooterLogo,
|
||||
altText: 'edx Logo',
|
||||
ariaLabel: 'edX Home',
|
||||
}}
|
||||
ariaLabel="Page Footer"
|
||||
marketingSiteBaseUrl="https://www.example.com"
|
||||
appleAppStore={{
|
||||
url: 'https://store.apple.com',
|
||||
altText: 'Download the edX mobile app from the Apple App Store',
|
||||
}}
|
||||
googlePlay={{
|
||||
url: 'https://play.google.com',
|
||||
altText: 'Download the edX mobile app from Google Play',
|
||||
}}
|
||||
handleAllTrackEvents={mockHandleAllTrackEvents}
|
||||
linkSectionOne={{
|
||||
title: 'edX',
|
||||
linkList: edXLinks,
|
||||
}}
|
||||
linkSectionTwo={{
|
||||
title: 'Legal',
|
||||
linkList: legalLinks,
|
||||
}}
|
||||
linkSectionThree={{
|
||||
title: 'Connect',
|
||||
linkList: connectLinks,
|
||||
}}
|
||||
socialLinks={socialLinks}
|
||||
supportedLanguages={supportedLanguages}
|
||||
languageForm={languageForm}
|
||||
copyright="© 2012–2019 edX Inc."
|
||||
trademark={(
|
||||
<React.Fragment>EdX, Open edX, and MicroMasters are registered trademarks of edX Inc. | 深圳市恒宇博科技有限公司 <a href="http://www.beian.miit.gov.cn">粤ICP备17044299号-2</a></React.Fragment>
|
||||
)}
|
||||
/>
|
||||
);
|
||||
|
||||
describe('<SiteFooter />', () => {
|
||||
@@ -114,27 +195,42 @@ describe('<SiteFooter />', () => {
|
||||
it('does not render social links', () => {
|
||||
const tree = renderer
|
||||
.create((
|
||||
<IntlProvider locale="en">
|
||||
<SiteFooter
|
||||
siteName="example"
|
||||
siteLogo={FooterLogo}
|
||||
marketingSiteBaseUrl="https://www.example.com"
|
||||
supportUrl="https://www.example.com/support"
|
||||
contactUrl="https://www.example.com/contact"
|
||||
openSourceUrl="https://www.example.com/open"
|
||||
termsOfServiceUrl="https://www.example.com/terms-of-service"
|
||||
privacyPolicyUrl="https://www.example.com/privacy-policy"
|
||||
appleAppStoreUrl="https://store.apple.com"
|
||||
googlePlayUrl="https://play.google.com"
|
||||
supportedLanguages={supportedLanguages}
|
||||
languageForm={languageForm}
|
||||
handleAllTrackEvents={jest.fn()}
|
||||
enterpriseMarketingLink={{
|
||||
url: 'https://business.edx.org',
|
||||
queryParams: { utm_test: 'utm_test_value' },
|
||||
}}
|
||||
/>
|
||||
</IntlProvider>
|
||||
<SiteFooter
|
||||
siteLogo={{
|
||||
src: FooterLogo,
|
||||
altText: 'edx Logo',
|
||||
ariaLabel: 'edX Home',
|
||||
}}
|
||||
ariaLabel="Page Footer"
|
||||
marketingSiteBaseUrl="https://www.example.com"
|
||||
appleAppStore={{
|
||||
url: 'https://store.apple.com',
|
||||
altText: 'Download the edX mobile app from the Apple App Store',
|
||||
}}
|
||||
googlePlay={{
|
||||
url: 'https://play.google.com',
|
||||
altText: 'Download the edX mobile app from Google Play',
|
||||
}}
|
||||
handleAllTrackEvents={jest.fn()}
|
||||
linkSectionOne={{
|
||||
title: 'edX',
|
||||
linkList: edXLinks,
|
||||
}}
|
||||
linkSectionTwo={{
|
||||
title: 'Legal',
|
||||
linkList: legalLinks,
|
||||
}}
|
||||
linkSectionThree={{
|
||||
title: 'Connect',
|
||||
linkList: connectLinks,
|
||||
}}
|
||||
supportedLanguages={supportedLanguages}
|
||||
languageForm={languageForm}
|
||||
copyright="© 2012–2019 edX Inc."
|
||||
trademark={(
|
||||
<React.Fragment>EdX, Open edX, and MicroMasters are registered trademarks of edX Inc. | 深圳市恒宇博科技有限公司 <a href="http://www.beian.miit.gov.cn">粤ICP备17044299号-2</a></React.Fragment>
|
||||
)}
|
||||
/>
|
||||
)).toJSON();
|
||||
expect(tree).toMatchSnapshot();
|
||||
});
|
||||
@@ -142,25 +238,44 @@ describe('<SiteFooter />', () => {
|
||||
it('does not render mobile links', () => {
|
||||
const tree = renderer
|
||||
.create((
|
||||
<IntlProvider locale="en">
|
||||
<SiteFooter
|
||||
siteName="example"
|
||||
siteLogo={FooterLogo}
|
||||
marketingSiteBaseUrl="https://www.example.com"
|
||||
supportUrl="https://www.example.com/support"
|
||||
contactUrl="https://www.example.com/contact"
|
||||
openSourceUrl="https://www.example.com/open"
|
||||
termsOfServiceUrl="https://www.example.com/terms-of-service"
|
||||
privacyPolicyUrl="https://www.example.com/privacy-policy"
|
||||
socialLinks={socialLinks}
|
||||
appleAppStoreUrl="https://store.apple.com"
|
||||
googlePlayUrl="https://play.google.com"
|
||||
supportedLanguages={supportedLanguages}
|
||||
languageForm={languageForm}
|
||||
handleAllTrackEvents={jest.fn()}
|
||||
showMobileLinks={false}
|
||||
/>
|
||||
</IntlProvider>
|
||||
<SiteFooter
|
||||
siteLogo={{
|
||||
src: FooterLogo,
|
||||
altText: 'edx Logo',
|
||||
ariaLabel: 'edX Home',
|
||||
}}
|
||||
ariaLabel="Page Footer"
|
||||
marketingSiteBaseUrl="https://www.example.com"
|
||||
appleAppStore={{
|
||||
url: 'https://store.apple.com',
|
||||
altText: 'Download the edX mobile app from the Apple App Store',
|
||||
}}
|
||||
googlePlay={{
|
||||
url: 'https://play.google.com',
|
||||
altText: 'Download the edX mobile app from Google Play',
|
||||
}}
|
||||
handleAllTrackEvents={jest.fn()}
|
||||
linkSectionOne={{
|
||||
title: 'edX',
|
||||
linkList: edXLinks,
|
||||
}}
|
||||
linkSectionTwo={{
|
||||
title: 'Legal',
|
||||
linkList: legalLinks,
|
||||
}}
|
||||
linkSectionThree={{
|
||||
title: 'Connect',
|
||||
linkList: connectLinks,
|
||||
}}
|
||||
socialLinks={socialLinks}
|
||||
supportedLanguages={supportedLanguages}
|
||||
languageForm={languageForm}
|
||||
copyright="© 2012–2019 edX Inc."
|
||||
trademark={(
|
||||
<React.Fragment>EdX, Open edX, and MicroMasters are registered trademarks of edX Inc. | 深圳市恒宇博科技有限公司 <a href="http://www.beian.miit.gov.cn">粤ICP备17044299号-2</a></React.Fragment>
|
||||
)}
|
||||
showMobileLinks={false}
|
||||
/>
|
||||
)).toJSON();
|
||||
expect(tree).toMatchSnapshot();
|
||||
});
|
||||
@@ -168,43 +283,42 @@ describe('<SiteFooter />', () => {
|
||||
it('does not render language selector', () => {
|
||||
const tree = renderer
|
||||
.create((
|
||||
<IntlProvider locale="en">
|
||||
<SiteFooter
|
||||
siteName="example"
|
||||
siteLogo={FooterLogo}
|
||||
marketingSiteBaseUrl="https://www.example.com"
|
||||
supportUrl="https://www.example.com/support"
|
||||
contactUrl="https://www.example.com/contact"
|
||||
openSourceUrl="https://www.example.com/open"
|
||||
termsOfServiceUrl="https://www.example.com/terms-of-service"
|
||||
privacyPolicyUrl="https://www.example.com/privacy-policy"
|
||||
appleAppStoreUrl="https://store.apple.com"
|
||||
googlePlayUrl="https://play.google.com"
|
||||
handleAllTrackEvents={jest.fn()}
|
||||
/>
|
||||
</IntlProvider>
|
||||
)).toJSON();
|
||||
expect(tree).toMatchSnapshot();
|
||||
});
|
||||
|
||||
it('does not render business links', () => {
|
||||
const tree = renderer
|
||||
.create((
|
||||
<IntlProvider locale="en">
|
||||
<SiteFooter
|
||||
siteName="example"
|
||||
siteLogo={FooterLogo}
|
||||
marketingSiteBaseUrl="https://www.example.com"
|
||||
supportUrl="https://www.example.com/support"
|
||||
contactUrl="https://www.example.com/contact"
|
||||
openSourceUrl="https://www.example.com/open"
|
||||
termsOfServiceUrl="https://www.example.com/terms-of-service"
|
||||
privacyPolicyUrl="https://www.example.com/privacy-policy"
|
||||
appleAppStoreUrl="https://store.apple.com"
|
||||
googlePlayUrl="https://play.google.com"
|
||||
handleAllTrackEvents={jest.fn()}
|
||||
/>
|
||||
</IntlProvider>
|
||||
<SiteFooter
|
||||
siteLogo={{
|
||||
src: FooterLogo,
|
||||
altText: 'edx Logo',
|
||||
ariaLabel: 'edX Home',
|
||||
}}
|
||||
ariaLabel="Page Footer"
|
||||
marketingSiteBaseUrl="https://www.example.com"
|
||||
appleAppStore={{
|
||||
url: 'https://store.apple.com',
|
||||
altText: 'Download the edX mobile app from the Apple App Store',
|
||||
}}
|
||||
googlePlay={{
|
||||
url: 'https://play.google.com',
|
||||
altText: 'Download the edX mobile app from Google Play',
|
||||
}}
|
||||
handleAllTrackEvents={jest.fn()}
|
||||
linkSectionOne={{
|
||||
title: 'edX',
|
||||
linkList: edXLinks,
|
||||
}}
|
||||
linkSectionTwo={{
|
||||
title: 'Legal',
|
||||
linkList: legalLinks,
|
||||
}}
|
||||
linkSectionThree={{
|
||||
title: 'Connect',
|
||||
linkList: connectLinks,
|
||||
}}
|
||||
socialLinks={socialLinks}
|
||||
supportedLanguages={supportedLanguages}
|
||||
copyright="© 2012–2019 edX Inc."
|
||||
trademark={(
|
||||
<React.Fragment>EdX, Open edX, and MicroMasters are registered trademarks of edX Inc. | 深圳市恒宇博科技有限公司 <a href="http://www.beian.miit.gov.cn">粤ICP备17044299号-2</a></React.Fragment>
|
||||
)}
|
||||
/>
|
||||
)).toJSON();
|
||||
expect(tree).toMatchSnapshot();
|
||||
});
|
||||
@@ -216,7 +330,8 @@ describe('<SiteFooter />', () => {
|
||||
const footer = mount((completeSiteFooterComponent(mockHandleAllTrackEvents)));
|
||||
const externalLinks = footer.find("a[target='_blank']");
|
||||
|
||||
expect(externalLinks).toHaveLength(8);
|
||||
expect(externalLinks.length).toEqual(socialLinks.length + 2);
|
||||
|
||||
externalLinks.forEach((externalLink) => {
|
||||
const callIndex = mockHandleAllTrackEvents.mock.calls.length;
|
||||
externalLink.simulate('click');
|
||||
|
||||
@@ -1,255 +1,5 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`<SiteFooter /> renders correctly does not render business links 1`] = `
|
||||
<footer
|
||||
aria-label="Page Footer"
|
||||
className="footer d-flex justify-content-center border-top py-3 px-4"
|
||||
role="contentinfo"
|
||||
>
|
||||
<div
|
||||
className="max-width-1180 d-grid"
|
||||
>
|
||||
<div
|
||||
className="area-1"
|
||||
>
|
||||
<a
|
||||
aria-label="example Home"
|
||||
href="https://www.example.com/"
|
||||
onClick={[Function]}
|
||||
target="_self"
|
||||
>
|
||||
<img
|
||||
alt="example logo"
|
||||
src="test-file-stub"
|
||||
/>
|
||||
</a>
|
||||
</div>
|
||||
<div
|
||||
className="area-2"
|
||||
>
|
||||
<h2>
|
||||
example
|
||||
</h2>
|
||||
<ul
|
||||
className="list-unstyled p-0 m-0"
|
||||
>
|
||||
<li>
|
||||
<a
|
||||
href="https://www.example.com/about-us"
|
||||
>
|
||||
<span>
|
||||
About
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
href="https://www.example.com/affiliate-program"
|
||||
>
|
||||
<span>
|
||||
Affiliates
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
href="https://www.example.com/open"
|
||||
>
|
||||
<span>
|
||||
Open example
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
href="https://www.example.com/careers"
|
||||
>
|
||||
<span>
|
||||
Careers
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
href="https://www.example.com/news-announcements"
|
||||
>
|
||||
<span>
|
||||
News
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div
|
||||
className="area-3"
|
||||
>
|
||||
<h2>
|
||||
<span>
|
||||
Legal
|
||||
</span>
|
||||
</h2>
|
||||
<ul
|
||||
className="list-unstyled p-0 m-0"
|
||||
>
|
||||
<li>
|
||||
<a
|
||||
href="https://www.example.com/terms-of-service"
|
||||
>
|
||||
<span>
|
||||
Terms of Service & Honor Code
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
href="https://www.example.com/privacy-policy"
|
||||
>
|
||||
<span>
|
||||
Privacy Policy
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
href="https://www.example.com/accessibility"
|
||||
>
|
||||
<span>
|
||||
Accessibility Policy
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
href="https://www.example.com/trademarks"
|
||||
>
|
||||
<span>
|
||||
Trademark Policy
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
href="https://www.example.com/sitemap"
|
||||
>
|
||||
<span>
|
||||
Sitemap
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div
|
||||
className="area-4"
|
||||
>
|
||||
<h2>
|
||||
<span>
|
||||
Connect
|
||||
</span>
|
||||
</h2>
|
||||
<ul
|
||||
className="list-unstyled p-0 m-0"
|
||||
>
|
||||
<li>
|
||||
<a
|
||||
href="https://www.example.com/blog"
|
||||
>
|
||||
<span>
|
||||
Blog
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
href="https://www.example.com/contact"
|
||||
>
|
||||
<span>
|
||||
Contact Us
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
href="https://www.example.com/support"
|
||||
>
|
||||
<span>
|
||||
Help Center
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
href="https://www.example.com/media-kit"
|
||||
>
|
||||
<span>
|
||||
Media Kit
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
href="https://www.example.com/donate"
|
||||
>
|
||||
<span>
|
||||
Donate
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div
|
||||
className="area-5"
|
||||
>
|
||||
<ul
|
||||
className="d-flex flex-row justify-content-between list-unstyled max-width-264 p-0 mb-5"
|
||||
>
|
||||
<li>
|
||||
<a
|
||||
href="https://store.apple.com"
|
||||
onClick={[Function]}
|
||||
rel="noopener noreferrer"
|
||||
target="_blank"
|
||||
>
|
||||
<img
|
||||
alt="Download the example mobile app from the Apple App Store"
|
||||
className="max-height-39"
|
||||
src="https://prod-edxapp.edx-cdn.org/static/images/app/app_store_badge_135x40.d0558d910630.svg"
|
||||
/>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
href="https://play.google.com"
|
||||
onClick={[Function]}
|
||||
rel="noopener noreferrer"
|
||||
target="_blank"
|
||||
>
|
||||
<img
|
||||
alt="Download the example mobile app from Google Play"
|
||||
className="max-height-39"
|
||||
src="https://prod-edxapp.edx-cdn.org/static/images/app/google_play_badge_45.6ea466e328da.png"
|
||||
/>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
<span>
|
||||
© 2012–2019 example Inc.
|
||||
</span>
|
||||
<br />
|
||||
<span>
|
||||
EdX, Open edX, and MicroMasters are registered trademarks of edX Inc. | 深圳市恒宇博科技有限公司
|
||||
<a
|
||||
href="http://www.beian.miit.gov.cn"
|
||||
>
|
||||
粤ICP备17044299号-2
|
||||
</a>
|
||||
</span>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
`;
|
||||
|
||||
exports[`<SiteFooter /> renders correctly does not render language selector 1`] = `
|
||||
<footer
|
||||
aria-label="Page Footer"
|
||||
@@ -263,13 +13,13 @@ exports[`<SiteFooter /> renders correctly does not render language selector 1`]
|
||||
className="area-1"
|
||||
>
|
||||
<a
|
||||
aria-label="example Home"
|
||||
href="https://www.example.com/"
|
||||
aria-label="edX Home"
|
||||
href="https://www.example.com"
|
||||
onClick={[Function]}
|
||||
target="_self"
|
||||
>
|
||||
<img
|
||||
alt="example logo"
|
||||
alt="edx Logo"
|
||||
src="test-file-stub"
|
||||
/>
|
||||
</a>
|
||||
@@ -278,7 +28,7 @@ exports[`<SiteFooter /> renders correctly does not render language selector 1`]
|
||||
className="area-2"
|
||||
>
|
||||
<h2>
|
||||
example
|
||||
edX
|
||||
</h2>
|
||||
<ul
|
||||
className="list-unstyled p-0 m-0"
|
||||
@@ -287,45 +37,42 @@ exports[`<SiteFooter /> renders correctly does not render language selector 1`]
|
||||
<a
|
||||
href="https://www.example.com/about-us"
|
||||
>
|
||||
<span>
|
||||
About
|
||||
</span>
|
||||
About
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
href="https://business.edx.org/?utm_test=utm_test_value"
|
||||
>
|
||||
edX for Business
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
href="https://www.example.com/affiliate-program"
|
||||
>
|
||||
<span>
|
||||
Affiliates
|
||||
</span>
|
||||
Affiliates
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
href="https://www.example.com/open"
|
||||
>
|
||||
<span>
|
||||
Open example
|
||||
</span>
|
||||
Open edX
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
href="https://www.example.com/careers"
|
||||
>
|
||||
<span>
|
||||
Careers
|
||||
</span>
|
||||
Careers
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
href="https://www.example.com/news-announcements"
|
||||
>
|
||||
<span>
|
||||
News
|
||||
</span>
|
||||
News
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -334,9 +81,7 @@ exports[`<SiteFooter /> renders correctly does not render language selector 1`]
|
||||
className="area-3"
|
||||
>
|
||||
<h2>
|
||||
<span>
|
||||
Legal
|
||||
</span>
|
||||
Legal
|
||||
</h2>
|
||||
<ul
|
||||
className="list-unstyled p-0 m-0"
|
||||
@@ -345,45 +90,35 @@ exports[`<SiteFooter /> renders correctly does not render language selector 1`]
|
||||
<a
|
||||
href="https://www.example.com/terms-of-service"
|
||||
>
|
||||
<span>
|
||||
Terms of Service & Honor Code
|
||||
</span>
|
||||
Terms of Service & Honor Code
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
href="https://www.example.com/privacy-policy"
|
||||
>
|
||||
<span>
|
||||
Privacy Policy
|
||||
</span>
|
||||
Privacy Policy
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
href="https://www.example.com/accessibility"
|
||||
>
|
||||
<span>
|
||||
Accessibility Policy
|
||||
</span>
|
||||
Accessibility Policy
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
href="https://www.example.com/trademarks"
|
||||
>
|
||||
<span>
|
||||
Trademark Policy
|
||||
</span>
|
||||
Trademark Policy
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
href="https://www.example.com/sitemap"
|
||||
>
|
||||
<span>
|
||||
Sitemap
|
||||
</span>
|
||||
Sitemap
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -392,9 +127,7 @@ exports[`<SiteFooter /> renders correctly does not render language selector 1`]
|
||||
className="area-4"
|
||||
>
|
||||
<h2>
|
||||
<span>
|
||||
Connect
|
||||
</span>
|
||||
Connect
|
||||
</h2>
|
||||
<ul
|
||||
className="list-unstyled p-0 m-0"
|
||||
@@ -403,45 +136,35 @@ exports[`<SiteFooter /> renders correctly does not render language selector 1`]
|
||||
<a
|
||||
href="https://www.example.com/blog"
|
||||
>
|
||||
<span>
|
||||
Blog
|
||||
</span>
|
||||
Blog
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
href="https://www.example.com/contact"
|
||||
>
|
||||
<span>
|
||||
Contact Us
|
||||
</span>
|
||||
Contact Us
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
href="https://www.example.com/support"
|
||||
>
|
||||
<span>
|
||||
Help Center
|
||||
</span>
|
||||
Help Center
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
href="https://www.example.com/media-kit"
|
||||
>
|
||||
<span>
|
||||
Media Kit
|
||||
</span>
|
||||
Media Kit
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
href="https://www.example.com/donate"
|
||||
>
|
||||
<span>
|
||||
Donate
|
||||
</span>
|
||||
Donate
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -449,6 +172,170 @@ exports[`<SiteFooter /> renders correctly does not render language selector 1`]
|
||||
<div
|
||||
className="area-5"
|
||||
>
|
||||
<ul
|
||||
className="d-flex flex-row justify-content-between list-unstyled max-width-222 p-0 mb-4"
|
||||
>
|
||||
<li>
|
||||
<a
|
||||
href="https://www.facebook.com"
|
||||
onClick={[Function]}
|
||||
rel="noopener noreferrer"
|
||||
target="_blank"
|
||||
title="Facebook"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
className="svg-inline--fa fa-facebook-square fa-w-14 fa-2x social-icon"
|
||||
data-icon="facebook-square"
|
||||
data-prefix="fab"
|
||||
focusable="false"
|
||||
role="img"
|
||||
style={Object {}}
|
||||
viewBox="0 0 448 512"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<path
|
||||
d="M448 80v352c0 26.5-21.5 48-48 48h-85.3V302.8h60.6l8.7-67.6h-69.3V192c0-19.6 5.4-32.9 33.5-32.9H384V98.7c-6.2-.8-27.4-2.7-52.2-2.7-51.6 0-87 31.5-87 89.4v49.9H184v67.6h60.9V480H48c-26.5 0-48-21.5-48-48V80c0-26.5 21.5-48 48-48h352c26.5 0 48 21.5 48 48z"
|
||||
fill="currentColor"
|
||||
style={Object {}}
|
||||
/>
|
||||
</svg>
|
||||
<span
|
||||
className="sr-only"
|
||||
>
|
||||
Like edX on Facebook
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
href="https://www.twitter.com"
|
||||
onClick={[Function]}
|
||||
rel="noopener noreferrer"
|
||||
target="_blank"
|
||||
title="Twitter"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
className="svg-inline--fa fa-twitter-square fa-w-14 fa-2x social-icon"
|
||||
data-icon="twitter-square"
|
||||
data-prefix="fab"
|
||||
focusable="false"
|
||||
role="img"
|
||||
style={Object {}}
|
||||
viewBox="0 0 448 512"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<path
|
||||
d="M400 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48zm-48.9 158.8c.2 2.8.2 5.7.2 8.5 0 86.7-66 186.6-186.6 186.6-37.2 0-71.7-10.8-100.7-29.4 5.3.6 10.4.8 15.8.8 30.7 0 58.9-10.4 81.4-28-28.8-.6-53-19.5-61.3-45.5 10.1 1.5 19.2 1.5 29.6-1.2-30-6.1-52.5-32.5-52.5-64.4v-.8c8.7 4.9 18.9 7.9 29.6 8.3a65.447 65.447 0 0 1-29.2-54.6c0-12.2 3.2-23.4 8.9-33.1 32.3 39.8 80.8 65.8 135.2 68.6-9.3-44.5 24-80.6 64-80.6 18.9 0 35.9 7.9 47.9 20.7 14.8-2.8 29-8.3 41.6-15.8-4.9 15.2-15.2 28-28.8 36.1 13.2-1.4 26-5.1 37.8-10.2-8.9 13.1-20.1 24.7-32.9 34z"
|
||||
fill="currentColor"
|
||||
style={Object {}}
|
||||
/>
|
||||
</svg>
|
||||
<span
|
||||
className="sr-only"
|
||||
>
|
||||
Follow edX on Twitter
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
href="https://www.youtube.com"
|
||||
onClick={[Function]}
|
||||
rel="noopener noreferrer"
|
||||
target="_blank"
|
||||
title="Youtube"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
className="svg-inline--fa fa-youtube-square fa-w-14 fa-2x social-icon"
|
||||
data-icon="youtube-square"
|
||||
data-prefix="fab"
|
||||
focusable="false"
|
||||
role="img"
|
||||
style={Object {}}
|
||||
viewBox="0 0 448 512"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<path
|
||||
d="M186.8 202.1l95.2 54.1-95.2 54.1V202.1zM448 80v352c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V80c0-26.5 21.5-48 48-48h352c26.5 0 48 21.5 48 48zm-42 176.3s0-59.6-7.6-88.2c-4.2-15.8-16.5-28.2-32.2-32.4C337.9 128 224 128 224 128s-113.9 0-142.2 7.7c-15.7 4.2-28 16.6-32.2 32.4-7.6 28.5-7.6 88.2-7.6 88.2s0 59.6 7.6 88.2c4.2 15.8 16.5 27.7 32.2 31.9C110.1 384 224 384 224 384s113.9 0 142.2-7.7c15.7-4.2 28-16.1 32.2-31.9 7.6-28.5 7.6-88.1 7.6-88.1z"
|
||||
fill="currentColor"
|
||||
style={Object {}}
|
||||
/>
|
||||
</svg>
|
||||
<span
|
||||
className="sr-only"
|
||||
>
|
||||
Subscribe to the edX YouTube channel
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
href="https://www.linkedin.com"
|
||||
onClick={[Function]}
|
||||
rel="noopener noreferrer"
|
||||
target="_blank"
|
||||
title="LinkedIn"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
className="svg-inline--fa fa-linkedin fa-w-14 fa-2x social-icon"
|
||||
data-icon="linkedin"
|
||||
data-prefix="fab"
|
||||
focusable="false"
|
||||
role="img"
|
||||
style={Object {}}
|
||||
viewBox="0 0 448 512"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<path
|
||||
d="M416 32H31.9C14.3 32 0 46.5 0 64.3v383.4C0 465.5 14.3 480 31.9 480H416c17.6 0 32-14.5 32-32.3V64.3c0-17.8-14.4-32.3-32-32.3zM135.4 416H69V202.2h66.5V416zm-33.2-243c-21.3 0-38.5-17.3-38.5-38.5S80.9 96 102.2 96c21.2 0 38.5 17.3 38.5 38.5 0 21.3-17.2 38.5-38.5 38.5zm282.1 243h-66.4V312c0-24.8-.5-56.7-34.5-56.7-34.6 0-39.9 27-39.9 54.9V416h-66.4V202.2h63.7v29.2h.9c8.9-16.8 30.6-34.5 62.9-34.5 67.2 0 79.7 44.3 79.7 101.9V416z"
|
||||
fill="currentColor"
|
||||
style={Object {}}
|
||||
/>
|
||||
</svg>
|
||||
<span
|
||||
className="sr-only"
|
||||
>
|
||||
Follow edX on LinkedIn
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
href="https://reddit.com"
|
||||
onClick={[Function]}
|
||||
rel="noopener noreferrer"
|
||||
target="_blank"
|
||||
title="Reddit"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
className="svg-inline--fa fa-reddit-square fa-w-14 fa-2x social-icon"
|
||||
data-icon="reddit-square"
|
||||
data-prefix="fab"
|
||||
focusable="false"
|
||||
role="img"
|
||||
style={Object {}}
|
||||
viewBox="0 0 448 512"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<path
|
||||
d="M283.2 345.5c2.7 2.7 2.7 6.8 0 9.2-24.5 24.5-93.8 24.6-118.4 0-2.7-2.4-2.7-6.5 0-9.2 2.4-2.4 6.5-2.4 8.9 0 18.7 19.2 81 19.6 100.5 0 2.4-2.3 6.6-2.3 9 0zm-91.3-53.8c0-14.9-11.9-26.8-26.5-26.8-14.9 0-26.8 11.9-26.8 26.8 0 14.6 11.9 26.5 26.8 26.5 14.6 0 26.5-11.9 26.5-26.5zm90.7-26.8c-14.6 0-26.5 11.9-26.5 26.8 0 14.6 11.9 26.5 26.5 26.5 14.9 0 26.8-11.9 26.8-26.5 0-14.9-11.9-26.8-26.8-26.8zM448 80v352c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V80c0-26.5 21.5-48 48-48h352c26.5 0 48 21.5 48 48zm-99.7 140.6c-10.1 0-19 4.2-25.6 10.7-24.1-16.7-56.5-27.4-92.5-28.6l18.7-84.2 59.5 13.4c0 14.6 11.9 26.5 26.5 26.5 14.9 0 26.8-12.2 26.8-26.8 0-14.6-11.9-26.8-26.8-26.8-10.4 0-19.3 6.2-23.8 14.9l-65.7-14.6c-3.3-.9-6.5 1.5-7.4 4.8l-20.5 92.8c-35.7 1.5-67.8 12.2-91.9 28.9-6.5-6.8-15.8-11-25.9-11-37.5 0-49.8 50.4-15.5 67.5-1.2 5.4-1.8 11-1.8 16.7 0 56.5 63.7 102.3 141.9 102.3 78.5 0 142.2-45.8 142.2-102.3 0-5.7-.6-11.6-2.1-17 33.6-17.2 21.2-67.2-16.1-67.2z"
|
||||
fill="currentColor"
|
||||
style={Object {}}
|
||||
/>
|
||||
</svg>
|
||||
<span
|
||||
className="sr-only"
|
||||
>
|
||||
Subscribe to the edX subreddit
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<ul
|
||||
className="d-flex flex-row justify-content-between list-unstyled max-width-264 p-0 mb-5"
|
||||
>
|
||||
@@ -460,7 +347,7 @@ exports[`<SiteFooter /> renders correctly does not render language selector 1`]
|
||||
target="_blank"
|
||||
>
|
||||
<img
|
||||
alt="Download the example mobile app from the Apple App Store"
|
||||
alt="Download the edX mobile app from the Apple App Store"
|
||||
className="max-height-39"
|
||||
src="https://prod-edxapp.edx-cdn.org/static/images/app/app_store_badge_135x40.d0558d910630.svg"
|
||||
/>
|
||||
@@ -474,7 +361,7 @@ exports[`<SiteFooter /> renders correctly does not render language selector 1`]
|
||||
target="_blank"
|
||||
>
|
||||
<img
|
||||
alt="Download the example mobile app from Google Play"
|
||||
alt="Download the edX mobile app from Google Play"
|
||||
className="max-height-39"
|
||||
src="https://prod-edxapp.edx-cdn.org/static/images/app/google_play_badge_45.6ea466e328da.png"
|
||||
/>
|
||||
@@ -482,18 +369,14 @@ exports[`<SiteFooter /> renders correctly does not render language selector 1`]
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
<span>
|
||||
© 2012–2019 example Inc.
|
||||
</span>
|
||||
© 2012–2019 edX Inc.
|
||||
<br />
|
||||
<span>
|
||||
EdX, Open edX, and MicroMasters are registered trademarks of edX Inc. | 深圳市恒宇博科技有限公司
|
||||
<a
|
||||
href="http://www.beian.miit.gov.cn"
|
||||
>
|
||||
粤ICP备17044299号-2
|
||||
</a>
|
||||
</span>
|
||||
EdX, Open edX, and MicroMasters are registered trademarks of edX Inc. | 深圳市恒宇博科技有限公司
|
||||
<a
|
||||
href="http://www.beian.miit.gov.cn"
|
||||
>
|
||||
粤ICP备17044299号-2
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -513,13 +396,13 @@ exports[`<SiteFooter /> renders correctly does not render mobile links 1`] = `
|
||||
className="area-1"
|
||||
>
|
||||
<a
|
||||
aria-label="example Home"
|
||||
href="https://www.example.com/"
|
||||
aria-label="edX Home"
|
||||
href="https://www.example.com"
|
||||
onClick={[Function]}
|
||||
target="_self"
|
||||
>
|
||||
<img
|
||||
alt="example logo"
|
||||
alt="edx Logo"
|
||||
src="test-file-stub"
|
||||
/>
|
||||
</a>
|
||||
@@ -586,7 +469,7 @@ exports[`<SiteFooter /> renders correctly does not render mobile links 1`] = `
|
||||
className="area-2"
|
||||
>
|
||||
<h2>
|
||||
example
|
||||
edX
|
||||
</h2>
|
||||
<ul
|
||||
className="list-unstyled p-0 m-0"
|
||||
@@ -595,45 +478,42 @@ exports[`<SiteFooter /> renders correctly does not render mobile links 1`] = `
|
||||
<a
|
||||
href="https://www.example.com/about-us"
|
||||
>
|
||||
<span>
|
||||
About
|
||||
</span>
|
||||
About
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
href="https://business.edx.org/?utm_test=utm_test_value"
|
||||
>
|
||||
edX for Business
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
href="https://www.example.com/affiliate-program"
|
||||
>
|
||||
<span>
|
||||
Affiliates
|
||||
</span>
|
||||
Affiliates
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
href="https://www.example.com/open"
|
||||
>
|
||||
<span>
|
||||
Open example
|
||||
</span>
|
||||
Open edX
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
href="https://www.example.com/careers"
|
||||
>
|
||||
<span>
|
||||
Careers
|
||||
</span>
|
||||
Careers
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
href="https://www.example.com/news-announcements"
|
||||
>
|
||||
<span>
|
||||
News
|
||||
</span>
|
||||
News
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -642,9 +522,7 @@ exports[`<SiteFooter /> renders correctly does not render mobile links 1`] = `
|
||||
className="area-3"
|
||||
>
|
||||
<h2>
|
||||
<span>
|
||||
Legal
|
||||
</span>
|
||||
Legal
|
||||
</h2>
|
||||
<ul
|
||||
className="list-unstyled p-0 m-0"
|
||||
@@ -653,45 +531,35 @@ exports[`<SiteFooter /> renders correctly does not render mobile links 1`] = `
|
||||
<a
|
||||
href="https://www.example.com/terms-of-service"
|
||||
>
|
||||
<span>
|
||||
Terms of Service & Honor Code
|
||||
</span>
|
||||
Terms of Service & Honor Code
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
href="https://www.example.com/privacy-policy"
|
||||
>
|
||||
<span>
|
||||
Privacy Policy
|
||||
</span>
|
||||
Privacy Policy
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
href="https://www.example.com/accessibility"
|
||||
>
|
||||
<span>
|
||||
Accessibility Policy
|
||||
</span>
|
||||
Accessibility Policy
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
href="https://www.example.com/trademarks"
|
||||
>
|
||||
<span>
|
||||
Trademark Policy
|
||||
</span>
|
||||
Trademark Policy
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
href="https://www.example.com/sitemap"
|
||||
>
|
||||
<span>
|
||||
Sitemap
|
||||
</span>
|
||||
Sitemap
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -700,9 +568,7 @@ exports[`<SiteFooter /> renders correctly does not render mobile links 1`] = `
|
||||
className="area-4"
|
||||
>
|
||||
<h2>
|
||||
<span>
|
||||
Connect
|
||||
</span>
|
||||
Connect
|
||||
</h2>
|
||||
<ul
|
||||
className="list-unstyled p-0 m-0"
|
||||
@@ -711,45 +577,35 @@ exports[`<SiteFooter /> renders correctly does not render mobile links 1`] = `
|
||||
<a
|
||||
href="https://www.example.com/blog"
|
||||
>
|
||||
<span>
|
||||
Blog
|
||||
</span>
|
||||
Blog
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
href="https://www.example.com/contact"
|
||||
>
|
||||
<span>
|
||||
Contact Us
|
||||
</span>
|
||||
Contact Us
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
href="https://www.example.com/support"
|
||||
>
|
||||
<span>
|
||||
Help Center
|
||||
</span>
|
||||
Help Center
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
href="https://www.example.com/media-kit"
|
||||
>
|
||||
<span>
|
||||
Media Kit
|
||||
</span>
|
||||
Media Kit
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
href="https://www.example.com/donate"
|
||||
>
|
||||
<span>
|
||||
Donate
|
||||
</span>
|
||||
Donate
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -888,38 +744,6 @@ exports[`<SiteFooter /> renders correctly does not render mobile links 1`] = `
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
href="https://plus.google.com"
|
||||
onClick={[Function]}
|
||||
rel="noopener noreferrer"
|
||||
target="_blank"
|
||||
title="Google+"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
className="svg-inline--fa fa-google-plus-square fa-w-14 fa-2x social-icon"
|
||||
data-icon="google-plus-square"
|
||||
data-prefix="fab"
|
||||
focusable="false"
|
||||
role="img"
|
||||
style={Object {}}
|
||||
viewBox="0 0 448 512"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<path
|
||||
d="M400 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48zM164 356c-55.3 0-100-44.7-100-100s44.7-100 100-100c27 0 49.5 9.8 67 26.2l-27.1 26.1c-7.4-7.1-20.3-15.4-39.8-15.4-34.1 0-61.9 28.2-61.9 63.2 0 34.9 27.8 63.2 61.9 63.2 39.6 0 54.4-28.5 56.8-43.1H164v-34.4h94.4c1 5 1.6 10.1 1.6 16.6 0 57.1-38.3 97.6-96 97.6zm220-81.8h-29v29h-29.2v-29h-29V245h29v-29H355v29h29v29.2z"
|
||||
fill="currentColor"
|
||||
style={Object {}}
|
||||
/>
|
||||
</svg>
|
||||
<span
|
||||
className="sr-only"
|
||||
>
|
||||
Follow edX on Google+
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
href="https://reddit.com"
|
||||
@@ -954,18 +778,14 @@ exports[`<SiteFooter /> renders correctly does not render mobile links 1`] = `
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
<span>
|
||||
© 2012–2019 example Inc.
|
||||
</span>
|
||||
© 2012–2019 edX Inc.
|
||||
<br />
|
||||
<span>
|
||||
EdX, Open edX, and MicroMasters are registered trademarks of edX Inc. | 深圳市恒宇博科技有限公司
|
||||
<a
|
||||
href="http://www.beian.miit.gov.cn"
|
||||
>
|
||||
粤ICP备17044299号-2
|
||||
</a>
|
||||
</span>
|
||||
EdX, Open edX, and MicroMasters are registered trademarks of edX Inc. | 深圳市恒宇博科技有限公司
|
||||
<a
|
||||
href="http://www.beian.miit.gov.cn"
|
||||
>
|
||||
粤ICP备17044299号-2
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -985,13 +805,13 @@ exports[`<SiteFooter /> renders correctly does not render social links 1`] = `
|
||||
className="area-1"
|
||||
>
|
||||
<a
|
||||
aria-label="example Home"
|
||||
href="https://www.example.com/"
|
||||
aria-label="edX Home"
|
||||
href="https://www.example.com"
|
||||
onClick={[Function]}
|
||||
target="_self"
|
||||
>
|
||||
<img
|
||||
alt="example logo"
|
||||
alt="edx Logo"
|
||||
src="test-file-stub"
|
||||
/>
|
||||
</a>
|
||||
@@ -1058,7 +878,7 @@ exports[`<SiteFooter /> renders correctly does not render social links 1`] = `
|
||||
className="area-2"
|
||||
>
|
||||
<h2>
|
||||
example
|
||||
edX
|
||||
</h2>
|
||||
<ul
|
||||
className="list-unstyled p-0 m-0"
|
||||
@@ -1067,54 +887,42 @@ exports[`<SiteFooter /> renders correctly does not render social links 1`] = `
|
||||
<a
|
||||
href="https://www.example.com/about-us"
|
||||
>
|
||||
<span>
|
||||
About
|
||||
</span>
|
||||
About
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
href="https://business.edx.org/?utm_test=utm_test_value"
|
||||
>
|
||||
<span>
|
||||
example for Business
|
||||
</span>
|
||||
edX for Business
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
href="https://www.example.com/affiliate-program"
|
||||
>
|
||||
<span>
|
||||
Affiliates
|
||||
</span>
|
||||
Affiliates
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
href="https://www.example.com/open"
|
||||
>
|
||||
<span>
|
||||
Open example
|
||||
</span>
|
||||
Open edX
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
href="https://www.example.com/careers"
|
||||
>
|
||||
<span>
|
||||
Careers
|
||||
</span>
|
||||
Careers
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
href="https://www.example.com/news-announcements"
|
||||
>
|
||||
<span>
|
||||
News
|
||||
</span>
|
||||
News
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -1123,9 +931,7 @@ exports[`<SiteFooter /> renders correctly does not render social links 1`] = `
|
||||
className="area-3"
|
||||
>
|
||||
<h2>
|
||||
<span>
|
||||
Legal
|
||||
</span>
|
||||
Legal
|
||||
</h2>
|
||||
<ul
|
||||
className="list-unstyled p-0 m-0"
|
||||
@@ -1134,45 +940,35 @@ exports[`<SiteFooter /> renders correctly does not render social links 1`] = `
|
||||
<a
|
||||
href="https://www.example.com/terms-of-service"
|
||||
>
|
||||
<span>
|
||||
Terms of Service & Honor Code
|
||||
</span>
|
||||
Terms of Service & Honor Code
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
href="https://www.example.com/privacy-policy"
|
||||
>
|
||||
<span>
|
||||
Privacy Policy
|
||||
</span>
|
||||
Privacy Policy
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
href="https://www.example.com/accessibility"
|
||||
>
|
||||
<span>
|
||||
Accessibility Policy
|
||||
</span>
|
||||
Accessibility Policy
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
href="https://www.example.com/trademarks"
|
||||
>
|
||||
<span>
|
||||
Trademark Policy
|
||||
</span>
|
||||
Trademark Policy
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
href="https://www.example.com/sitemap"
|
||||
>
|
||||
<span>
|
||||
Sitemap
|
||||
</span>
|
||||
Sitemap
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -1181,9 +977,7 @@ exports[`<SiteFooter /> renders correctly does not render social links 1`] = `
|
||||
className="area-4"
|
||||
>
|
||||
<h2>
|
||||
<span>
|
||||
Connect
|
||||
</span>
|
||||
Connect
|
||||
</h2>
|
||||
<ul
|
||||
className="list-unstyled p-0 m-0"
|
||||
@@ -1192,45 +986,35 @@ exports[`<SiteFooter /> renders correctly does not render social links 1`] = `
|
||||
<a
|
||||
href="https://www.example.com/blog"
|
||||
>
|
||||
<span>
|
||||
Blog
|
||||
</span>
|
||||
Blog
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
href="https://www.example.com/contact"
|
||||
>
|
||||
<span>
|
||||
Contact Us
|
||||
</span>
|
||||
Contact Us
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
href="https://www.example.com/support"
|
||||
>
|
||||
<span>
|
||||
Help Center
|
||||
</span>
|
||||
Help Center
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
href="https://www.example.com/media-kit"
|
||||
>
|
||||
<span>
|
||||
Media Kit
|
||||
</span>
|
||||
Media Kit
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
href="https://www.example.com/donate"
|
||||
>
|
||||
<span>
|
||||
Donate
|
||||
</span>
|
||||
Donate
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -1249,7 +1033,7 @@ exports[`<SiteFooter /> renders correctly does not render social links 1`] = `
|
||||
target="_blank"
|
||||
>
|
||||
<img
|
||||
alt="Download the example mobile app from the Apple App Store"
|
||||
alt="Download the edX mobile app from the Apple App Store"
|
||||
className="max-height-39"
|
||||
src="https://prod-edxapp.edx-cdn.org/static/images/app/app_store_badge_135x40.d0558d910630.svg"
|
||||
/>
|
||||
@@ -1263,7 +1047,7 @@ exports[`<SiteFooter /> renders correctly does not render social links 1`] = `
|
||||
target="_blank"
|
||||
>
|
||||
<img
|
||||
alt="Download the example mobile app from Google Play"
|
||||
alt="Download the edX mobile app from Google Play"
|
||||
className="max-height-39"
|
||||
src="https://prod-edxapp.edx-cdn.org/static/images/app/google_play_badge_45.6ea466e328da.png"
|
||||
/>
|
||||
@@ -1271,18 +1055,14 @@ exports[`<SiteFooter /> renders correctly does not render social links 1`] = `
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
<span>
|
||||
© 2012–2019 example Inc.
|
||||
</span>
|
||||
© 2012–2019 edX Inc.
|
||||
<br />
|
||||
<span>
|
||||
EdX, Open edX, and MicroMasters are registered trademarks of edX Inc. | 深圳市恒宇博科技有限公司
|
||||
<a
|
||||
href="http://www.beian.miit.gov.cn"
|
||||
>
|
||||
粤ICP备17044299号-2
|
||||
</a>
|
||||
</span>
|
||||
EdX, Open edX, and MicroMasters are registered trademarks of edX Inc. | 深圳市恒宇博科技有限公司
|
||||
<a
|
||||
href="http://www.beian.miit.gov.cn"
|
||||
>
|
||||
粤ICP备17044299号-2
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1302,13 +1082,13 @@ exports[`<SiteFooter /> renders correctly renders with social and mobile links 1
|
||||
className="area-1"
|
||||
>
|
||||
<a
|
||||
aria-label="example Home"
|
||||
href="https://www.example.com/"
|
||||
aria-label="edX Home"
|
||||
href="https://www.example.com"
|
||||
onClick={[Function]}
|
||||
target="_self"
|
||||
>
|
||||
<img
|
||||
alt="example logo"
|
||||
alt="edx Logo"
|
||||
src="test-file-stub"
|
||||
/>
|
||||
</a>
|
||||
@@ -1375,7 +1155,7 @@ exports[`<SiteFooter /> renders correctly renders with social and mobile links 1
|
||||
className="area-2"
|
||||
>
|
||||
<h2>
|
||||
example
|
||||
edX
|
||||
</h2>
|
||||
<ul
|
||||
className="list-unstyled p-0 m-0"
|
||||
@@ -1384,54 +1164,42 @@ exports[`<SiteFooter /> renders correctly renders with social and mobile links 1
|
||||
<a
|
||||
href="https://www.example.com/about-us"
|
||||
>
|
||||
<span>
|
||||
About
|
||||
</span>
|
||||
About
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
href="https://business.edx.org/?utm_test=utm_test_value"
|
||||
>
|
||||
<span>
|
||||
example for Business
|
||||
</span>
|
||||
edX for Business
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
href="https://www.example.com/affiliate-program"
|
||||
>
|
||||
<span>
|
||||
Affiliates
|
||||
</span>
|
||||
Affiliates
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
href="https://www.example.com/open"
|
||||
>
|
||||
<span>
|
||||
Open example
|
||||
</span>
|
||||
Open edX
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
href="https://www.example.com/careers"
|
||||
>
|
||||
<span>
|
||||
Careers
|
||||
</span>
|
||||
Careers
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
href="https://www.example.com/news-announcements"
|
||||
>
|
||||
<span>
|
||||
News
|
||||
</span>
|
||||
News
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -1440,9 +1208,7 @@ exports[`<SiteFooter /> renders correctly renders with social and mobile links 1
|
||||
className="area-3"
|
||||
>
|
||||
<h2>
|
||||
<span>
|
||||
Legal
|
||||
</span>
|
||||
Legal
|
||||
</h2>
|
||||
<ul
|
||||
className="list-unstyled p-0 m-0"
|
||||
@@ -1451,45 +1217,35 @@ exports[`<SiteFooter /> renders correctly renders with social and mobile links 1
|
||||
<a
|
||||
href="https://www.example.com/terms-of-service"
|
||||
>
|
||||
<span>
|
||||
Terms of Service & Honor Code
|
||||
</span>
|
||||
Terms of Service & Honor Code
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
href="https://www.example.com/privacy-policy"
|
||||
>
|
||||
<span>
|
||||
Privacy Policy
|
||||
</span>
|
||||
Privacy Policy
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
href="https://www.example.com/accessibility"
|
||||
>
|
||||
<span>
|
||||
Accessibility Policy
|
||||
</span>
|
||||
Accessibility Policy
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
href="https://www.example.com/trademarks"
|
||||
>
|
||||
<span>
|
||||
Trademark Policy
|
||||
</span>
|
||||
Trademark Policy
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
href="https://www.example.com/sitemap"
|
||||
>
|
||||
<span>
|
||||
Sitemap
|
||||
</span>
|
||||
Sitemap
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -1498,9 +1254,7 @@ exports[`<SiteFooter /> renders correctly renders with social and mobile links 1
|
||||
className="area-4"
|
||||
>
|
||||
<h2>
|
||||
<span>
|
||||
Connect
|
||||
</span>
|
||||
Connect
|
||||
</h2>
|
||||
<ul
|
||||
className="list-unstyled p-0 m-0"
|
||||
@@ -1509,45 +1263,35 @@ exports[`<SiteFooter /> renders correctly renders with social and mobile links 1
|
||||
<a
|
||||
href="https://www.example.com/blog"
|
||||
>
|
||||
<span>
|
||||
Blog
|
||||
</span>
|
||||
Blog
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
href="https://www.example.com/contact"
|
||||
>
|
||||
<span>
|
||||
Contact Us
|
||||
</span>
|
||||
Contact Us
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
href="https://www.example.com/support"
|
||||
>
|
||||
<span>
|
||||
Help Center
|
||||
</span>
|
||||
Help Center
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
href="https://www.example.com/media-kit"
|
||||
>
|
||||
<span>
|
||||
Media Kit
|
||||
</span>
|
||||
Media Kit
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
href="https://www.example.com/donate"
|
||||
>
|
||||
<span>
|
||||
Donate
|
||||
</span>
|
||||
Donate
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -1686,38 +1430,6 @@ exports[`<SiteFooter /> renders correctly renders with social and mobile links 1
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
href="https://plus.google.com"
|
||||
onClick={[Function]}
|
||||
rel="noopener noreferrer"
|
||||
target="_blank"
|
||||
title="Google+"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
className="svg-inline--fa fa-google-plus-square fa-w-14 fa-2x social-icon"
|
||||
data-icon="google-plus-square"
|
||||
data-prefix="fab"
|
||||
focusable="false"
|
||||
role="img"
|
||||
style={Object {}}
|
||||
viewBox="0 0 448 512"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<path
|
||||
d="M400 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48zM164 356c-55.3 0-100-44.7-100-100s44.7-100 100-100c27 0 49.5 9.8 67 26.2l-27.1 26.1c-7.4-7.1-20.3-15.4-39.8-15.4-34.1 0-61.9 28.2-61.9 63.2 0 34.9 27.8 63.2 61.9 63.2 39.6 0 54.4-28.5 56.8-43.1H164v-34.4h94.4c1 5 1.6 10.1 1.6 16.6 0 57.1-38.3 97.6-96 97.6zm220-81.8h-29v29h-29.2v-29h-29V245h29v-29H355v29h29v29.2z"
|
||||
fill="currentColor"
|
||||
style={Object {}}
|
||||
/>
|
||||
</svg>
|
||||
<span
|
||||
className="sr-only"
|
||||
>
|
||||
Follow edX on Google+
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
href="https://reddit.com"
|
||||
@@ -1762,7 +1474,7 @@ exports[`<SiteFooter /> renders correctly renders with social and mobile links 1
|
||||
target="_blank"
|
||||
>
|
||||
<img
|
||||
alt="Download the example mobile app from the Apple App Store"
|
||||
alt="Download the edX mobile app from the Apple App Store"
|
||||
className="max-height-39"
|
||||
src="https://prod-edxapp.edx-cdn.org/static/images/app/app_store_badge_135x40.d0558d910630.svg"
|
||||
/>
|
||||
@@ -1776,7 +1488,7 @@ exports[`<SiteFooter /> renders correctly renders with social and mobile links 1
|
||||
target="_blank"
|
||||
>
|
||||
<img
|
||||
alt="Download the example mobile app from Google Play"
|
||||
alt="Download the edX mobile app from Google Play"
|
||||
className="max-height-39"
|
||||
src="https://prod-edxapp.edx-cdn.org/static/images/app/google_play_badge_45.6ea466e328da.png"
|
||||
/>
|
||||
@@ -1784,18 +1496,14 @@ exports[`<SiteFooter /> renders correctly renders with social and mobile links 1
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
<span>
|
||||
© 2012–2019 example Inc.
|
||||
</span>
|
||||
© 2012–2019 edX Inc.
|
||||
<br />
|
||||
<span>
|
||||
EdX, Open edX, and MicroMasters are registered trademarks of edX Inc. | 深圳市恒宇博科技有限公司
|
||||
<a
|
||||
href="http://www.beian.miit.gov.cn"
|
||||
>
|
||||
粤ICP备17044299号-2
|
||||
</a>
|
||||
</span>
|
||||
EdX, Open edX, and MicroMasters are registered trademarks of edX Inc. | 深圳市恒宇博科技有限公司
|
||||
<a
|
||||
href="http://www.beian.miit.gov.cn"
|
||||
>
|
||||
粤ICP备17044299号-2
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,11 +1,8 @@
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { FormattedMessage, injectIntl, intlShape } from '@edx/frontend-i18n';
|
||||
import { Hyperlink } from '@edx/paragon';
|
||||
import qs from 'query-string';
|
||||
|
||||
import messages from './SiteFooter.messages';
|
||||
|
||||
const EVENT_NAMES = {
|
||||
FOOTER_LINK: 'edx.bi.footer.link',
|
||||
};
|
||||
@@ -35,62 +32,57 @@ class SiteFooter extends React.Component {
|
||||
this.props.handleAllTrackEvents(eventName, properties);
|
||||
}
|
||||
|
||||
renderSiteLogo() {
|
||||
return (
|
||||
<img
|
||||
src={this.props.siteLogo}
|
||||
alt={this.props.intl.formatMessage(
|
||||
messages['footer.site-footer.site-logo.alt-text'],
|
||||
{ siteName: this.props.siteName },
|
||||
)}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
renderMarketingSiteUrl(path) {
|
||||
return `${this.props.marketingSiteBaseUrl}${path}`;
|
||||
}
|
||||
|
||||
renderEnterpriseMarketingSiteUrl(enterpriseLinkData) {
|
||||
formatUrl(linkData) {
|
||||
const {
|
||||
queryParams,
|
||||
url,
|
||||
} = enterpriseLinkData;
|
||||
} = linkData;
|
||||
return queryParams ? `${url}/?${qs.stringify(queryParams)}` : url;
|
||||
}
|
||||
|
||||
renderLinkList({ title, linkList }) {
|
||||
if (linkList.length > 0) {
|
||||
return (
|
||||
<React.Fragment>
|
||||
<h2>{title}</h2>
|
||||
<ul className="list-unstyled p-0 m-0">
|
||||
{linkList.map(link => (
|
||||
<li key={link.url}>
|
||||
<a href={this.formatUrl(link)}>{link.title}</a>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
</React.Fragment>
|
||||
);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
renderMobileLinks() {
|
||||
const {
|
||||
intl,
|
||||
siteName,
|
||||
showMobileLinks,
|
||||
appleAppStoreUrl,
|
||||
googlePlayUrl,
|
||||
appleAppStore,
|
||||
googlePlay,
|
||||
} = this.props;
|
||||
let mobileLinks = null;
|
||||
|
||||
if (showMobileLinks) {
|
||||
mobileLinks = (
|
||||
return (
|
||||
<ul className="d-flex flex-row justify-content-between list-unstyled max-width-264 p-0 mb-5">
|
||||
<li>
|
||||
<a href={appleAppStoreUrl} rel="noopener noreferrer" target="_blank" onClick={this.externalLinkClickHandler}>
|
||||
<a href={appleAppStore.url} rel="noopener noreferrer" target="_blank" onClick={this.externalLinkClickHandler}>
|
||||
<img
|
||||
className="max-height-39"
|
||||
alt={intl.formatMessage(
|
||||
messages['footer.site-footer.apple-app-store.alt-text'],
|
||||
{ siteName },
|
||||
)}
|
||||
alt={appleAppStore.altText}
|
||||
src="https://prod-edxapp.edx-cdn.org/static/images/app/app_store_badge_135x40.d0558d910630.svg"
|
||||
/>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href={googlePlayUrl} rel="noopener noreferrer" target="_blank" onClick={this.externalLinkClickHandler}>
|
||||
<a href={googlePlay.url} rel="noopener noreferrer" target="_blank" onClick={this.externalLinkClickHandler}>
|
||||
<img
|
||||
className="max-height-39"
|
||||
alt={intl.formatMessage(
|
||||
messages['footer.site-footer.google-play.alt-text'],
|
||||
{ siteName },
|
||||
)}
|
||||
alt={googlePlay.altText}
|
||||
src="https://prod-edxapp.edx-cdn.org/static/images/app/google_play_badge_45.6ea466e328da.png"
|
||||
/>
|
||||
</a>
|
||||
@@ -98,55 +90,38 @@ class SiteFooter extends React.Component {
|
||||
</ul>
|
||||
);
|
||||
}
|
||||
return mobileLinks;
|
||||
}
|
||||
|
||||
renderBusinessMarketingListItem() {
|
||||
const { siteName, enterpriseMarketingLink } = this.props;
|
||||
return enterpriseMarketingLink && (
|
||||
<li>
|
||||
<a href={this.renderEnterpriseMarketingSiteUrl(enterpriseMarketingLink)}>
|
||||
<FormattedMessage
|
||||
id="footer.site-footer.link.business"
|
||||
defaultMessage="{siteName} for Business"
|
||||
description="A link that points to a business marketing page for a specified website"
|
||||
values={{ siteName }}
|
||||
/>
|
||||
</a>
|
||||
</li>
|
||||
);
|
||||
return null;
|
||||
}
|
||||
|
||||
render() {
|
||||
const {
|
||||
intl,
|
||||
siteName,
|
||||
openSourceUrl,
|
||||
termsOfServiceUrl,
|
||||
privacyPolicyUrl,
|
||||
contactUrl,
|
||||
supportUrl,
|
||||
ariaLabel,
|
||||
linkSectionOne,
|
||||
linkSectionTwo,
|
||||
linkSectionThree,
|
||||
siteLogo,
|
||||
socialLinks,
|
||||
supportedLanguages,
|
||||
languageForm,
|
||||
marketingSiteBaseUrl,
|
||||
copyright,
|
||||
trademark,
|
||||
} = this.props;
|
||||
const showLanguageSelector = supportedLanguages.length > 0 &&
|
||||
languageForm;
|
||||
return (
|
||||
<footer
|
||||
role="contentinfo"
|
||||
aria-label={intl.formatMessage(messages['footer.site-footer.footer.aria-label'])}
|
||||
aria-label={ariaLabel}
|
||||
className="footer d-flex justify-content-center border-top py-3 px-4"
|
||||
>
|
||||
<div className="max-width-1180 d-grid">
|
||||
<div className="area-1">
|
||||
<Hyperlink
|
||||
destination={this.renderMarketingSiteUrl('/')}
|
||||
content={this.renderSiteLogo()}
|
||||
aria-label={intl.formatMessage(
|
||||
messages['footer.site-footer.site-logo.aria-label'],
|
||||
{ siteName },
|
||||
)}
|
||||
destination={marketingSiteBaseUrl}
|
||||
content={<img src={siteLogo.src} alt={siteLogo.altText} />}
|
||||
aria-label={siteLogo.ariaLabel}
|
||||
/>
|
||||
{showLanguageSelector &&
|
||||
<div className="i18n d-flex mt-2">
|
||||
@@ -173,156 +148,9 @@ class SiteFooter extends React.Component {
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
<div className="area-2">
|
||||
<h2>{siteName}</h2>
|
||||
<ul className="list-unstyled p-0 m-0">
|
||||
<li>
|
||||
<a href={this.renderMarketingSiteUrl('/about-us')}>
|
||||
<FormattedMessage
|
||||
id="footer.site-footer.link.about"
|
||||
defaultMessage="About"
|
||||
/>
|
||||
</a>
|
||||
</li>
|
||||
{this.renderBusinessMarketingListItem()}
|
||||
<li>
|
||||
<a href={this.renderMarketingSiteUrl('/affiliate-program')}>
|
||||
<FormattedMessage
|
||||
id="footer.site-footer.link.affiliates"
|
||||
defaultMessage="Affiliates"
|
||||
/>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href={openSourceUrl}>
|
||||
<FormattedMessage
|
||||
id="footer.site-footer.link.open-source"
|
||||
defaultMessage="Open {siteName}"
|
||||
values={{ siteName }}
|
||||
description="Open Source link text"
|
||||
/>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href={this.renderMarketingSiteUrl('/careers')}>
|
||||
<FormattedMessage
|
||||
id="footer.site-footer.link.careers"
|
||||
defaultMessage="Careers"
|
||||
/>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href={this.renderMarketingSiteUrl('/news-announcements')}>
|
||||
<FormattedMessage
|
||||
id="footer.site-footer.link.news"
|
||||
defaultMessage="News"
|
||||
/>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div className="area-3">
|
||||
<h2>
|
||||
<FormattedMessage
|
||||
id="footer.site-footer.link.header.legal"
|
||||
defaultMessage="Legal"
|
||||
description="Header for legal links"
|
||||
/>
|
||||
</h2>
|
||||
<ul className="list-unstyled p-0 m-0">
|
||||
<li>
|
||||
<a href={termsOfServiceUrl}>
|
||||
<FormattedMessage
|
||||
id="footer.site-footer.link.terms-of-service"
|
||||
defaultMessage="Terms of Service & Honor Code"
|
||||
/>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href={privacyPolicyUrl}>
|
||||
<FormattedMessage
|
||||
id="footer.site-footer.link.privacy"
|
||||
defaultMessage="Privacy Policy"
|
||||
/>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href={this.renderMarketingSiteUrl('/accessibility')}>
|
||||
<FormattedMessage
|
||||
id="footer.site-footer.link.accessibility"
|
||||
defaultMessage="Accessibility Policy"
|
||||
/>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href={this.renderMarketingSiteUrl('/trademarks')}>
|
||||
<FormattedMessage
|
||||
id="footer.site-footer.link.trademark"
|
||||
defaultMessage="Trademark Policy"
|
||||
/>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href={this.renderMarketingSiteUrl('/sitemap')}>
|
||||
<FormattedMessage
|
||||
id="footer.site-footer.link.sitemap"
|
||||
defaultMessage="Sitemap"
|
||||
/>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div className="area-4">
|
||||
<h2>
|
||||
<FormattedMessage
|
||||
id="footer.site-footer.link.header.connect"
|
||||
defaultMessage="Connect"
|
||||
description="Header for connect links"
|
||||
/>
|
||||
</h2>
|
||||
<ul className="list-unstyled p-0 m-0">
|
||||
<li>
|
||||
<a href={this.renderMarketingSiteUrl('/blog')}>
|
||||
<FormattedMessage
|
||||
id="footer.site-footer.link.blog"
|
||||
defaultMessage="Blog"
|
||||
/>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href={contactUrl}>
|
||||
<FormattedMessage
|
||||
id="footer.site-footer.link.contact-us"
|
||||
defaultMessage="Contact Us"
|
||||
/>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href={supportUrl}>
|
||||
<FormattedMessage
|
||||
id="footer.site-footer.link.help-center"
|
||||
defaultMessage="Help Center"
|
||||
/>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href={this.renderMarketingSiteUrl('/media-kit')}>
|
||||
<FormattedMessage
|
||||
id="footer.site-footer.link.media-kit"
|
||||
defaultMessage="Media Kit"
|
||||
/>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href={this.renderMarketingSiteUrl('/donate')}>
|
||||
<FormattedMessage
|
||||
id="footer.site-footer.link.donate"
|
||||
defaultMessage="Donate"
|
||||
/>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div className="area-2">{this.renderLinkList(linkSectionOne)}</div>
|
||||
<div className="area-3">{this.renderLinkList(linkSectionTwo)}</div>
|
||||
<div className="area-4">{this.renderLinkList(linkSectionThree)}</div>
|
||||
<div className="area-5">
|
||||
{socialLinks.length > 0 &&
|
||||
<ul className="d-flex flex-row justify-content-between list-unstyled max-width-222 p-0 mb-4">
|
||||
@@ -344,24 +172,9 @@ class SiteFooter extends React.Component {
|
||||
}
|
||||
{this.renderMobileLinks()}
|
||||
<p>
|
||||
<FormattedMessage
|
||||
id="footer.site-footer.copyright-text"
|
||||
defaultMessage="{copyrightSymbol} {startDate}–{endDate} {siteName} Inc."
|
||||
values={{
|
||||
copyrightSymbol: '©',
|
||||
startDate: '2012',
|
||||
endDate: `${new Date().getFullYear()}`,
|
||||
siteName,
|
||||
}}
|
||||
description="Footer copyright text with copyright symbol and dates"
|
||||
/>
|
||||
{copyright}
|
||||
<br />
|
||||
<FormattedMessage
|
||||
id="footer.site-footer.trademark-text"
|
||||
defaultMessage="EdX, Open edX, and MicroMasters are registered trademarks of edX Inc. | 深圳市恒宇博科技有限公司 {icpLicense}"
|
||||
values={{ icpLicense: <a href="http://www.beian.miit.gov.cn">粤ICP备17044299号-2</a> }}
|
||||
description="Footer trademark text"
|
||||
/>
|
||||
{trademark}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -370,19 +183,26 @@ class SiteFooter extends React.Component {
|
||||
}
|
||||
}
|
||||
|
||||
SiteFooter.propTypes = {
|
||||
siteName: PropTypes.string,
|
||||
siteLogo: PropTypes.node,
|
||||
marketingSiteBaseUrl: PropTypes.string,
|
||||
enterpriseMarketingLink: PropTypes.shape({
|
||||
url: PropTypes.string,
|
||||
const linkSectionShape = PropTypes.shape({
|
||||
title: PropTypes.string,
|
||||
linkList: PropTypes.arrayOf(PropTypes.shape({
|
||||
title: PropTypes.string.isRequired,
|
||||
url: PropTypes.string.isRequired,
|
||||
queryParams: PropTypes.shape({}),
|
||||
})),
|
||||
});
|
||||
|
||||
SiteFooter.propTypes = {
|
||||
ariaLabel: PropTypes.string.isRequired,
|
||||
siteLogo: PropTypes.shape({
|
||||
src: PropTypes.node,
|
||||
altText: PropTypes.string,
|
||||
ariaLabel: PropTypes.string,
|
||||
}),
|
||||
supportUrl: PropTypes.string,
|
||||
contactUrl: PropTypes.string,
|
||||
openSourceUrl: PropTypes.string,
|
||||
termsOfServiceUrl: PropTypes.string,
|
||||
privacyPolicyUrl: PropTypes.string,
|
||||
marketingSiteBaseUrl: PropTypes.string,
|
||||
linkSectionOne: linkSectionShape,
|
||||
linkSectionTwo: linkSectionShape,
|
||||
linkSectionThree: linkSectionShape,
|
||||
socialLinks: PropTypes.arrayOf(PropTypes.shape({
|
||||
title: PropTypes.string.isRequired,
|
||||
url: PropTypes.string.isRequired,
|
||||
@@ -390,8 +210,14 @@ SiteFooter.propTypes = {
|
||||
screenReaderText: PropTypes.string.isRequired,
|
||||
})),
|
||||
showMobileLinks: PropTypes.bool,
|
||||
appleAppStoreUrl: PropTypes.string,
|
||||
googlePlayUrl: PropTypes.string,
|
||||
appleAppStore: PropTypes.shape({
|
||||
url: PropTypes.string,
|
||||
altText: PropTypes.string,
|
||||
}),
|
||||
googlePlay: PropTypes.shape({
|
||||
url: PropTypes.string,
|
||||
altText: PropTypes.string,
|
||||
}),
|
||||
supportedLanguages: PropTypes.arrayOf(PropTypes.shape({
|
||||
label: PropTypes.string.isRequired,
|
||||
value: PropTypes.string.isRequired,
|
||||
@@ -403,27 +229,37 @@ SiteFooter.propTypes = {
|
||||
icon: PropTypes.node.isRequired,
|
||||
activeLanguage: PropTypes.string,
|
||||
}),
|
||||
copyright: PropTypes.oneOfType([
|
||||
PropTypes.string,
|
||||
PropTypes.node,
|
||||
]),
|
||||
trademark: PropTypes.oneOfType([
|
||||
PropTypes.string,
|
||||
PropTypes.node,
|
||||
]),
|
||||
handleAllTrackEvents: PropTypes.func.isRequired,
|
||||
intl: intlShape.isRequired,
|
||||
};
|
||||
|
||||
const linkSectionDefault = {
|
||||
title: null,
|
||||
linkList: [],
|
||||
};
|
||||
|
||||
SiteFooter.defaultProps = {
|
||||
siteName: null,
|
||||
siteLogo: null,
|
||||
marketingSiteBaseUrl: null,
|
||||
enterpriseMarketingLink: null,
|
||||
supportUrl: null,
|
||||
contactUrl: null,
|
||||
openSourceUrl: null,
|
||||
termsOfServiceUrl: null,
|
||||
privacyPolicyUrl: null,
|
||||
linkSectionOne: linkSectionDefault,
|
||||
linkSectionTwo: linkSectionDefault,
|
||||
linkSectionThree: linkSectionDefault,
|
||||
socialLinks: [],
|
||||
showMobileLinks: true,
|
||||
appleAppStoreUrl: null,
|
||||
googlePlayUrl: null,
|
||||
appleAppStore: null,
|
||||
googlePlay: null,
|
||||
supportedLanguages: [],
|
||||
languageForm: null,
|
||||
copyright: null,
|
||||
trademark: null,
|
||||
};
|
||||
|
||||
export default injectIntl(SiteFooter);
|
||||
export default SiteFooter;
|
||||
export { EVENT_NAMES };
|
||||
|
||||
Reference in New Issue
Block a user