Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
scratch-www
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
scratch-www
Commits
52ae6f79
Unverified
Commit
52ae6f79
authored
Dec 04, 2019
by
picklesrus
Committed by
GitHub
Dec 04, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3583 from picklesrus/footer-stuff
Add recognition text and links to the bottom of the page.
parents
8d11d2a3
b89fe1a9
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
117 additions
and
4 deletions
+117
-4
src/components/page/www/donor-recognition.jsx
src/components/page/www/donor-recognition.jsx
+36
-0
src/components/page/www/donor-recognition.scss
src/components/page/www/donor-recognition.scss
+38
-0
src/components/page/www/page.jsx
src/components/page/www/page.jsx
+10
-2
src/l10n.json
src/l10n.json
+3
-0
src/views/credits/credits.jsx
src/views/credits/credits.jsx
+4
-1
src/views/splash/splash.jsx
src/views/splash/splash.jsx
+5
-1
test/unit/components/page.test.jsx
test/unit/components/page.test.jsx
+21
-0
No files found.
src/components/page/www/donor-recognition.jsx
0 → 100644
View file @
52ae6f79
const
FormattedMessage
=
require
(
'
react-intl
'
).
FormattedMessage
;
const
injectIntl
=
require
(
'
react-intl
'
).
injectIntl
;
const
React
=
require
(
'
react
'
);
require
(
'
./donor-recognition.scss
'
);
const
DonorRecognition
=
()
=>
(
<
div
id=
"donor-text"
>
<
div
>
<
FormattedMessage
id=
"footer.donorRecognition"
values=
{
{
donorLink
:
(
<
a
href=
"/credits#donors"
>
<
FormattedMessage
id=
"footer.donors"
/>
</
a
>
)
}
}
/>
</
div
>
<
div
>
<
FormattedMessage
id=
"footer.donorList"
values=
{
{
donor1
:
'
Massachusetts Institue of Technology
'
,
donor2
:
'
National Science Foundation
'
,
donor3
:
'
Siegel Family Endowment
'
}
}
/>
</
div
>
</
div
>
);
module
.
exports
=
injectIntl
(
DonorRecognition
);
src/components/page/www/donor-recognition.scss
0 → 100644
View file @
52ae6f79
@import
"../../../colors"
;
@import
"../../../frameless"
;
#donor
{
color
:
$type-gray
;
font-size
:
.875rem
;
line-height
:
1
.5em
;
background-color
:
$ui-gray
;
padding-bottom
:
2
.5rem
;
padding-top
:
1rem
;
#donor-text
{
text-align
:
center
;
width
:
$cols12
;
margin
:
0
auto
;
}
}
@media
only
screen
and
(
min-width
:
$tabletPortrait
)
and
(
max-width
:
$desktop
)
{
#donor
{
#donor-text
{
width
:
$cols11
;
}
}
}
@media
only
screen
and
(
min-width
:
$mobile
)
and
(
max-width
:
$tabletPortrait
)
{
#donor
{
#donor-text
{
width
:
$cols6
;
}
}
}
@media
only
screen
and
(
max-width
:
$mobile
)
{
#donor
{
#donor-text
{
width
:
$cols4
;
}
}
}
src/components/page/www/page.jsx
View file @
52ae6f79
...
@@ -4,11 +4,13 @@ const React = require('react');
...
@@ -4,11 +4,13 @@ const React = require('react');
const
Navigation
=
require
(
'
../../navigation/www/navigation.jsx
'
);
const
Navigation
=
require
(
'
../../navigation/www/navigation.jsx
'
);
const
Footer
=
require
(
'
../../footer/www/footer.jsx
'
);
const
Footer
=
require
(
'
../../footer/www/footer.jsx
'
);
const
DonorRecognition
=
require
(
'
./donor-recognition.jsx
'
);
const
ErrorBoundary
=
require
(
'
../../errorboundary/errorboundary.jsx
'
);
const
ErrorBoundary
=
require
(
'
../../errorboundary/errorboundary.jsx
'
);
const
Page
=
({
const
Page
=
({
children
,
children
,
className
className
,
showDonorRecognition
})
=>
(
})
=>
(
<
ErrorBoundary
componentName=
"Page"
>
<
ErrorBoundary
componentName=
"Page"
>
<
div
className=
{
classNames
(
'
page
'
,
className
)
}
>
<
div
className=
{
classNames
(
'
page
'
,
className
)
}
>
...
@@ -26,13 +28,19 @@ const Page = ({
...
@@ -26,13 +28,19 @@ const Page = ({
<
div
id=
"footer"
>
<
div
id=
"footer"
>
<
Footer
/>
<
Footer
/>
</
div
>
</
div
>
{
showDonorRecognition
&&
<
div
id=
"donor"
>
<
DonorRecognition
/>
</
div
>
}
</
div
>
</
div
>
</
ErrorBoundary
>
</
ErrorBoundary
>
);
);
Page
.
propTypes
=
{
Page
.
propTypes
=
{
children
:
PropTypes
.
node
,
children
:
PropTypes
.
node
,
className
:
PropTypes
.
string
className
:
PropTypes
.
string
,
showDonorRecognition
:
PropTypes
.
bool
};
};
module
.
exports
=
Page
;
module
.
exports
=
Page
;
src/l10n.json
View file @
52ae6f79
...
@@ -122,6 +122,9 @@
...
@@ -122,6 +122,9 @@
"footer.discuss"
:
"Discussion Forums"
,
"footer.discuss"
:
"Discussion Forums"
,
"footer.scratchFamily"
:
"Scratch Family"
,
"footer.scratchFamily"
:
"Scratch Family"
,
"footer.donorRecognition"
:
"Scratch is available for free, thanks to generous support from our {donorLink}. We are grateful to our Founding Partners:"
,
"footer.donors"
:
"donors"
,
"footer.donorList"
:
"{donor1}, {donor2}, and {donor3}"
,
"form.validationRequired"
:
"This field is required"
,
"form.validationRequired"
:
"This field is required"
,
...
...
src/views/credits/credits.jsx
View file @
52ae6f79
...
@@ -54,7 +54,10 @@ const Credits = () => (
...
@@ -54,7 +54,10 @@ const Credits = () => (
))
}
))
}
</
ul
>
</
ul
>
</
div
>
</
div
>
<
div
className=
"supporters"
>
<
div
className=
"supporters"
id=
"donors"
>
<
div
className=
"mid-header"
>
<
div
className=
"mid-header"
>
<
h2
>
<
h2
>
<
FormattedMessage
id=
"credits.currentSponsors"
/>
<
FormattedMessage
id=
"credits.currentSponsors"
/>
...
...
src/views/splash/splash.jsx
View file @
52ae6f79
...
@@ -271,7 +271,11 @@ const ConnectedSplash = connect(
...
@@ -271,7 +271,11 @@ const ConnectedSplash = connect(
)(
Splash
);
)(
Splash
);
render
(
render
(
<
Page
><
ConnectedSplash
/></
Page
>,
<
Page
showDonorRecognition
>
<
ConnectedSplash
/>
</
Page
>,
document
.
getElementById
(
'
app
'
),
document
.
getElementById
(
'
app
'
),
{
splash
:
splashActions
.
splashReducer
}
{
splash
:
splashActions
.
splashReducer
}
);
);
test/unit/components/page.test.jsx
0 → 100644
View file @
52ae6f79
const
React
=
require
(
'
react
'
);
const
{
shallowWithIntl
}
=
require
(
'
../../helpers/intl-helpers.jsx
'
);
const
Page
=
require
(
'
../../../src/components/page/www/page.jsx
'
);
describe
(
'
Page
'
,
()
=>
{
test
(
'
Do not show donor recognition
'
,
()
=>
{
const
component
=
shallowWithIntl
(
<
Page
/>
);
expect
(
component
.
find
(
'
#donor
'
)).
toHaveLength
(
0
);
});
test
(
'
Show donor recognition
'
,
()
=>
{
const
component
=
shallowWithIntl
(
<
Page
showDonorRecognition
/>
);
expect
(
component
.
find
(
'
#donor
'
)).
toHaveLength
(
1
);
});
});
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment