-
Notifications
You must be signed in to change notification settings - Fork 398
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
225 additions
and
140 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import { compose } from 'redux'; | ||
|
||
import LanguagePicker from 'amo/components/LanguagePicker'; | ||
import translate from 'core/i18n/translate'; | ||
import Icon from 'ui/components/Icon'; | ||
|
||
import './styles.scss'; | ||
|
||
|
||
export class FooterBase extends React.Component { | ||
static propTypes = { | ||
handleViewDesktop: PropTypes.func.isRequired, | ||
i18n: PropTypes.object.isRequired, | ||
location: PropTypes.object.isRequired, | ||
} | ||
|
||
render() { | ||
const { handleViewDesktop, i18n, location } = this.props; | ||
const homepageText = i18n.gettext("Go to Mozilla's homepage"); | ||
|
||
return ( | ||
<footer className="Footer"> | ||
<div className="Footer-language-and-links"> | ||
<LanguagePicker location={location} | ||
ref={(ref) => { this.languagePicker = ref; }} /> | ||
<ul className="Footer-links"> | ||
<li> | ||
<a href="https://www.mozilla.org/privacy/websites/" | ||
className="Footer-link Footer-privacy"> | ||
{i18n.gettext('Privacy policy')} | ||
</a> | ||
</li> | ||
<li> | ||
<a href="https://www.mozilla.org/about/legal/" | ||
className="Footer-link Footer-legal"> | ||
{i18n.gettext('Legal notices')} | ||
</a> | ||
</li> | ||
<li> | ||
<a href="https://developer.mozilla.org/Add-ons/AMO/Policy/Contact" | ||
className="Footer-link Footer-fileissue"> | ||
{i18n.gettext('Report a bug')} | ||
</a> | ||
</li> | ||
<li> | ||
<a href="#desktop" className="Footer-link Footer-desktop" | ||
onClick={handleViewDesktop} | ||
ref={(ref) => { this.desktopLink = ref; }}> | ||
{i18n.gettext('View classic desktop site')} | ||
</a> | ||
</li> | ||
</ul> | ||
</div> | ||
|
||
<a | ||
className="Footer-mozilla-link" | ||
href={`https://mozilla.org/`} | ||
title={homepageText} | ||
> | ||
<Icon | ||
alt={homepageText} | ||
className="Footer-mozilla-logo" | ||
name="mozilla" | ||
/> | ||
</a> | ||
</footer> | ||
); | ||
} | ||
} | ||
|
||
export default compose( | ||
translate({ withRef: true }), | ||
)(FooterBase); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
@import "~core/css/inc/mixins"; | ||
@import "~amo/css/inc/vars"; | ||
@import "~ui/css/vars"; | ||
|
||
.Footer { | ||
background: $footer-base-color; | ||
color: $white; | ||
padding: 20px; | ||
|
||
@include respond-to(medium) { | ||
display: flex; | ||
justify-content: space-between; | ||
} | ||
} | ||
|
||
.Footer-language-and-links { | ||
max-width: 220px; | ||
width: 100%; | ||
} | ||
|
||
.Footer-links { | ||
list-style: none; | ||
margin: 20px 0 0; | ||
padding: 0; | ||
} | ||
|
||
.Footer-link, | ||
.Footer-link:link { | ||
color: $white; | ||
display: block; | ||
margin: 0 0 10px; | ||
text-decoration: none; | ||
|
||
&:active, | ||
&:hover { | ||
text-decoration: underline; | ||
} | ||
} | ||
|
||
.Footer-mozilla-link { | ||
display: inline-block; | ||
margin-top: 10px; | ||
|
||
@include respond-to(medium) { | ||
@include margin-end(10px); | ||
|
||
margin-top: auto; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.