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'
},
passthroughFileCopy: true,
pathPrefix: '/preprod' //TODO remove when prod
// pathPrefix: '/preprod' //TODO remove when prod
};
};

View File

@ -2,7 +2,7 @@
"showThemeCredit": true,
"name": "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",
"authorHandle": "@AstrolabeCae",
"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>
<div class="[ inner-wrapper ]">
<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 ]">
{# <li class="[ field-list__field-group ]">
{{ label("Prénom", "forename") }}
@ -31,9 +31,9 @@
{{ label("Votre message", "message") }}
{{ textarea( "message", { required: true, autocapitalize: "sentences", spellcheck: "true" } ) }}
</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: "" } ) }}
</li>
</li> #}
{# <li hidden>
<label>Dont fill this out if you're human: <input name="bot-field" /></label>
</li> #}

View File

@ -1,6 +1,6 @@
<?php
$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'])) {
$errors .= "\n Error: all fields are required";
@ -55,7 +55,7 @@
mail($to, $emailSubject, $emailBodyHTML, implode("\r\n", $headers));
// redirect to the 'thank you' page
header("Location: /preprod/thank-you/index.html");
header("Location: /thank-you/index.html");
}
?>
<!DOCTYPE html>

View File

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

View File

@ -5,7 +5,7 @@
font-weight: 400;
font-display: swap;
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 */
@ -14,7 +14,7 @@
font-style: normal;
font-weight: 400;
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 */
@ -23,7 +23,7 @@
font-style: normal;
font-weight: 300;
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 */
@ -32,7 +32,7 @@
font-style: normal;
font-weight: 400;
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 */
@font-face {
@ -40,7 +40,7 @@
font-style: normal;
font-weight: 600;
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 */
@font-face {
@ -48,7 +48,7 @@
font-style: normal;
font-weight: 700;
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 {

View File

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