2018-10-25 04:07:10 +02:00
|
|
|
const html = require('choo/html');
|
2018-11-12 20:13:31 +01:00
|
|
|
const Component = require('choo/component');
|
2018-10-25 04:07:10 +02:00
|
|
|
const version = require('../../package.json').version;
|
|
|
|
const { browserName } = require('../utils');
|
|
|
|
|
2018-11-12 20:13:31 +01:00
|
|
|
class Footer extends Component {
|
|
|
|
constructor(name, state) {
|
|
|
|
super(name);
|
|
|
|
this.state = state;
|
|
|
|
}
|
|
|
|
|
|
|
|
update() {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
createElement() {
|
|
|
|
const translate = this.state.translate;
|
|
|
|
const browser = browserName();
|
2019-03-01 18:05:26 +01:00
|
|
|
const feedbackUrl = `https://qsurvey.mozilla.com/s3/Firefox-Send-Product-Feedback?ver=${version}&browser=${browser}`;
|
2018-11-12 20:13:31 +01:00
|
|
|
return html`
|
|
|
|
<footer
|
2019-05-03 18:26:10 +02:00
|
|
|
class="flex flex-col md:flex-row items-start w-full flex-none self-start p-6 md:p-8 font-medium text-xs text-grey-dark md:items-center justify-between"
|
2018-11-12 20:13:31 +01:00
|
|
|
>
|
|
|
|
<a
|
|
|
|
class="mozilla-logo pb-10 md:pb-0 m-2"
|
|
|
|
href="https://www.mozilla.org/"
|
|
|
|
>
|
|
|
|
Mozilla
|
|
|
|
</a>
|
|
|
|
<ul
|
2019-06-14 20:30:43 +02:00
|
|
|
class="flex flex-col md:flex-row items-start md:items-center md:justify-end"
|
2018-11-12 20:13:31 +01:00
|
|
|
>
|
|
|
|
<li class="m-2">
|
2019-02-13 22:09:57 +01:00
|
|
|
<a href="https://www.mozilla.org/about/legal/terms/services/#send">
|
2018-11-12 20:13:31 +01:00
|
|
|
${translate('footerLinkLegal')}
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="m-2">
|
2019-02-13 22:09:57 +01:00
|
|
|
<a href="/legal"> ${translate('footerLinkPrivacy')} </a>
|
2018-11-12 20:13:31 +01:00
|
|
|
</li>
|
|
|
|
<li class="m-2">
|
|
|
|
<a href="https://www.mozilla.org/privacy/websites/#cookies">
|
|
|
|
${translate('footerLinkCookies')}
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="m-2">
|
|
|
|
<a href="https://github.com/mozilla/send">GitHub </a>
|
|
|
|
</li>
|
|
|
|
<li class="m-2">
|
|
|
|
<a
|
|
|
|
href="${feedbackUrl}"
|
|
|
|
rel="noreferrer noopener"
|
|
|
|
class="feedback-link"
|
|
|
|
alt="Feedback"
|
|
|
|
target="_blank"
|
|
|
|
>
|
|
|
|
${translate('siteFeedback')}
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</footer>
|
|
|
|
`;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
module.exports = Footer;
|