Compare commits
14 Commits
v6.0.2
...
djoy/re-ad
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
40264e087d | ||
|
|
31e255ebe9 | ||
|
|
349f83f686 | ||
|
|
e0c205ce14 | ||
|
|
81398c8cfd | ||
|
|
3fcd76b455 | ||
|
|
a8f57aa553 | ||
|
|
f32b0c8dcf | ||
|
|
fb1f5c2d50 | ||
|
|
1a51d992cd | ||
|
|
e9c28163d9 | ||
|
|
6db2d70e97 | ||
|
|
3ab4adf10b | ||
|
|
a482325eac |
2
.babelrc
2
.babelrc
@@ -19,7 +19,7 @@
|
||||
"i18n": {
|
||||
"plugins": [
|
||||
["react-intl", {
|
||||
"messagesDir": "./temp",
|
||||
"messagesDir": "./temp/babel-plugin-react-intl",
|
||||
"moduleSourceName": "@edx/frontend-i18n"
|
||||
}]
|
||||
]
|
||||
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -6,3 +6,4 @@ temp
|
||||
.idea/
|
||||
|
||||
src/i18n/transifex_input.json
|
||||
temp/babel-plugin-react-intl
|
||||
|
||||
51
Makefile
51
Makefile
@@ -1,41 +1,50 @@
|
||||
transifex_resource = frontend-component-footer
|
||||
transifex_langs = "ar,fr,es_419,zh_CN"
|
||||
|
||||
transifex_utils = ./node_modules/.bin/transifex-utils.js
|
||||
i18n = ./src/i18n
|
||||
transifex_input = $(i18n)/transifex_input.json
|
||||
tx_url1 = https://www.transifex.com/api/2/project/edx-platform/resource/$(transifex_resource)/translation/en/strings/
|
||||
tx_url2 = https://www.transifex.com/api/2/project/edx-platform/resource/$(transifex_resource)/source/
|
||||
|
||||
# This directory must match .babelrc .
|
||||
transifex_temp = ./temp/babel-plugin-react-intl
|
||||
|
||||
requirements:
|
||||
npm install
|
||||
|
||||
i18n.extract:
|
||||
# Pulling display strings from .jsx files into .json files...
|
||||
# Pulling display strings from .jsx files into .json files...
|
||||
rm -rf $(transifex_temp)
|
||||
npm run-script i18n_extract
|
||||
|
||||
i18n.concat:
|
||||
# Gathering JSON messages into one file...
|
||||
./src/i18n/i18n-concat.js ./temp/src ./src/i18n/transifex_input.json
|
||||
|
||||
|
||||
# The following make targets are required by our tooling scripts found in:
|
||||
# - https://github.com/edx/ecommerce-scripts/tree/master/transifex
|
||||
# Gathering JSON messages into one file...
|
||||
$(transifex_utils) $(transifex_temp) $(transifex_input)
|
||||
|
||||
extract_translations: | requirements i18n.extract i18n.concat
|
||||
|
||||
# Despite the name, we actually need this target to detect changes in the incoming translated message files as well.
|
||||
detect_changed_source_translations:
|
||||
git diff --exit-code ./src/i18n/transifex_input.json
|
||||
# Checking for changed translations...
|
||||
git diff --exit-code $(i18n)
|
||||
|
||||
tx_url1 = https://www.transifex.com/api/2/project/edx-platform/resource/frontend-component-footer/translation/en/strings/
|
||||
tx_url2 = https://www.transifex.com/api/2/project/edx-platform/resource/frontend-component-footer/source/
|
||||
|
||||
# push translations to Transifex, doing magic so we can include the translator comments
|
||||
# Note: extract_translations is a prereq that our translation script calls separately.
|
||||
# Pushes translations to Transifex. You must run make extract_translations first.
|
||||
push_translations:
|
||||
# Pushing strings to Transifex...
|
||||
tx push -s
|
||||
# Adding translator comments...
|
||||
# Fetching strings from Transifex...
|
||||
# Fetching hashes from Transifex...
|
||||
./node_modules/reactifex/bash_scripts/get_hashed_strings.sh $(tx_url1)
|
||||
# Writing out comments to file...
|
||||
./src/i18n/i18n-concat.js ./temp/src --comments
|
||||
# Adding comments to Transifex...
|
||||
# Writing out comments to file...
|
||||
$(transifex_utils) $(transifex_temp) --comments
|
||||
# Pushing comments to Transifex...
|
||||
./node_modules/reactifex/bash_scripts/put_comments.sh $(tx_url2)
|
||||
|
||||
# pull translations from Transifex
|
||||
pull_translations: ## must be exactly this name for edx tooling support, see ecommerce-scripts/transifex/pull.py
|
||||
tx pull -f --mode reviewed --language="ar,fr,es_419,zh_CN"
|
||||
# Pulls translations from Transifex.
|
||||
pull_translations:
|
||||
tx pull -f --mode reviewed --language=$(transifex_langs)
|
||||
|
||||
# This target is used by Travis.
|
||||
validate-no-uncommitted-package-lock-changes:
|
||||
# Checking for package-lock.json changes...
|
||||
git diff --exit-code package-lock.json
|
||||
|
||||
@@ -47,12 +47,6 @@ module.exports = Merge.smart(commonConfig, {
|
||||
amd: '@edx/frontend-logging',
|
||||
root: '@edx/frontend-logging',
|
||||
},
|
||||
'@edx/paragon': {
|
||||
commonjs: '@edx/paragon',
|
||||
commonjs2: '@edx/paragon',
|
||||
amd: 'Paragon',
|
||||
root: 'Paragon',
|
||||
},
|
||||
},
|
||||
plugins: [
|
||||
// Cleans the dist directory before each build
|
||||
|
||||
210
package-lock.json
generated
210
package-lock.json
generated
@@ -1424,10 +1424,19 @@
|
||||
"integrity": "sha512-APBpZvdQrC1MJWMzk33V7FR2RhBRtnH2QPLqZzS+qia7PixwgWNlnX7UfHjhx+YWkM53GdsZKs40EBkSwADuMA==",
|
||||
"dev": true
|
||||
},
|
||||
"@edx/edx-bootstrap": {
|
||||
"version": "2.2.1",
|
||||
"resolved": "https://registry.npmjs.org/@edx/edx-bootstrap/-/edx-bootstrap-2.2.1.tgz",
|
||||
"integrity": "sha512-HkQ45u46ejX7WYwJX6ar/0FGBjx4F7bZvt3Dd4A677st0ic/47X5vQlqMqmK/M08C+GXaunNbZdbyF/ROrmwxw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"bootstrap": "^4.3.1"
|
||||
}
|
||||
},
|
||||
"@edx/frontend-i18n": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/@edx/frontend-i18n/-/frontend-i18n-1.1.0.tgz",
|
||||
"integrity": "sha512-bTS/zGYupas/xbgAV4XKF43b+eQwNfd2Ffhzw4V7L0LUiMm9ULkISHJIhPu3co0Veu/T+sjZn3wkLee/TNk6JQ==",
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/@edx/frontend-i18n/-/frontend-i18n-2.1.1.tgz",
|
||||
"integrity": "sha512-1uPagQWBfnZn6EFjJmu+igfEG4F8GFxYx+piLsyPsq/vZs6G1qJPa6hM4Aipx+JIEAUr72l7sExgCPBj+G/71g==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@cospired/i18n-iso-languages": "^2.0.2",
|
||||
@@ -1461,22 +1470,20 @@
|
||||
"dev": true
|
||||
},
|
||||
"@edx/paragon": {
|
||||
"version": "4.2.6",
|
||||
"resolved": "https://registry.npmjs.org/@edx/paragon/-/paragon-4.2.6.tgz",
|
||||
"integrity": "sha512-HOSClLgOe2hGxFuRORgK+6iSrEixFvaz5Cg3pdQa+SeU9WBqiPlEevG4TnWl0qlihltsYR9Vba80tzG9ci84hQ==",
|
||||
"version": "6.1.0",
|
||||
"resolved": "https://registry.npmjs.org/@edx/paragon/-/paragon-6.1.0.tgz",
|
||||
"integrity": "sha512-S1cHYwLhBiE2FDuTiK/aTzq4T2kjRau7BewYZ8oJDK02OKv6lMHmekawWyyCK4nE9zGkPst5iawQmBYnfM+obw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@fortawesome/fontawesome-svg-core": "^1.2.18",
|
||||
"@fortawesome/free-solid-svg-icons": "^5.8.2",
|
||||
"@fortawesome/react-fontawesome": "^0.1.4",
|
||||
"airbnb-prop-types": "^2.12.0",
|
||||
"bootstrap": "^4.3.1",
|
||||
"classnames": "^2.2.6",
|
||||
"email-prop-type": "^3.0.0",
|
||||
"font-awesome": "^4.7.0",
|
||||
"mailto-link": "^1.0.0",
|
||||
"prop-types": "^15.7.2",
|
||||
"react": "^16.8.6",
|
||||
"react-dom": "^16.8.6",
|
||||
"react-proptype-conditional-require": "^1.0.4",
|
||||
"react-responsive": "^6.1.1",
|
||||
"react-transition-group": "^4.0.0",
|
||||
@@ -1484,78 +1491,27 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@fortawesome/fontawesome-common-types": {
|
||||
"version": "0.2.18",
|
||||
"resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-common-types/-/fontawesome-common-types-0.2.18.tgz",
|
||||
"integrity": "sha512-834DrzO2Ne3upCW+mJJPC/E6BsFcj+2Z1HmPIhbpbj8UaKmXWum4NClqLpUiMetugRlHuG4jbIHNdv2/lc3c1Q==",
|
||||
"version": "0.2.19",
|
||||
"resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-common-types/-/fontawesome-common-types-0.2.19.tgz",
|
||||
"integrity": "sha512-nd2Ul/CUs8U9sjofQYAALzOGpgkVJQgEhIJnOHaoyVR/LeC3x2mVg4eB910a4kS6WgLPebAY0M2fApEI497raQ==",
|
||||
"dev": true
|
||||
},
|
||||
"@fortawesome/fontawesome-svg-core": {
|
||||
"version": "1.2.18",
|
||||
"resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-svg-core/-/fontawesome-svg-core-1.2.18.tgz",
|
||||
"integrity": "sha512-1vyLWVQqxQ8q8bA2zgZcljk3RkeELlDJ757ymLk+ebK019AFgEFH5kTnR5OMN1SFsTwW1OHlFQO3VufdeCg/Gg==",
|
||||
"version": "1.2.19",
|
||||
"resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-svg-core/-/fontawesome-svg-core-1.2.19.tgz",
|
||||
"integrity": "sha512-D4ICXg9oU08eF9o7Or392gPpjmwwgJu8ecCFusthbID95CLVXOgIyd4mOKD9Nud5Ckz+Ty59pqkNtThDKR0erA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@fortawesome/fontawesome-common-types": "^0.2.18"
|
||||
"@fortawesome/fontawesome-common-types": "^0.2.19"
|
||||
}
|
||||
},
|
||||
"@fortawesome/free-solid-svg-icons": {
|
||||
"version": "5.8.2",
|
||||
"resolved": "https://registry.npmjs.org/@fortawesome/free-solid-svg-icons/-/free-solid-svg-icons-5.8.2.tgz",
|
||||
"integrity": "sha512-5tF6WOFlqqO95zY5ukSB6jliDa3jnk1p5L4K/a58ccDFsbjSkhfGuvZkRkeWxH8uMms81pZd6yQTwQrkedeJmg==",
|
||||
"version": "5.9.0",
|
||||
"resolved": "https://registry.npmjs.org/@fortawesome/free-solid-svg-icons/-/free-solid-svg-icons-5.9.0.tgz",
|
||||
"integrity": "sha512-U8YXPfWcSozsCW0psCtlRGKjjRs5+Am5JJwLOUmVHFZbIEWzaz4YbP84EoPwUsVmSAKrisu3QeNcVOtmGml0Xw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@fortawesome/fontawesome-common-types": "^0.2.18"
|
||||
}
|
||||
},
|
||||
"prop-types": {
|
||||
"version": "15.7.2",
|
||||
"resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.7.2.tgz",
|
||||
"integrity": "sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"loose-envify": "^1.4.0",
|
||||
"object-assign": "^4.1.1",
|
||||
"react-is": "^16.8.1"
|
||||
}
|
||||
},
|
||||
"react": {
|
||||
"version": "16.8.6",
|
||||
"resolved": "https://registry.npmjs.org/react/-/react-16.8.6.tgz",
|
||||
"integrity": "sha512-pC0uMkhLaHm11ZSJULfOBqV4tIZkx87ZLvbbQYunNixAAvjnC+snJCg0XQXn9VIsttVsbZP/H/ewzgsd5fxKXw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"loose-envify": "^1.1.0",
|
||||
"object-assign": "^4.1.1",
|
||||
"prop-types": "^15.6.2",
|
||||
"scheduler": "^0.13.6"
|
||||
}
|
||||
},
|
||||
"react-dom": {
|
||||
"version": "16.8.6",
|
||||
"resolved": "https://registry.npmjs.org/react-dom/-/react-dom-16.8.6.tgz",
|
||||
"integrity": "sha512-1nL7PIq9LTL3fthPqwkvr2zY7phIPjYrT0jp4HjyEQrEROnw4dG41VVwi/wfoCneoleqrNX7iAD+pXebJZwrwA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"loose-envify": "^1.1.0",
|
||||
"object-assign": "^4.1.1",
|
||||
"prop-types": "^15.6.2",
|
||||
"scheduler": "^0.13.6"
|
||||
}
|
||||
},
|
||||
"react-is": {
|
||||
"version": "16.8.6",
|
||||
"resolved": "https://registry.npmjs.org/react-is/-/react-is-16.8.6.tgz",
|
||||
"integrity": "sha512-aUk3bHfZ2bRSVFFbbeVS4i+lNPZr3/WM5jT2J5omUVV1zzcs1nAaf3l51ctA5FFvCRbhrH0bdAsRRQddFJZPtA==",
|
||||
"dev": true
|
||||
},
|
||||
"scheduler": {
|
||||
"version": "0.13.6",
|
||||
"resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.13.6.tgz",
|
||||
"integrity": "sha512-IWnObHt413ucAYKsD9J1QShUKkbKLQQHdxRyw73sw4FN26iWr3DY/H34xGPe4nmL1DwXyWmSWmMrA9TfQbE/XQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"loose-envify": "^1.1.0",
|
||||
"object-assign": "^4.1.1"
|
||||
"@fortawesome/fontawesome-common-types": "^0.2.19"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2342,17 +2298,6 @@
|
||||
"react-is": "^16.8.6"
|
||||
},
|
||||
"dependencies": {
|
||||
"prop-types": {
|
||||
"version": "15.7.2",
|
||||
"resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.7.2.tgz",
|
||||
"integrity": "sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"loose-envify": "^1.4.0",
|
||||
"object-assign": "^4.1.1",
|
||||
"react-is": "^16.8.1"
|
||||
}
|
||||
},
|
||||
"react-is": {
|
||||
"version": "16.8.6",
|
||||
"resolved": "https://registry.npmjs.org/react-is/-/react-is-16.8.6.tgz",
|
||||
@@ -4230,6 +4175,12 @@
|
||||
"integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=",
|
||||
"dev": true
|
||||
},
|
||||
"bootstrap": {
|
||||
"version": "4.3.1",
|
||||
"resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-4.3.1.tgz",
|
||||
"integrity": "sha512-rXqOmH1VilAt2DyPzluTi2blhk17bO7ef+zLLPlWvG494pDxcM234pJ8wTc/6R40UWizAIIMgxjvxZg5kmsbag==",
|
||||
"dev": true
|
||||
},
|
||||
"bottleneck": {
|
||||
"version": "2.15.0",
|
||||
"resolved": "https://registry.npmjs.org/bottleneck/-/bottleneck-2.15.0.tgz",
|
||||
@@ -11350,9 +11301,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"intl-format-cache": {
|
||||
"version": "2.2.6",
|
||||
"resolved": "https://registry.npmjs.org/intl-format-cache/-/intl-format-cache-2.2.6.tgz",
|
||||
"integrity": "sha512-8adofiGDGj6Zo9WswzRtQojtKDSLeiZz6r8dMnttM3MYwcqVhkBBvAJ0TxOHQol4VV5PFoFirMg5Xi43Y3AMIA==",
|
||||
"version": "2.2.9",
|
||||
"resolved": "https://registry.npmjs.org/intl-format-cache/-/intl-format-cache-2.2.9.tgz",
|
||||
"integrity": "sha512-Zv/u8wRpekckv0cLkwpVdABYST4hZNTDaX7reFetrYTJwxExR2VyTqQm+l0WmL0Qo8Mjb9Tf33qnfj0T7pjxdQ==",
|
||||
"dev": true
|
||||
},
|
||||
"intl-messageformat": {
|
||||
@@ -18227,9 +18178,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"postcss": {
|
||||
"version": "7.0.16",
|
||||
"resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.16.tgz",
|
||||
"integrity": "sha512-MOo8zNSlIqh22Uaa3drkdIAgUGEL+AD1ESiSdmElLUmE2uVDo1QloiT/IfW9qRw8Gw+Y/w69UVMGwbufMSftxA==",
|
||||
"version": "7.0.17",
|
||||
"resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.17.tgz",
|
||||
"integrity": "sha512-546ZowA+KZ3OasvQZHsbuEpysvwTZNGJv9EfyCQdsIDltPSWHAeTQ5fQy/Npi2ZDtLI3zs7Ps/p6wThErhm9fQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"chalk": "^2.4.2",
|
||||
@@ -20345,13 +20296,22 @@
|
||||
}
|
||||
},
|
||||
"prop-types": {
|
||||
"version": "15.6.2",
|
||||
"resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.6.2.tgz",
|
||||
"integrity": "sha512-3pboPvLiWD7dkI3qf3KbUe6hKFKa52w+AE0VCqECtf+QHAKgOL37tTaNCnuX1nAAQ4ZhyP+kYVKf8rLmJ/feDQ==",
|
||||
"version": "15.7.2",
|
||||
"resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.7.2.tgz",
|
||||
"integrity": "sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"loose-envify": "^1.3.1",
|
||||
"object-assign": "^4.1.1"
|
||||
"loose-envify": "^1.4.0",
|
||||
"object-assign": "^4.1.1",
|
||||
"react-is": "^16.8.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"react-is": {
|
||||
"version": "16.8.6",
|
||||
"resolved": "https://registry.npmjs.org/react-is/-/react-is-16.8.6.tgz",
|
||||
"integrity": "sha512-aUk3bHfZ2bRSVFFbbeVS4i+lNPZr3/WM5jT2J5omUVV1zzcs1nAaf3l51ctA5FFvCRbhrH0bdAsRRQddFJZPtA==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"prop-types-exact": {
|
||||
@@ -20609,15 +20569,27 @@
|
||||
}
|
||||
},
|
||||
"react": {
|
||||
"version": "16.7.0",
|
||||
"resolved": "https://registry.npmjs.org/react/-/react-16.7.0.tgz",
|
||||
"integrity": "sha512-StCz3QY8lxTb5cl2HJxjwLFOXPIFQp+p+hxQfc8WE0QiLfCtIlKj8/+5tjjKm8uSTlAW+fCPaavGFS06V9Ar3A==",
|
||||
"version": "16.8.6",
|
||||
"resolved": "https://registry.npmjs.org/react/-/react-16.8.6.tgz",
|
||||
"integrity": "sha512-pC0uMkhLaHm11ZSJULfOBqV4tIZkx87ZLvbbQYunNixAAvjnC+snJCg0XQXn9VIsttVsbZP/H/ewzgsd5fxKXw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"loose-envify": "^1.1.0",
|
||||
"object-assign": "^4.1.1",
|
||||
"prop-types": "^15.6.2",
|
||||
"scheduler": "^0.12.0"
|
||||
"scheduler": "^0.13.6"
|
||||
},
|
||||
"dependencies": {
|
||||
"scheduler": {
|
||||
"version": "0.13.6",
|
||||
"resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.13.6.tgz",
|
||||
"integrity": "sha512-IWnObHt413ucAYKsD9J1QShUKkbKLQQHdxRyw73sw4FN26iWr3DY/H34xGPe4nmL1DwXyWmSWmMrA9TfQbE/XQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"loose-envify": "^1.1.0",
|
||||
"object-assign": "^4.1.1"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"react-dev-utils": {
|
||||
@@ -20856,15 +20828,27 @@
|
||||
}
|
||||
},
|
||||
"react-dom": {
|
||||
"version": "16.7.0",
|
||||
"resolved": "https://registry.npmjs.org/react-dom/-/react-dom-16.7.0.tgz",
|
||||
"integrity": "sha512-D0Ufv1ExCAmF38P2Uh1lwpminZFRXEINJe53zRAbm4KPwSyd6DY/uDoS0Blj9jvPpn1+wivKpZYc8aAAN/nAkg==",
|
||||
"version": "16.8.6",
|
||||
"resolved": "https://registry.npmjs.org/react-dom/-/react-dom-16.8.6.tgz",
|
||||
"integrity": "sha512-1nL7PIq9LTL3fthPqwkvr2zY7phIPjYrT0jp4HjyEQrEROnw4dG41VVwi/wfoCneoleqrNX7iAD+pXebJZwrwA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"loose-envify": "^1.1.0",
|
||||
"object-assign": "^4.1.1",
|
||||
"prop-types": "^15.6.2",
|
||||
"scheduler": "^0.12.0"
|
||||
"scheduler": "^0.13.6"
|
||||
},
|
||||
"dependencies": {
|
||||
"scheduler": {
|
||||
"version": "0.13.6",
|
||||
"resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.13.6.tgz",
|
||||
"integrity": "sha512-IWnObHt413ucAYKsD9J1QShUKkbKLQQHdxRyw73sw4FN26iWr3DY/H34xGPe4nmL1DwXyWmSWmMrA9TfQbE/XQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"loose-envify": "^1.1.0",
|
||||
"object-assign": "^4.1.1"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"react-error-overlay": {
|
||||
@@ -20922,14 +20906,32 @@
|
||||
}
|
||||
},
|
||||
"react-transition-group": {
|
||||
"version": "4.0.1",
|
||||
"resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-4.0.1.tgz",
|
||||
"integrity": "sha512-SsLcBYhO4afXJC9esL8XMxi/y0ZvEc7To0TvtrBELqzpjXQHPZOTxvuPh2/4EhYc0uSMfp2SExIxsyJ0pBdNzg==",
|
||||
"version": "4.2.1",
|
||||
"resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-4.2.1.tgz",
|
||||
"integrity": "sha512-IXrPr93VzCPupwm2O6n6C2kJIofJ/Rp5Ltihhm9UfE8lkuVX2ng/SUUl/oWjblybK9Fq2Io7LGa6maVqPB762Q==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/runtime": "^7.4.5",
|
||||
"dom-helpers": "^3.4.0",
|
||||
"loose-envify": "^1.4.0",
|
||||
"prop-types": "^15.6.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/runtime": {
|
||||
"version": "7.5.0",
|
||||
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.5.0.tgz",
|
||||
"integrity": "sha512-2xsuyZ0R0RBFwjgae5NpXk8FcfH4qovj5cEM5VEeB7KXnKqzaisIu2HSV/mCEISolJJuR4wkViUGYujA8MH9tw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"regenerator-runtime": "^0.13.2"
|
||||
}
|
||||
},
|
||||
"regenerator-runtime": {
|
||||
"version": "0.13.2",
|
||||
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.2.tgz",
|
||||
"integrity": "sha512-S/TQAZJO+D3m9xeN1WTI8dLKBBiRgXBlTJvbWjCThHWZj9EvHK70Ff50/tYj2J/fvBY6JtFVwRuazHN2E7M9BA==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"reactifex": {
|
||||
|
||||
15
package.json
15
package.json
@@ -40,9 +40,10 @@
|
||||
"@commitlint/config-angular": "^6.0.2",
|
||||
"@commitlint/prompt": "^6.0.2",
|
||||
"@commitlint/prompt-cli": "^6.0.2",
|
||||
"@edx/frontend-i18n": "^1.0.4",
|
||||
"@edx/edx-bootstrap": "^2.2.1",
|
||||
"@edx/frontend-i18n": "^2.1.0",
|
||||
"@edx/frontend-logging": "^2.0.2",
|
||||
"@edx/paragon": "^4.2.4",
|
||||
"@edx/paragon": "^6.1.0",
|
||||
"@fortawesome/fontawesome-svg-core": "^1.2.17",
|
||||
"@fortawesome/free-brands-svg-icons": "^5.8.1",
|
||||
"@fortawesome/free-regular-svg-icons": "^5.8.1",
|
||||
@@ -72,10 +73,10 @@
|
||||
"image-webpack-loader": "^4.2.0",
|
||||
"jest": "23.6.0",
|
||||
"node-sass": "^4.7.2",
|
||||
"prop-types": "^15.5.10",
|
||||
"react": "^16.4.2",
|
||||
"prop-types": "^15.7.2",
|
||||
"react": "^16.8.6",
|
||||
"react-dev-utils": "^5.0.0",
|
||||
"react-dom": "^16.2.0",
|
||||
"react-dom": "^16.8.6",
|
||||
"react-test-renderer": "^16.6.0",
|
||||
"reactifex": "^1.1.1",
|
||||
"sass-loader": "^6.0.6",
|
||||
@@ -93,9 +94,9 @@
|
||||
"query-string": "^5.1.1"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@edx/frontend-i18n": "^1.0.4",
|
||||
"@edx/frontend-i18n": "^2.1.0",
|
||||
"@edx/frontend-logging": "^2.0.2",
|
||||
"@edx/paragon": "^4.2.4",
|
||||
"@edx/paragon": "^6.1.0",
|
||||
"prop-types": "^15.5.10",
|
||||
"react": "^16.4.2",
|
||||
"react-dom": "^16.2.0"
|
||||
|
||||
@@ -1,65 +0,0 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
/**
|
||||
* See the Makefile for how the required hash file is downloaded from Transifex.
|
||||
*/
|
||||
|
||||
// NOTE: This script is called from Jenkins using devDependencies, so eslint is being
|
||||
// disabled so it doesn't force you to make these real dependencies.
|
||||
const fs = require('fs'); // eslint-disable-line import/no-extraneous-dependencies
|
||||
const glob = require('glob'); // eslint-disable-line import/no-extraneous-dependencies
|
||||
const path = require('path'); // eslint-disable-line import/no-extraneous-dependencies
|
||||
|
||||
// Expected input: a directory, possibly containing subdirectories, with .json files. Each .json
|
||||
// file is an array of translation triplets (id, description, defaultMessage).
|
||||
function gatherJson(dir) {
|
||||
const ret = [];
|
||||
const files = glob.sync(`${dir}/**/*.json`);
|
||||
|
||||
files.forEach((filename) => {
|
||||
const messages = JSON.parse(fs.readFileSync(filename));
|
||||
ret.push(...messages);
|
||||
});
|
||||
return ret;
|
||||
}
|
||||
|
||||
// the hash file returns ids whose periods are "escaped" (sort of), like this:
|
||||
// "key": "profile\\.sociallinks\\.social\\.links"
|
||||
// so our regular messageIds won't match them out of the box
|
||||
function escapeDots(messageId) {
|
||||
return messageId.replace(/\./g, '\\.');
|
||||
}
|
||||
|
||||
const jsonDir = process.argv[2];
|
||||
const messageObjects = gatherJson(jsonDir);
|
||||
|
||||
if (process.argv[3] === '--comments') { // prepare to handle the translator notes
|
||||
const loggingPrefix = path.basename(`${__filename}`); // the name of this JS file
|
||||
const bashScriptsPath = './node_modules/reactifex/bash_scripts';
|
||||
|
||||
const hashFile = `${bashScriptsPath}/hashmap.json`;
|
||||
process.stdout.write(`${loggingPrefix}: reading hash file ${hashFile}\n`);
|
||||
const messageInfo = JSON.parse(fs.readFileSync(hashFile));
|
||||
|
||||
const outputFile = `${bashScriptsPath}/hashed_data.txt`;
|
||||
process.stdout.write(`${loggingPrefix}: writing to output file ${outputFile}\n`);
|
||||
fs.writeFileSync(outputFile, '');
|
||||
|
||||
messageObjects.forEach((message) => {
|
||||
const transifexFormatId = escapeDots(message.id);
|
||||
|
||||
const info = messageInfo.find(mi => mi.key === transifexFormatId);
|
||||
if (info) {
|
||||
fs.appendFileSync(outputFile, `${info.string_hash}|${message.description}\n`);
|
||||
} else {
|
||||
process.stdout.write(`${loggingPrefix}: string ${message.id} does not yet exist on transifex!\n`);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
const output = {};
|
||||
|
||||
messageObjects.forEach((message) => {
|
||||
output[message.id] = message.defaultMessage;
|
||||
});
|
||||
fs.writeFileSync(process.argv[3], JSON.stringify(output, null, 2));
|
||||
}
|
||||
32
src/i18n/index.js
Normal file
32
src/i18n/index.js
Normal file
@@ -0,0 +1,32 @@
|
||||
import arMessages from './messages/ar.json';
|
||||
import caMessages from './messages/ca.json';
|
||||
// no need to import en messages-- they are in the defaultMessage field
|
||||
import es419Messages from './messages/es_419.json';
|
||||
import frMessages from './messages/fr.json';
|
||||
import zhcnMessages from './messages/zh_CN.json';
|
||||
import heMessages from './messages/he.json';
|
||||
import idMessages from './messages/id.json';
|
||||
import kokrMessages from './messages/ko_kr.json';
|
||||
import plMessages from './messages/pl.json';
|
||||
import ptbrMessages from './messages/pt_br.json';
|
||||
import ruMessages from './messages/ru.json';
|
||||
import thMessages from './messages/th.json';
|
||||
import ukMessages from './messages/uk.json';
|
||||
|
||||
const messages = {
|
||||
ar: arMessages,
|
||||
'es-419': es419Messages,
|
||||
fr: frMessages,
|
||||
'zh-cn': zhcnMessages,
|
||||
ca: caMessages,
|
||||
he: heMessages,
|
||||
id: idMessages,
|
||||
'ko-kr': kokrMessages,
|
||||
pl: plMessages,
|
||||
'pt-br': ptbrMessages,
|
||||
ru: ruMessages,
|
||||
th: thMessages,
|
||||
uk: ukMessages,
|
||||
};
|
||||
|
||||
export default messages;
|
||||
@@ -1,39 +1 @@
|
||||
{
|
||||
"footer.site-footer.link.business": "{siteName} for Business",
|
||||
"footer.site-footer.link.about": "About",
|
||||
"footer.site-footer.link.affiliates": "Affiliates",
|
||||
"footer.site-footer.link.open-source": "Open {siteName}",
|
||||
"footer.site-footer.link.careers": "Careers",
|
||||
"footer.site-footer.link.news": "News",
|
||||
"footer.site-footer.link.header.legal": "Legal",
|
||||
"footer.site-footer.link.terms-of-service": "Terms of Service & Honor Code",
|
||||
"footer.site-footer.link.privacy": "Privacy Policy",
|
||||
"footer.site-footer.link.accessibility": "Accessibility Policy",
|
||||
"footer.site-footer.link.trademark": "Trademark Policy",
|
||||
"footer.site-footer.link.sitemap": "Sitemap",
|
||||
"footer.site-footer.link.header.connect": "Connect",
|
||||
"footer.site-footer.link.blog": "Blog",
|
||||
"footer.site-footer.link.contact-us": "Contact Us",
|
||||
"footer.site-footer.link.help-center": "Help Center",
|
||||
"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.site-logo.alt-text": "{siteName} logo",
|
||||
"footer.site-footer.site-logo.aria-label": "{siteName} Home",
|
||||
"footer.site-footer.facebook.title": "Facebook",
|
||||
"footer.site-footer.facebook.screen-reader-text": "Like {siteName} on Facebook",
|
||||
"footer.site-footer.twitter.title": "Twitter",
|
||||
"footer.site-footer.twitter.screen-reader-text": "Follow {siteName} on Twitter",
|
||||
"footer.site-footer.youtube.title": "Youtube",
|
||||
"footer.site-footer.youtube.screen-reader-text": "Subscribe to the {siteName} YouTube channel",
|
||||
"footer.site-footer.linkedin.title": "LinkedIn",
|
||||
"footer.site-footer.linkedin.screen-reader-text": "Follow {siteName} on LinkedIn",
|
||||
"footer.site-footer.google-plus.title": "Google+",
|
||||
"footer.site-footer.google-plus.screen-reader-text": "Follow {siteName} on Google+",
|
||||
"footer.site-footer.reddit.title": "Reddit",
|
||||
"footer.site-footer.reddit.screen-reader-text": "Subscribe to the {siteName} subreddit",
|
||||
"footer.site-footer.apple-app-store.alt-text": "Download the {siteName} mobile app from the Apple App Store",
|
||||
"footer.site-footer.google-play.alt-text": "Download the {siteName} mobile app from Google Play",
|
||||
"footer.site-footer.footer.aria-label": "Page Footer"
|
||||
}
|
||||
{}
|
||||
1
src/i18n/messages/ca.json
Normal file
1
src/i18n/messages/ca.json
Normal file
@@ -0,0 +1 @@
|
||||
{}
|
||||
@@ -1,39 +1 @@
|
||||
{
|
||||
"footer.site-footer.link.business": "{siteName} for Business",
|
||||
"footer.site-footer.link.about": "About",
|
||||
"footer.site-footer.link.affiliates": "Affiliates",
|
||||
"footer.site-footer.link.open-source": "Open {siteName}",
|
||||
"footer.site-footer.link.careers": "Careers",
|
||||
"footer.site-footer.link.news": "News",
|
||||
"footer.site-footer.link.header.legal": "Legal",
|
||||
"footer.site-footer.link.terms-of-service": "Terms of Service & Honor Code",
|
||||
"footer.site-footer.link.privacy": "Privacy Policy",
|
||||
"footer.site-footer.link.accessibility": "Accessibility Policy",
|
||||
"footer.site-footer.link.trademark": "Trademark Policy",
|
||||
"footer.site-footer.link.sitemap": "Sitemap",
|
||||
"footer.site-footer.link.header.connect": "Connect",
|
||||
"footer.site-footer.link.blog": "Blog",
|
||||
"footer.site-footer.link.contact-us": "Contact Us",
|
||||
"footer.site-footer.link.help-center": "Help Center",
|
||||
"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.site-logo.alt-text": "{siteName} logo",
|
||||
"footer.site-footer.site-logo.aria-label": "{siteName} Home",
|
||||
"footer.site-footer.facebook.title": "Facebook",
|
||||
"footer.site-footer.facebook.screen-reader-text": "Like {siteName} on Facebook",
|
||||
"footer.site-footer.twitter.title": "Twitter",
|
||||
"footer.site-footer.twitter.screen-reader-text": "Follow {siteName} on Twitter",
|
||||
"footer.site-footer.youtube.title": "Youtube",
|
||||
"footer.site-footer.youtube.screen-reader-text": "Subscribe to the {siteName} YouTube channel",
|
||||
"footer.site-footer.linkedin.title": "LinkedIn",
|
||||
"footer.site-footer.linkedin.screen-reader-text": "Follow {siteName} on LinkedIn",
|
||||
"footer.site-footer.google-plus.title": "Google+",
|
||||
"footer.site-footer.google-plus.screen-reader-text": "Follow {siteName} on Google+",
|
||||
"footer.site-footer.reddit.title": "Reddit",
|
||||
"footer.site-footer.reddit.screen-reader-text": "Subscribe to the {siteName} subreddit",
|
||||
"footer.site-footer.apple-app-store.alt-text": "Download the {siteName} mobile app from the Apple App Store",
|
||||
"footer.site-footer.google-play.alt-text": "Download the {siteName} mobile app from Google Play",
|
||||
"footer.site-footer.footer.aria-label": "Page Footer"
|
||||
}
|
||||
{}
|
||||
@@ -1,39 +1 @@
|
||||
{
|
||||
"footer.site-footer.link.business": "{siteName} for Business",
|
||||
"footer.site-footer.link.about": "About",
|
||||
"footer.site-footer.link.affiliates": "Affiliates",
|
||||
"footer.site-footer.link.open-source": "Open {siteName}",
|
||||
"footer.site-footer.link.careers": "Careers",
|
||||
"footer.site-footer.link.news": "News",
|
||||
"footer.site-footer.link.header.legal": "Legal",
|
||||
"footer.site-footer.link.terms-of-service": "Terms of Service & Honor Code",
|
||||
"footer.site-footer.link.privacy": "Privacy Policy",
|
||||
"footer.site-footer.link.accessibility": "Accessibility Policy",
|
||||
"footer.site-footer.link.trademark": "Trademark Policy",
|
||||
"footer.site-footer.link.sitemap": "Sitemap",
|
||||
"footer.site-footer.link.header.connect": "Connect",
|
||||
"footer.site-footer.link.blog": "Blog",
|
||||
"footer.site-footer.link.contact-us": "Contact Us",
|
||||
"footer.site-footer.link.help-center": "Help Center",
|
||||
"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.site-logo.alt-text": "{siteName} logo",
|
||||
"footer.site-footer.site-logo.aria-label": "{siteName} Home",
|
||||
"footer.site-footer.facebook.title": "Facebook",
|
||||
"footer.site-footer.facebook.screen-reader-text": "Like {siteName} on Facebook",
|
||||
"footer.site-footer.twitter.title": "Twitter",
|
||||
"footer.site-footer.twitter.screen-reader-text": "Follow {siteName} on Twitter",
|
||||
"footer.site-footer.youtube.title": "Youtube",
|
||||
"footer.site-footer.youtube.screen-reader-text": "Subscribe to the {siteName} YouTube channel",
|
||||
"footer.site-footer.linkedin.title": "LinkedIn",
|
||||
"footer.site-footer.linkedin.screen-reader-text": "Follow {siteName} on LinkedIn",
|
||||
"footer.site-footer.google-plus.title": "Google+",
|
||||
"footer.site-footer.google-plus.screen-reader-text": "Follow {siteName} on Google+",
|
||||
"footer.site-footer.reddit.title": "Reddit",
|
||||
"footer.site-footer.reddit.screen-reader-text": "Subscribe to the {siteName} subreddit",
|
||||
"footer.site-footer.apple-app-store.alt-text": "Download the {siteName} mobile app from the Apple App Store",
|
||||
"footer.site-footer.google-play.alt-text": "Download the {siteName} mobile app from Google Play",
|
||||
"footer.site-footer.footer.aria-label": "Page Footer"
|
||||
}
|
||||
{}
|
||||
1
src/i18n/messages/he.json
Normal file
1
src/i18n/messages/he.json
Normal file
@@ -0,0 +1 @@
|
||||
{}
|
||||
1
src/i18n/messages/id.json
Normal file
1
src/i18n/messages/id.json
Normal file
@@ -0,0 +1 @@
|
||||
{}
|
||||
1
src/i18n/messages/ko_kr.json
Normal file
1
src/i18n/messages/ko_kr.json
Normal file
@@ -0,0 +1 @@
|
||||
{}
|
||||
1
src/i18n/messages/pl.json
Normal file
1
src/i18n/messages/pl.json
Normal file
@@ -0,0 +1 @@
|
||||
{}
|
||||
1
src/i18n/messages/pt_br.json
Normal file
1
src/i18n/messages/pt_br.json
Normal file
@@ -0,0 +1 @@
|
||||
{}
|
||||
1
src/i18n/messages/ru.json
Normal file
1
src/i18n/messages/ru.json
Normal file
@@ -0,0 +1 @@
|
||||
{}
|
||||
1
src/i18n/messages/th.json
Normal file
1
src/i18n/messages/th.json
Normal file
@@ -0,0 +1 @@
|
||||
{}
|
||||
1
src/i18n/messages/uk.json
Normal file
1
src/i18n/messages/uk.json
Normal file
@@ -0,0 +1 @@
|
||||
{}
|
||||
@@ -1,39 +1 @@
|
||||
{
|
||||
"footer.site-footer.link.business": "商用{siteName} ",
|
||||
"footer.site-footer.link.about": "关于",
|
||||
"footer.site-footer.link.affiliates": "附属机构",
|
||||
"footer.site-footer.link.open-source": "打开{siteName}",
|
||||
"footer.site-footer.link.careers": "招才纳贤",
|
||||
"footer.site-footer.link.news": "新闻",
|
||||
"footer.site-footer.link.header.legal": "法律条款",
|
||||
"footer.site-footer.link.terms-of-service": "服务条款 & 荣誉准则",
|
||||
"footer.site-footer.link.privacy": "隐私政策",
|
||||
"footer.site-footer.link.accessibility": "可访问策略",
|
||||
"footer.site-footer.link.trademark": "商标政策",
|
||||
"footer.site-footer.link.sitemap": "网站导航",
|
||||
"footer.site-footer.link.header.connect": "连接",
|
||||
"footer.site-footer.link.blog": "博客",
|
||||
"footer.site-footer.link.contact-us": "联系我们",
|
||||
"footer.site-footer.link.help-center": "帮助中心",
|
||||
"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.site-logo.alt-text": "{siteName} logo",
|
||||
"footer.site-footer.site-logo.aria-label": "{siteName} 主页",
|
||||
"footer.site-footer.facebook.title": "脸书",
|
||||
"footer.site-footer.facebook.screen-reader-text": "在Facebook上为 {siteName}点赞",
|
||||
"footer.site-footer.twitter.title": "推特",
|
||||
"footer.site-footer.twitter.screen-reader-text": "在Twitter上关注 {siteName}",
|
||||
"footer.site-footer.youtube.title": "Youtube",
|
||||
"footer.site-footer.youtube.screen-reader-text": "订阅{siteName} YouTube频道",
|
||||
"footer.site-footer.linkedin.title": "LinkedIn",
|
||||
"footer.site-footer.linkedin.screen-reader-text": "在LinkedIn上关注{siteName}",
|
||||
"footer.site-footer.google-plus.title": "Google+",
|
||||
"footer.site-footer.google-plus.screen-reader-text": "在Google+上关注{siteName} ",
|
||||
"footer.site-footer.reddit.title": "Reddit",
|
||||
"footer.site-footer.reddit.screen-reader-text": "订阅{siteName} subreddit",
|
||||
"footer.site-footer.apple-app-store.alt-text": "从Apple App Store下载 {siteName} 的移动客户端",
|
||||
"footer.site-footer.google-play.alt-text": "从Google Play下载 {siteName} 的移动客户端",
|
||||
"footer.site-footer.footer.aria-label": "页脚"
|
||||
}
|
||||
{}
|
||||
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,4 +1,4 @@
|
||||
@import "~@edx/edx-bootstrap/sass/edx/theme";
|
||||
@import "~@edx/edx-bootstrap/scss/edx/theme";
|
||||
@import "~bootstrap/scss/bootstrap";
|
||||
|
||||
@import './lib/scss/_site-footer.scss';
|
||||
|
||||
@@ -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,11 @@ exports[`<SiteFooter /> renders correctly does not render language selector 1`]
|
||||
className="area-1"
|
||||
>
|
||||
<a
|
||||
aria-label="example Home"
|
||||
href="https://www.example.com/"
|
||||
onClick={[Function]}
|
||||
target="_self"
|
||||
aria-label="edX Home"
|
||||
href="https://www.example.com"
|
||||
>
|
||||
<img
|
||||
alt="example logo"
|
||||
alt="edx Logo"
|
||||
src="test-file-stub"
|
||||
/>
|
||||
</a>
|
||||
@@ -278,7 +26,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 +35,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 +79,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 +88,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 +125,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 +134,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 +170,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 +345,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 +359,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 +367,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 +394,11 @@ exports[`<SiteFooter /> renders correctly does not render mobile links 1`] = `
|
||||
className="area-1"
|
||||
>
|
||||
<a
|
||||
aria-label="example Home"
|
||||
href="https://www.example.com/"
|
||||
onClick={[Function]}
|
||||
target="_self"
|
||||
aria-label="edX Home"
|
||||
href="https://www.example.com"
|
||||
>
|
||||
<img
|
||||
alt="example logo"
|
||||
alt="edx Logo"
|
||||
src="test-file-stub"
|
||||
/>
|
||||
</a>
|
||||
@@ -586,7 +465,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 +474,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 +518,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 +527,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 +564,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 +573,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 +740,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 +774,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 +801,11 @@ exports[`<SiteFooter /> renders correctly does not render social links 1`] = `
|
||||
className="area-1"
|
||||
>
|
||||
<a
|
||||
aria-label="example Home"
|
||||
href="https://www.example.com/"
|
||||
onClick={[Function]}
|
||||
target="_self"
|
||||
aria-label="edX Home"
|
||||
href="https://www.example.com"
|
||||
>
|
||||
<img
|
||||
alt="example logo"
|
||||
alt="edx Logo"
|
||||
src="test-file-stub"
|
||||
/>
|
||||
</a>
|
||||
@@ -1058,7 +872,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 +881,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 +925,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 +934,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 +971,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 +980,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 +1027,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 +1041,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 +1049,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 +1076,11 @@ exports[`<SiteFooter /> renders correctly renders with social and mobile links 1
|
||||
className="area-1"
|
||||
>
|
||||
<a
|
||||
aria-label="example Home"
|
||||
href="https://www.example.com/"
|
||||
onClick={[Function]}
|
||||
target="_self"
|
||||
aria-label="edX Home"
|
||||
href="https://www.example.com"
|
||||
>
|
||||
<img
|
||||
alt="example logo"
|
||||
alt="edx Logo"
|
||||
src="test-file-stub"
|
||||
/>
|
||||
</a>
|
||||
@@ -1375,7 +1147,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 +1156,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 +1200,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 +1209,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 +1246,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 +1255,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 +1422,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 +1466,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 +1480,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 +1488,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,10 +1,7 @@
|
||||
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';
|
||||
import { Hyperlink } from '@edx/paragon';
|
||||
|
||||
const EVENT_NAMES = {
|
||||
FOOTER_LINK: 'edx.bi.footer.link',
|
||||
@@ -35,119 +32,110 @@ 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}>
|
||||
<Hyperlink destination={this.formatUrl(link)}>
|
||||
{link.title}
|
||||
</Hyperlink>
|
||||
</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}>
|
||||
<Hyperlink
|
||||
destination={appleAppStore.url}
|
||||
rel="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>
|
||||
</Hyperlink>
|
||||
</li>
|
||||
<li>
|
||||
<a href={googlePlayUrl} rel="noopener noreferrer" target="_blank" onClick={this.externalLinkClickHandler}>
|
||||
<Hyperlink
|
||||
destination={googlePlay.url}
|
||||
rel="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>
|
||||
</Hyperlink>
|
||||
</li>
|
||||
</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}
|
||||
aria-label={siteLogo.ariaLabel}
|
||||
>
|
||||
<img src={siteLogo.src} alt={siteLogo.altText} />
|
||||
</Hyperlink>
|
||||
{showLanguageSelector &&
|
||||
<div className="i18n d-flex mt-2">
|
||||
<form
|
||||
@@ -173,195 +161,33 @@ 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">
|
||||
{socialLinks.map(link => (
|
||||
<li key={link.url}>
|
||||
<a
|
||||
href={link.url}
|
||||
<Hyperlink
|
||||
destination={link.url}
|
||||
title={link.title}
|
||||
rel="noopener noreferrer"
|
||||
rel="noreferrer"
|
||||
target="_blank"
|
||||
onClick={this.externalLinkClickHandler}
|
||||
>
|
||||
{link.icon}
|
||||
<span className="sr-only">{link.screenReaderText}</span>
|
||||
</a>
|
||||
</Hyperlink>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
}
|
||||
{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 +196,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 +223,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 +242,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