mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-26 17:16:11 -05:00
Merge pull request #2478 from picklesrus/educator-links
Add proper links to cards and guides instead of hard coding them.
This commit is contained in:
commit
96bc439ab0
2 changed files with 30 additions and 5 deletions
4
src/views/teachers/landing/l10n-static.json
Normal file
4
src/views/teachers/landing/l10n-static.json
Normal file
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"cards.scratch-cards-allLink": "https://resources.scratch.mit.edu/www/cards/en/scratch-cards-all.pdf",
|
||||
"guides.EducatorGuidesAllLink": "https://resources.scratch.mit.edu/www/guides/en/EducatorGuidesAll.pdf"
|
||||
}
|
|
@ -1,5 +1,8 @@
|
|||
const FormattedHTMLMessage = require('react-intl').FormattedHTMLMessage;
|
||||
const FormattedMessage = require('react-intl').FormattedMessage;
|
||||
const injectIntl = require('react-intl').injectIntl;
|
||||
const intlShape = require('react-intl').intlShape;
|
||||
|
||||
const React = require('react');
|
||||
|
||||
const FlexRow = require('../../../components/flex-row/flex-row.jsx');
|
||||
|
@ -11,7 +14,8 @@ const render = require('../../../lib/render.jsx');
|
|||
|
||||
require('./landing.scss');
|
||||
|
||||
const Landing = () => (
|
||||
const Landing = props => (
|
||||
|
||||
<div className="educators">
|
||||
<TitleBanner className="masthead">
|
||||
<div className="inner">
|
||||
|
@ -73,7 +77,11 @@ const Landing = () => (
|
|||
id="teacherlanding.educatorGuides"
|
||||
values={{
|
||||
educatorLink: (
|
||||
<a href="https://resources.scratch.mit.edu/www/guides/en/EducatorGuidesAll.pdf">
|
||||
<a
|
||||
href={props.intl.formatMessage({
|
||||
id: 'guides.EducatorGuidesAllLink'
|
||||
})}
|
||||
>
|
||||
<FormattedMessage id="teacherlanding.educatorGuideLinkText" />
|
||||
</a>
|
||||
)
|
||||
|
@ -122,7 +130,11 @@ const Landing = () => (
|
|||
</p>
|
||||
</div>
|
||||
<div>
|
||||
<a href="/www/cards/en/ScratchCardsAll.pdf">
|
||||
<a
|
||||
href={props.intl.formatMessage({
|
||||
id: 'cards.scratch-cards-allLink'
|
||||
})}
|
||||
>
|
||||
<img
|
||||
alt="cards icon"
|
||||
src="/svgs/teachers/coding-cards-icon.svg"
|
||||
|
@ -133,7 +145,11 @@ const Landing = () => (
|
|||
id="teacherlanding.codingCardResources"
|
||||
values={{
|
||||
codingCardLink: (
|
||||
<a href="https://resources.scratch.mit.edu/www/cards/en/ScratchCardsAll.pdf">
|
||||
<a
|
||||
href={props.intl.formatMessage({
|
||||
id: 'cards.scratch-cards-allLink'
|
||||
})}
|
||||
>
|
||||
<FormattedMessage id="teacherlanding.codingCardLink" />
|
||||
</a>
|
||||
)
|
||||
|
@ -304,4 +320,9 @@ const Landing = () => (
|
|||
</div>
|
||||
);
|
||||
|
||||
render(<Page><Landing /></Page>, document.getElementById('app'));
|
||||
Landing.propTypes = {
|
||||
intl: intlShape
|
||||
};
|
||||
const WrappedLanding = injectIntl(Landing);
|
||||
|
||||
render(<Page><WrappedLanding /></Page>, document.getElementById('app'));
|
||||
|
|
Loading…
Reference in a new issue