Skip to content
This repository was archived by the owner on Jun 23, 2019. It is now read-only.
Open
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
File renamed without changes
Binary file added client/assets/beta.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added client/assets/candilib_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added client/assets/logoDSR.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added client/assets/logoLAB.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added client/assets/route.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 5 additions & 1 deletion client/modules/App/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import { CssBaseline } from '@material-ui/core';
import Header from './components/Header/Header';
import Footer from './components/Footer/Footer';

import bg from '../../assets/route.jpg';

export const App = (props) => (
<React.Fragment>
<CssBaseline />
Expand All @@ -31,7 +33,9 @@ export const App = (props) => (
/>
<Header
/>
<div className={styles.container}>
<div
style={{ background: `#FFF url(../${bg}) center no-repeat` }}
className={styles.container}>
{props.children}
</div>
<Footer />
Expand Down
11 changes: 6 additions & 5 deletions client/modules/App/components/Footer/Footer.css
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
.footer{
text-align: center;
.footer {
padding: 56px 0;
background-size: cover;
position: relative;
text-align: center;
}

.footer p{
.footer p {
background: #eee;
margin: 0 0 8px 0;
font-size: 14px;
color: #FFF;
}

.footer a{
color: #FFF;
.footer a {
color: #fff;
text-decoration: none;
font-weight: 700;
}
46 changes: 35 additions & 11 deletions client/modules/App/components/Footer/Footer.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,57 @@ import PropTypes from 'prop-types';
import { Link } from 'react-router';
import { withStyles } from '@material-ui/core';

import bg from '../../header-bk.png';
import bg from '../../../../assets/header-bk.png';
import logoDSR from '../../../../assets/logoDSR.jpg';
import logoLAB from '../../../../assets/logoLAB.png';

const styles = () => ({
footer: {
color: '#fff',
textAlign: 'center',
padding: '56px 0',
padding: '20px 0',
backgroundSize: 'cover',
},
credit: {
paddingRight: 20,
background: '#EEE',
color: '#000',
textAlign: 'right',
},
copyright: {
background: `#FFF url(../${bg})`,
textAlign: 'center',
},
footerLink: {
color: '#fff',
textDecoration: 'none',
'&:hover': {
textDecoration: 'underline',
}
},
},
});


export const Footer = ({ classes = {} }) => (
<div
style={{ background: `#FFF url(../${bg}) center` }}
className={classes.footer}
>
<p>
© 2018 · Candilib. - <Link to="/mentionslegales" className={classes.footerLink}>Mentions legales</Link>
</p>
<div className={classes.footer}>
<div className={classes.credit}>
<h5> Un service proposé par</h5>
<div>
<img src={logoDSR} style={{ width: 80 }} alt="logo sécurité routière" />
<img
src={logoLAB}
style={{ paddingLeft: 20, height: 80 }}
alt="logo sécurité routière"
/>
</div>
</div>
<div className={classes.copyright}>
<p>
© 2018 · Candilib. -{' '}
<Link to="/mentionslegales" className={classes.footerLink}>
Mentions legales
</Link>
</p>
</div>
</div>
);

Expand Down
2 changes: 1 addition & 1 deletion client/modules/App/components/Header/Header.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.header {
background: #eee url('../../header-bk.png') center;
background: #eee url('../../../../assets/header-bk.png') center;
background-size: cover;
border-bottom: 1px solid #ccc;
}
Expand Down
35 changes: 23 additions & 12 deletions client/modules/App/components/Header/Header.js
Original file line number Diff line number Diff line change
@@ -1,25 +1,36 @@
import React from 'react';
import { Link } from 'react-router';
import { Toolbar, AppBar, Button } from '@material-ui/core';
import { Toolbar, AppBar, Button, Grid } from '@material-ui/core';

// Import Style
import styles from './Header.css';

import logo from '../../../../assets/candilib_logo.png';
import beta from '../../../../assets/beta.png';

function Header() {
return (
<div className={styles.header}>
<AppBar color="default" position="static">
<Toolbar>
<Button component={Link} to="/">
Accueil
</Button>
<Button component={Link} to="/informations">
Informations
</Button>
<Button component={Link} to="/auth?redirect=calendar">
Ma Réservation
</Button>
</Toolbar>
<Grid container spacing={24}>
<Grid item xs={9}>
<Toolbar>
<img src={logo} style={{width: 200}} alt="logo" />
<Button component={Link} to="/">
Accueil
</Button>
<Button component={Link} to="/informations">
Informations
</Button>
<Button component={Link} to="/auth?redirect=calendar">
Ma Réservation
</Button>
</Toolbar>
</Grid>
<Grid item xs={3}>
<img src={beta} style={{width: 60, height: 60,float: "right"}} alt="version beta" />
</Grid>
</Grid>
</AppBar>
</div>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ class CalendarListPage extends Component {
if (isDeleteResa && isDeleteResa !== null) {
candidat.temp = creneau;
creneau = {
id: candidat.temp.id
id: candidat.temp.id,
};
}
candidat.creneau = creneau;
Expand Down Expand Up @@ -542,7 +542,7 @@ class CalendarListPage extends Component {
color="primary"
variant="contained"
className={classes.buttonContactUs}
href="mailto: candilib93@developpement-durable.gouv.fr"
href="mailto: candilib@interieur.gouv.fr"
>
Nous contacter
</Button>
Expand Down
2 changes: 1 addition & 1 deletion client/modules/Home/components/Login/Login.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const styles = theme => ({
},
},
paper: {
marginTop: theme.spacing.unit * 8,
marginTop: theme.spacing.unit * 3,
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
Expand Down
2 changes: 2 additions & 0 deletions server/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ const config = {
mailFrom: process.env.MAIL_FROM || '<mail_from>',
tokenCandidatExpired: process.env.CANDIDAT_EXPIREDIN || '1h',
appURL: process.env.APP_URL || 'http://localhost:8000',
URLlogoDSR: process.env.URLlogoDSR || "https://www.cartaplac.com/images/logo-securite-routiere.jpg",
URLlogoCandilib: process.env.URLlogoCandilib || "http://localhost:8000/88de6e0a1de39551b1be962a38d2f911.png",
};

export const smtpOptions = {
Expand Down
2 changes: 1 addition & 1 deletion server/util/messageMailManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ const mailMessage = (candidatAurige, flag) => {
<br>
<p>Nous avons bien pris en compte votre réservation à l'examen pratique
du permis de conduire à ${site} le ${dateCreneau} à ${heureCreneau} avec
le numéro NEPH ${codeNeph}.!</p>
le numéro NEPH ${codeNeph}.</p>
<p>${siteAdresse.adresse} </p>
<br>
<p>Nous vous rappelons les éléments à vérifier le jour de l'examen :</p>
Expand Down
8 changes: 3 additions & 5 deletions server/util/sendMagicLink.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,10 @@ const sendMagicLink = (candidatAurige, token) => {
<tbody>
<tr>
<td>
<img width="80px" src="https://www.cartaplac.com/images/logo-securite-routiere.jpg" />
<img width="80px" src=${serverConfig.URLlogoDSR} />
</td>
<td class="w580" width="580" align="center" bgcolor="#64b5f6">
<h2>
CANDILIB
</h2>
<td class="w580" width="580" align="center">
<img width="300px" src=${serverConfig.URLlogoCandilib} alt="Candilib" />
</td>
</tr>
<tr>
Expand Down
10 changes: 4 additions & 6 deletions server/util/sendMail.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import nodemailer from 'nodemailer';
import smtpTransport from 'nodemailer-smtp-transport';
import mailMessage from './messageMailManager';
import serverConfig, { smtpOptions } from '../config';
import serverConfig, { smtpOptions} from '../config';


const sendMailToAccount = (candidatAurige, flag) => {
Expand Down Expand Up @@ -86,12 +86,10 @@ const sendMailToAccount = (candidatAurige, flag) => {
<tbody>
<tr>
<td>
<img width="80px" src="https://www.cartaplac.com/images/logo-securite-routiere.jpg" />
<img width="80px" src=${serverConfig.URLlogoDSR} />
</td>
<td class="w580" width="580" align="center" bgcolor="#64b5f6">
<h2>
CANDILIB
</h2>
<td class="w580" width="580" align="center">
<img width="300px" src=${serverConfig.URLlogoCandilib} alt="Candilib" />
</td>
</tr>
<tr>
Expand Down