Browse Source

feat(static-pages) : add views components (with lorem ipsum)

pull/73/head
Clement G 3 years ago
parent
commit
ad33191a4d
  1. 3
      public/locale/i18n/de/resource.json
  2. 3
      public/locale/i18n/en/resource.json
  3. 3
      public/locale/i18n/es/resource.json
  4. 3
      public/locale/i18n/fr/resource.json
  5. 3
      public/locale/i18n/ru/resource.json
  6. 7
      src/Routes.jsx
  7. 12
      src/components/layouts/Footer.jsx
  8. 79
      src/components/views/Faq.jsx
  9. 93
      src/components/views/LegalNotices.jsx
  10. 79
      src/components/views/PrivacyPolicy.jsx

3
public/locale/i18n/de/resource.json

@ -2,6 +2,9 @@
"Homepage": "Homepage",
"Source code": "Quellcode",
"Who are we?": "Wer wir sind?",
"Privacy policy": "Datenschutzerklärung",
"Legal notices": "Rechtliche Hinweise",
"FAQ": "FAQ",
"BetterVote": " BetterVote",
"Voting platform": "Wahlplattform",
"Majority Judgment": " Mehrheitswahl ",

3
public/locale/i18n/en/resource.json

@ -2,6 +2,9 @@
"Homepage": "Homepage",
"Source code": "Source code",
"Who are we?": "Who are we?",
"Privacy policy": "Privacy policy",
"Legal notices": "Legal notices",
"FAQ": "FAQ",
"BetterVote": "BetterVote",
"Voting platform": "Voting platform",
"Majority Judgment": "Majority Judgment",

3
public/locale/i18n/es/resource.json

@ -2,6 +2,9 @@
"Homepage": "Página de inicio",
"Source code": "Código fuente",
"Who are we": "Quiénes somos",
"Privacy policy": "Política de privacidad",
"Legal notices": "Avisos legales",
"FAQ": "FAQ",
"BetterVote": "VotarMejor",
"Voting platform": "Plataforma de votación",
"Majority Judgment": "Juicio Mayoritario",

3
public/locale/i18n/fr/resource.json

@ -2,6 +2,9 @@
"Homepage": "Accueil",
"Source code": "Code source",
"Who are we?": "Qui sommes-nous ?",
"Privacy policy": "Politique de confidentialité",
"Legal notices": "Mentions légales",
"FAQ": "FAQ",
"BetterVote": "MieuxVoter",
"Voting platform": "Plateforme de vote",
"Majority Judgment": "Jugement Majoritaire",

3
public/locale/i18n/ru/resource.json

@ -2,6 +2,9 @@
"Homepage": "Главная страница",
"Source code": "Исходный код",
"Who are we?": "Кто мы?",
"Privacy policy": "Политика конфиденциальности",
"Legal notices": "Официальные уведомления",
"FAQ": "ЧАСТО ЗАДАВАЕМЫЕ ВОПРОСЫ",
"BetterVote": "BetterVote",
"Voting platform": "Платформа голосования",
"Majority Judgment": "Решение Большинства",

7
src/Routes.jsx

