diff --git a/app/static/css/application.css b/app/static/css/application.css index f11f836..b2f55f8 100644 --- a/app/static/css/application.css +++ b/app/static/css/application.css @@ -658,14 +658,31 @@ a:hover { bottom: 15px; left: 15px; } - - .card:focus .card__front { + .card-visited .card__front { -webkit-transform: rotateY(180deg); -moz-transform: rotateY(180deg); } - .card:focus .card__back { + .card-visited .card__back { + -webkit-transform: rotateY(0deg); + -moz-transform: rotateY(0deg); + } + + .card:active .card__front { + + -webkit-transform: rotateY(180deg); + -moz-transform: rotateY(180deg); + + } + + .card:active .card__back { + width: 320px; + height: 190px; + -webkit-perspective: 600px; + -moz-perspective: 600px; + perspective:600px; + -webkit-transform: rotateY(0deg); -moz-transform: rotateY(0deg); } @@ -691,6 +708,7 @@ a:hover { --button-edges: 10px; --body-edges: 10px; --border-off: 1px solid #e6e9eb; + --active-background: #f7f8f9; } diff --git a/app/static/js/adyen-implementation.js b/app/static/js/adyen-implementation.js index fbc8aa5..482900b 100644 --- a/app/static/js/adyen-implementation.js +++ b/app/static/js/adyen-implementation.js @@ -17,16 +17,11 @@ let showPayMethod = true let hideCVC = false let placeholderData = false -const toggleData = [ - { - - } -] - // identify checkout div and create new empty div to replace with const oldDiv = document.getElementById("dropin-container"); const newDiv = document.createElement('div'); + const flagUrlMap = { "NL": { "src": "https://ca-test.adyen.com/ca/adl/img/flags/nl.svg", @@ -48,6 +43,7 @@ const flagUrlMap = { } } + // Country dropdown changes the flag image and reloads the dropin with new country values function changeSelect(el) { document.getElementById('flag_img').src = flagUrlMap[el.value].src; @@ -539,6 +535,9 @@ document.getElementById('noBorder').parentNode.addEventListener('click', functio function resetDynamicCSS () { r.style.setProperty('--background-color', null); + r.style.setProperty('--dropin-width', null); + r.style.setProperty('--body-edges', null); + r.style.setProperty('--button-edges', null); } function dropinWidth () { @@ -555,10 +554,20 @@ function fontWidth () { } // Copy to clipboard function -function copyToClipboard(e) { - const cb = navigator.clipboard; - cb.writeText(e.target.innerText) +// function copyToClipboard(e) { +// const cb = navigator.clipboard; +// cb.writeText(e.target.innerText) +// } + +function turnCard() { + document.getElementById("card").classList.add('card-visited'); + // cardDiv.setAttribute("class", "card-visited") } + function resetCard() { + if (document.getElementById("card").classList.contains('card-visited')) { + document.getElementById("card").classList.remove('card-visited'); + } + } initCheckout(); diff --git a/app/templates/component.html b/app/templates/component.html index d592f2f..d34c44c 100644 --- a/app/templates/component.html +++ b/app/templates/component.html @@ -49,7 +49,7 @@
-

Change country:

+ Change country:

- @@ -116,7 +116,7 @@
- +
@@ -133,7 +133,7 @@
-
+
@@ -144,21 +144,24 @@
Expires -

03/30

+

03/30

-

737

+

737

- + + + + + + + + + +