Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "Paused Banner" (Apr 2024) #780

Merged
merged 2 commits into from
Apr 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/components/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import AuthContainer from '../containers/AuthContainer';
import ClassifierContainer from '../containers/ClassifierContainer';
import Home from './Home';
import ProjectHeader from '../containers/ProjectHeader';
import AppBanner from './AppBanner';

class App extends React.Component {
componentWillMount() {
Expand All @@ -29,6 +30,7 @@ class App extends React.Component {
<header className="app-header">
<ZooHeader authContainer={<AuthContainer />} />
</header>
<AppBanner /> {/* Added 3 Apr 2024 */}
<section className="content-section">
<ProjectHeader location={this.props.location} />
<Switch>
Expand Down
36 changes: 36 additions & 0 deletions src/components/AppBanner.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import React from 'react';
import { connect } from 'react-redux';
import { getActiveLanguage } from 'react-localize-redux';
import PropTypes from 'prop-types';

const AppBanner = ({ currentLanguage }) => {
switch (currentLanguage) {
case 'he': return (
<div className="app-banner">
התמלול על פרויקט זה הושלם כעת. תודה על כל העזרה שלך! אנא עיין ב-<a href="https://www.zooniverse.org/about/publications">Zooniverse Publications Page</a> לתוצאות.
</div>
);
case 'ar': return (
<div className="app-banner">
اكتمل النسخ في هذا المشروع حاليًا. شكرا لكم على كل ما تبذلونه من مساعدة! يرجى الاطلاع على <a href="https://www.zooniverse.org/about/publications">Zooniverse Publications Page</a> للحصول على النتائج.
</div>
);
default: return (
<div className="app-banner">
Transcription on this project is currently complete. Thank you for all your help! Please see the <a href="https://www.zooniverse.org/about/publications">Zooniverse Publications Page</a> for results.
</div>
);
}
};

AppBanner.propTypes = {
currentLanguage: PropTypes.string.isRequired
};

AppBanner.defaultProps = {};

const mapStateToProps = state => ({
currentLanguage: getActiveLanguage(state.locale).code
});

export default connect(mapStateToProps)(AppBanner);
1 change: 0 additions & 1 deletion src/index.tpl.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,5 @@
</head>
<body>
<div id="root"></div>
<script src="https://ft-polyfill-service.herokuapp.com/v2/polyfill.min.js?features=default,es6,Array.prototype.includes,Array.prototype.keys"></script>
</body>
</html>
4 changes: 4 additions & 0 deletions src/styles/components/app-banner.styl
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.app-banner
padding: 0.5rem 3.5rem
background: $light-teal
text-align: center
Loading