@ -9,6 +9,10 @@ import UnknownView from "./components/views/UnknownView";
import UnknownElection from "./components/views/UnknownElection";
import CreateSuccess from "./components/views/CreateSuccess";
import VoteSuccess from "./components/views/VoteSuccess";
import LegalNotices from "./components/views/LegalNotices";
import PrivacyPolicy from "./components/views/PrivacyPolicy";
import Faq from "./components/views/Faq";
function Routes() {
return (
@ -32,6 +36,9 @@ function Routes() {
/>
<Route path="/vote-success/:slug" component={VoteSuccess} />
<Route path="/unknown-election/:slug" component={UnknownElection} />
<Route path="/legal-notices" component={LegalNotices} />
<Route path="/privacy-policy" component={PrivacyPolicy} />
<Route path="/faq" component={Faq} />
<Route component={UnknownView} />
</Switch>
</main>

12
src/components/layouts/Footer.jsx

@ -38,6 +38,18 @@ class Footer extends Component {
{t("Who are we?")}
</a>
</div>
<span className="m-2">-</span>
<Link to="/legal-notices" style={linkStyle}>
{t('Legal notices')}
</Link>
<span className="m-2">-</span>
<Link to="/privacy-policy" style={linkStyle}>
{t('Privacy policy')}
</Link>
<span className="m-2">-</span>
<Link to="/faq" style={linkStyle}>
{t('faq')}
</Link>
<div className="mt-3">
<Paypal btnColor="btn-primary" />
</div>

79
src/components/views/Faq.jsx

@ -0,0 +1,79 @@
/* eslint react/prop-types: 0 */
import React, { Component } from "react";
import { Col, Container, Row } from "reactstrap";
import logoLine from "../../logos/logo-line-white.svg";
import { Link } from "react-router-dom";
import { AppContext } from "../../AppContext";
import { withTranslation } from "react-i18next";
class Faq extends Component {
static contextType = AppContext;
constructor(props) {
super(props);
this.state = {};
}
render() {
const { t } = this.props;
return (
<Container>
<Row>
<Link to="/" className="d-block ml-auto mr-auto mb-4">
<img src={logoLine} alt="logo" height="128" />
</Link>
</Row>
<Row className="mt-4">
<Col className="text-center">
<h1>{t("FAQ")}</h1>
</Col>
</Row>
<Row className="mt-4">
<Col>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Suspendisse tristique eros dictum, tempor libero quis, tincidunt
velit. Vestibulum non diam rutrum nisl consequat pulvinar.
Phasellus fermentum, massa at pulvinar eleifend, tellus nibh
dictum nulla, et gravida lectus lacus a mauris. Nunc a augue eget
risus commodo blandit.
</p>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Suspendisse tristique eros dictum, tempor libero quis, tincidunt
velit. Vestibulum non diam rutrum nisl consequat pulvinar.
Phasellus fermentum, massa at pulvinar eleifend, tellus nibh
dictum nulla, et gravida lectus lacus a mauris. Nunc a augue eget
risus commodo blandit.
</p>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Suspendisse tristique eros dictum, tempor libero quis, tincidunt
velit. Vestibulum non diam rutrum nisl consequat pulvinar.
Phasellus fermentum, massa at pulvinar eleifend, tellus nibh
dictum nulla, et gravida lectus lacus a mauris. Nunc a augue eget
risus commodo blandit.
</p>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Suspendisse tristique eros dictum, tempor libero quis, tincidunt
velit. Vestibulum non diam rutrum nisl consequat pulvinar.
Phasellus fermentum, massa at pulvinar eleifend, tellus nibh
dictum nulla, et gravida lectus lacus a mauris. Nunc a augue eget
risus commodo blandit.
</p>
</Col>
</Row>
<Row className="mt-4">
<Col className="text-center">
<Link to="/" className="btn btn-secondary">
{t("Go back to homepage")}
</Link>
</Col>
</Row>
</Container>
);
}
}
export default withTranslation()(Faq);

93
src/components/views/LegalNotices.jsx

@ -0,0 +1,93 @@
/* eslint react/prop-types: 0 */
import React, { Component } from "react";
import { Col, Container, Row } from "reactstrap";
import logoLine from "../../logos/logo-line-white.svg";
import { Link } from "react-router-dom";
import { AppContext } from "../../AppContext";
import { withTranslation } from "react-i18next";
class LegalNotices extends Component {
static contextType = AppContext;
constructor(props) {
super(props);
this.state = {};
}
render() {
const { t } = this.props;
return (
<Container>
<Row>
<Link to="/" className="d-block ml-auto mr-auto mb-4">
<img src={logoLine} alt="logo" height="128" />
</Link>
</Row>
<Row className="mt-4">
<Col className="text-center">
<h1>{t("Legal notices")}</h1>
</Col>
</Row>
<Row className="mt-4">
<Col>
<h3 className="bold">Editeur du Site</h3>
<p>
Association MIEUX VOTER
<br />
59 Rue Saint-André des Arts, 75006 Paris
</p>
<p>
<a
href="https://mieuxvoter.fr/"
target="_blank"
rel="noopener noreferrer"
className="text-white"
>
https://mieuxvoter.fr/
</a>
</p>
<h3 className="mt-2 bold">Hébergement</h3>
<p>
Association MIEUX VOTER
<br />
59 Rue Saint-André des Arts, 75006 Paris
</p>
<p>
<a
href="https://mieuxvoter.fr/"
target="_blank"
rel="noopener noreferrer"
className="text-white"
>
https://mieuxvoter.fr/
</a>
</p>
<h3 className="mt-2 bold">Développement</h3>
<p>
Association MIEUX VOTER
<br />
59 Rue Saint-André des Arts, 75006 Paris
</p>
<p>
<a
href="https://mieuxvoter.fr/"
target="_blank"
rel="noopener noreferrer"
className="text-white"
>
https://mieuxvoter.fr/
</a>
</p>
</Col>
</Row>
<Row className="mt-4">
<Col className="text-center">
<Link to="/" className="btn btn-secondary">
{t("Go back to homepage")}
</Link>
</Col>
</Row>
</Container>
);
}
}
export default withTranslation()(LegalNotices);

79
src/components/views/PrivacyPolicy.jsx

@ -0,0 +1,79 @@
/* eslint react/prop-types: 0 */
import React, { Component } from "react";
import { Col, Container, Row } from "reactstrap";
import logoLine from "../../logos/logo-line-white.svg";
import { Link } from "react-router-dom";
import { AppContext } from "../../AppContext";
import { withTranslation } from "react-i18next";
class PrivacyPolicy extends Component {
static contextType = AppContext;
constructor(props) {
super(props);
this.state = {};
}
render() {
const { t } = this.props;
return (
<Container>
<Row>
<Link to="/" className="d-block ml-auto mr-auto mb-4">
<img src={logoLine} alt="logo" height="128" />
</Link>
</Row>
<Row className="mt-4">
<Col className="text-center">
<h1>{t("Privacy policy")}</h1>
</Col>
</Row>
<Row className="mt-4">
<Col>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Suspendisse tristique eros dictum, tempor libero quis, tincidunt
velit. Vestibulum non diam rutrum nisl consequat pulvinar.
Phasellus fermentum, massa at pulvinar eleifend, tellus nibh
dictum nulla, et gravida lectus lacus a mauris. Nunc a augue eget
risus commodo blandit.
</p>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Suspendisse tristique eros dictum, tempor libero quis, tincidunt
velit. Vestibulum non diam rutrum nisl consequat pulvinar.
Phasellus fermentum, massa at pulvinar eleifend, tellus nibh
dictum nulla, et gravida lectus lacus a mauris. Nunc a augue eget
risus commodo blandit.
</p>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Suspendisse tristique eros dictum, tempor libero quis, tincidunt
velit. Vestibulum non diam rutrum nisl consequat pulvinar.
Phasellus fermentum, massa at pulvinar eleifend, tellus nibh
dictum nulla, et gravida lectus lacus a mauris. Nunc a augue eget
risus commodo blandit.
</p>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Suspendisse tristique eros dictum, tempor libero quis, tincidunt
velit. Vestibulum non diam rutrum nisl consequat pulvinar.
Phasellus fermentum, massa at pulvinar eleifend, tellus nibh
dictum nulla, et gravida lectus lacus a mauris. Nunc a augue eget
risus commodo blandit.
</p>
</Col>
</Row>
<Row className="mt-4">
<Col className="text-center">
<Link to="/" className="btn btn-secondary">
{t("Go back to homepage")}
</Link>
</Col>
</Row>
</Container>
);
}
}
export default withTranslation()(PrivacyPolicy);
Loading…
Cancel
Save