changed preprod url and removed /preprod prefix

This commit is contained in:
Yves Gatesoupe 2020-06-26 16:23:50 +02:00
parent d6665d7d6f
commit d7dae99529
7 changed files with 19 additions and 19 deletions

View File

@ -86,6 +86,6 @@ module.exports = function(config) {
output: 'dist' output: 'dist'
}, },
passthroughFileCopy: true, passthroughFileCopy: true,
pathPrefix: '/preprod' //TODO remove when prod // pathPrefix: '/preprod' //TODO remove when prod
}; };
}; };

View File

@ -2,7 +2,7 @@
"showThemeCredit": true, "showThemeCredit": true,
"name": "Astrolabe CAE", "name": "Astrolabe CAE",
"shortDesc": "Site web de la coopérative Astrolabe CAE", "shortDesc": "Site web de la coopérative Astrolabe CAE",
"url": "https://astrolabe.coop/preprod", "url": "https:/preprod.astrolabe.coop",
"authorEmail": "contacte@astrolabe.coop", "authorEmail": "contacte@astrolabe.coop",
"authorHandle": "@AstrolabeCae", "authorHandle": "@AstrolabeCae",
"authorName": "Astrolabe CAE", "authorName": "Astrolabe CAE",

View File

@ -4,7 +4,7 @@
<svg aria-hidden="true" viewBox="0 0 1440 131" width="auto" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill="#fff" d="M0 0h1440v131H0z"/><path d="M0 4.643l40-2.326c40-2.5 120-6.888 200 11.67 80 18.735 160 60.854 240 74.894 80 14.04 160 0 240-16.365 80-16.54 160-34.968 240-28.08 80 7.152 160 39.619 240 39.75 80-.131 160-32.598 200-49.139l40-16.365V131H0V4.643z" fill="#D6F253"/></svg> <svg aria-hidden="true" viewBox="0 0 1440 131" width="auto" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill="#fff" d="M0 0h1440v131H0z"/><path d="M0 4.643l40-2.326c40-2.5 120-6.888 200 11.67 80 18.735 160 60.854 240 74.894 80 14.04 160 0 240-16.365 80-16.54 160-34.968 240-28.08 80 7.152 160 39.619 240 39.75 80-.131 160-32.598 200-49.139l40-16.365V131H0V4.643z" fill="#D6F253"/></svg>
<div class="[ inner-wrapper ]"> <div class="[ inner-wrapper ]">
<h2 class="[ contact-heading ]">Nous contacter</h2> <h2 class="[ contact-heading ]">Nous contacter</h2>
<form name="contact" method="POST" data-netlify="true" action="/preprod/form/contact-form-handler.php"> <form name="contact" method="POST" data-netlify="true" action="/form/contact-form-handler.php">
<ol class="[ field-list ]"> <ol class="[ field-list ]">
{# <li class="[ field-list__field-group ]"> {# <li class="[ field-list__field-group ]">
{{ label("Prénom", "forename") }} {{ label("Prénom", "forename") }}
@ -31,9 +31,9 @@
{{ label("Votre message", "message") }} {{ label("Votre message", "message") }}
{{ textarea( "message", { required: true, autocapitalize: "sentences", spellcheck: "true" } ) }} {{ textarea( "message", { required: true, autocapitalize: "sentences", spellcheck: "true" } ) }}
</li> </li>
<li class="[ field-list__field-group ] [ full-width ]"> {# <li class="[ field-list__field-group ] [ full-width ]">
{{ checkboxes("", "field-checkbox-name", [ "Je souhaite être tenu au courant de lactualité Astrolabe"], { description: "" } ) }} {{ checkboxes("", "field-checkbox-name", [ "Je souhaite être tenu au courant de lactualité Astrolabe"], { description: "" } ) }}
</li> </li> #}
{# <li hidden> {# <li hidden>
<label>Dont fill this out if you're human: <input name="bot-field" /></label> <label>Dont fill this out if you're human: <input name="bot-field" /></label>
</li> #} </li> #}

View File

@ -1,6 +1,6 @@
<?php <?php
$errors = ''; $errors = '';
$myEmail = 'hello@ygat.es';//<----- Put Your email address here. $myEmail = 'contact@astrolabe.coop'; // email address to send form content
if(empty($_POST['name']) || empty($_POST['email']) || empty($_POST['message'])) { if(empty($_POST['name']) || empty($_POST['email']) || empty($_POST['message'])) {
$errors .= "\n Error: all fields are required"; $errors .= "\n Error: all fields are required";
@ -55,7 +55,7 @@
mail($to, $emailSubject, $emailBodyHTML, implode("\r\n", $headers)); mail($to, $emailSubject, $emailBodyHTML, implode("\r\n", $headers));
// redirect to the 'thank you' page // redirect to the 'thank you' page
header("Location: /preprod/thank-you/index.html"); header("Location: /thank-you/index.html");
} }
?> ?>
<!DOCTYPE html> <!DOCTYPE html>

View File

@ -1,3 +1,3 @@
User-agent: * User-agent: *
Disallow: /preprod/ Disallow: /
Noindex: /preprod/ Noindex: /

View File

@ -5,7 +5,7 @@
font-weight: 400; font-weight: 400;
font-display: swap; font-display: swap;
src: local('Varela Round Regular'), local('VarelaRound-Regular'), src: local('Varela Round Regular'), local('VarelaRound-Regular'),
url('/preprod/fonts/varela-round-v12-latin-regular.woff') format('woff'); url('/fonts/varela-round-v12-latin-regular.woff') format('woff');
} }
/* varela-regular - latin */ /* varela-regular - latin */
@ -14,7 +14,7 @@
font-style: normal; font-style: normal;
font-weight: 400; font-weight: 400;
src: local('Varela'), src: local('Varela'),
url('/preprod/fonts/varela-v10-latin-regular.woff') format('woff'), /* Modern Browsers */ url('/fonts/varela-v10-latin-regular.woff') format('woff'), /* Modern Browsers */
} }
/* open-sans-300 - latin */ /* open-sans-300 - latin */
@ -23,7 +23,7 @@
font-style: normal; font-style: normal;
font-weight: 300; font-weight: 300;
src: local('Open Sans Light'), local('OpenSans-Light'), src: local('Open Sans Light'), local('OpenSans-Light'),
url('/preprod/fonts/open-sans-v17-latin-300.woff') format('woff'), /* Modern Browsers */ url('/fonts/open-sans-v17-latin-300.woff') format('woff'), /* Modern Browsers */
} }
/* open-sans-regular - latin */ /* open-sans-regular - latin */
@ -32,7 +32,7 @@
font-style: normal; font-style: normal;
font-weight: 400; font-weight: 400;
src: local('Open Sans Regular'), local('OpenSans-Regular'), src: local('Open Sans Regular'), local('OpenSans-Regular'),
url('/preprod/fonts/open-sans-v17-latin-regular.woff') format('woff'), /* Modern Browsers */ url('/fonts/open-sans-v17-latin-regular.woff') format('woff'), /* Modern Browsers */
} }
/* open-sans-600 - latin */ /* open-sans-600 - latin */
@font-face { @font-face {
@ -40,7 +40,7 @@
font-style: normal; font-style: normal;
font-weight: 600; font-weight: 600;
src: local('Open Sans SemiBold'), local('OpenSans-SemiBold'), src: local('Open Sans SemiBold'), local('OpenSans-SemiBold'),
url('/preprod/fonts/open-sans-v17-latin-600.woff') format('woff'), /* Modern Browsers */ url('/fonts/open-sans-v17-latin-600.woff') format('woff'), /* Modern Browsers */
} }
/* open-sans-700 - latin */ /* open-sans-700 - latin */
@font-face { @font-face {
@ -48,7 +48,7 @@
font-style: normal; font-style: normal;
font-weight: 700; font-weight: 700;
src: local('Open Sans Bold'), local('OpenSans-Bold'), src: local('Open Sans Bold'), local('OpenSans-Bold'),
url('/preprod/fonts/open-sans-v17-latin-700.woff') format('woff'), /* Modern Browsers */ url('/fonts/open-sans-v17-latin-700.woff') format('woff'), /* Modern Browsers */
} }
body { body {

View File

@ -24,10 +24,10 @@ module.exports = function(value, outputPath) {
const file = image.getAttribute('src'); const file = image.getAttribute('src');
// if preprod env TODO remove when prod // if preprod env TODO remove when prod
if(this.config.pathPrefix.localeCompare('/')) { // pathPrefix is different from '/' // if(this.config.pathPrefix.localeCompare('/')) { // pathPrefix is different from '/'
// if(process.env.ELEVENTY_ENV == "preprod") { // not working // // if(process.env.ELEVENTY_ENV == "preprod") { // not working
image.setAttribute('src', this.config.pathPrefix + file); // image.setAttribute('src', this.config.pathPrefix + file);
} // }
if (file.indexOf('http') < 0) { if (file.indexOf('http') < 0) {
const dimensions = getSize('src' + file); const dimensions = getSize('src' + file);