From 5aaac71f6b27f4832940a8a19d3941469862578e Mon Sep 17 00:00:00 2001 From: Elisa Date: Tue, 25 Aug 2020 13:50:45 +0200 Subject: [PATCH] Update index.js and style.css --- client/index.js | 3 ++- client/style.css | 23 +++++++++++++++++++---- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/client/index.js b/client/index.js index 917cc14..f47659a 100644 --- a/client/index.js +++ b/client/index.js @@ -47,7 +47,8 @@ function interceptForm (formId) { /* Add loading text */ const submitButton = formElem.querySelector('[type="submit"]') const loadingText = document.createElement('span') - loadingText.textContent = ' Envoi en cours…' + loadingText.classList.add(".contact-mailer-sending"); + loadingText.textContent = 'Envoi en cours…' submitButton.after(loadingText) /* XHR */ fetch(formElem.action, { diff --git a/client/style.css b/client/style.css index 4e4cd07..cdeba59 100644 --- a/client/style.css +++ b/client/style.css @@ -4,8 +4,7 @@ .contact-mailer-message { border: 1px solid; - padding: 3px; - padding-left: 8px; + padding: 2px 8px; border-radius: 2px; cursor:pointer; } @@ -18,6 +17,22 @@ .contact-mailer-message-success { color: white; - background-color: #06d6a0; - border-color: #06d6a0; + background-color: #00B06A; + border-color: #00B06A; } + +.contact-mailer-light-message-error { + color: #721c24; + background-color: #f8d7da; + border-color: #f5c6cb; +} + +.contact-mailer-light-message-success { + color: #155724; + background-color: #d4edda; + border-color: #c3e6cb; +} + +.contact-mailer-sending { + padding: 5px 10px; +} \ No newline at end of file