feat(banner-helloasso): add a banner helloasso

pull/73/head
Clement G 4 years ago committed by guhur
parent be4c3eb14f
commit 43e32502ce

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

@ -0,0 +1,17 @@
import React from 'react';
import i18n from '../../i18n'
const Helloasso = (props) => {
const locale=i18n.language.substring(0,2).toLowerCase()==="fr"?"fr":"en";
const linkHelloAssoBanner=(locale==="fr")?"https://www.helloasso.com/associations/mieux-voter/formulaires/1/widget":"https://www.helloasso.com/associations/mieux-voter/formulaires/1/widget/en";
return (
<a href={linkHelloAssoBanner} target="_blank" rel="noopener noreferrer">
<img src={"/banner/"+locale+"/helloasso.png"} style={{width:props.width}} />
</a>);
};
export default Helloasso;

@ -4,23 +4,29 @@ import { Link } from "react-router-dom";
import { FlagIcon } from '../flag'
import i18n from '../../i18n'
import Helloasso from "../banner/Helloasso";
class Footer extends Component {
constructor(props) {
super(props);
this.state = {};
this.state = {
};
}
render() {
const buttonStyle = {backgroundColor: "black", padding: "0px", border: "0px"};
const buttonStyle = {backgroundColor: "black", padding: "0px", border: "0px",};
const linkStyle = {whiteSpace: "nowrap"};
const {t} = this.props;
return (
<footer className="text-center">
<Link to="/">{t("Homepage")}</Link>
<Link to="/" style={linkStyle}>{t("Homepage")}</Link>
<span className="m-2">-</span>
<a href="https://github.com/MieuxVoter">{t("Source code")}</a>
<a href="https://github.com/MieuxVoter" style={linkStyle}>{t("Source code")}</a>
<span className="m-2">-</span>
<a href="https://mieuxvoter.fr/">{t("Who are we")}</a>
<a href="https://mieuxvoter.fr/" style={linkStyle} >{t("Who are we")}</a>
<span className="m-2">-</span>
<button style={buttonStyle} onClick={() => i18n.changeLanguage('en')}>
<FlagIcon code={"gb"} />
@ -33,7 +39,9 @@ class Footer extends Component {
<button style={buttonStyle} onClick={() => i18n.changeLanguage('es')}>
<FlagIcon code={"es"} />
</button>
<div className="mt-2">{t("BetterVote")} &copy;</div>
<div className="mt-3">
<Helloasso width="150px" />
</div>
</footer>
);
}

@ -4,6 +4,7 @@ import {withTranslation} from 'react-i18next';
import logoLine from "../../logos/logo-line-white.svg";
import { Link } from "react-router-dom";
import { AppContext } from "../../AppContext";
import Helloasso from "../banner/Helloasso";
class VoteSuccess extends Component {
static contextType = AppContext;
@ -20,6 +21,9 @@ class VoteSuccess extends Component {
<Col className="text-center offset-lg-3" lg="6">
<h2>{t("Your participation was recorded with success!")}</h2>
<p>{t("Thanks for your participation.")}</p>
<div className="mt-3">
<Helloasso width="60%" className="m-auto d-block" />
</div>
</Col>
</Row>

Loading…
Cancel
Save