diff --git a/layout/theme.liquid b/layout/theme.liquid index 2f9fff6..5c415d2 100644 --- a/layout/theme.liquid +++ b/layout/theme.liquid @@ -438,6 +438,8 @@ --> + {% render 'shx-loading-screen' + , content_type: 'head' %} {% render 'shx-feedback-banner' , content_type: 'head' %} {% render 'shx-StarRatingForm' @@ -465,6 +467,9 @@
+ {% render 'shx-loading-screen' + , content_type: 'body' %} + {% render 'shx-feedback-banner' , content_type: 'body' %} diff --git a/snippets/shx-feedback-banner.liquid b/snippets/shx-feedback-banner.liquid index 728464c..57fb2df 100644 --- a/snippets/shx-feedback-banner.liquid +++ b/snippets/shx-feedback-banner.liquid @@ -166,8 +166,8 @@ position: relative; display: flex; - justify-content: center; - align-items: center; + justify-content: center; + align-items: center; } #SHX-feedback-modal-content-banner::after { @@ -178,8 +178,6 @@ width: 100%; height: 100%; background: linear-gradient(180deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0) 100%); - - } #SHX-feedback-modal-form { @@ -194,7 +192,6 @@ font-weight: 600; margin: 0; padding: 20px; - position: relative; z-index: 10002; } @@ -203,7 +200,6 @@ font-size: 1.25em; font-weight: 600; margin: 0 0 10px; - line-height: 1.5em; } @@ -211,34 +207,27 @@ width: 100%; padding: 10px; margin: 10px 0; - border: 1px rgb(var(--color-button)) solid; border-radius: 5px; } #SHX-feedback-modal-container button { width: 100%; - font-size: 1.5rem; letter-spacing: 0.1rem; - background-color: rgb(var(--color-button)); color: white; padding: 15px; border: none; border-radius: 5px; cursor: pointer; - font-family: var(--font-body-family); transition: opacity 0.3s ease-in-out; } .SHX-feedback-modal-buttonDisable { cursor: not-allowed !important; - opacity: 0.5; - - } .SHX-FEEDBACK-CODE { @@ -345,13 +334,8 @@ modal.style.display = 'none'; } }); - - - } - - function SHX_FeedbackModal_enableSubmitButton() { document.getElementById('SHX-feedback-modal-submit').classList.remove('SHX-feedback-modal-buttonDisable'); } @@ -367,7 +351,6 @@ modalContainer.style.display = 'none'; - let ele_container_submit1 = document.getElementById('SHX-feedback-modal-container-submit1'); let ele_container_submit2 = document.getElementById('SHX-feedback-modal-container-submit2'); @@ -384,22 +367,18 @@ }, 4000); } - - // Calculate the height of the content - let height = SHX_getHTMLObjectHeight(modalContent); + let height = SHX_getHTMLObjectHeight(modalContent); - anime({ - targets: modalContent, - height: height , // Use the calculated height - duration: 1500, - easing: 'cubicBezier(0.590, 0.190, 0.050, 0.990)', - complete: function(anim) { - modalContent.style.height = 'auto'; - } - }); - - + anime({ + targets: modalContent, + height: height , // Use the calculated height + duration: 1500, + easing: 'cubicBezier(0.590, 0.190, 0.050, 0.990)', + complete: function(anim) { + modalContent.style.height = 'auto'; + } + }); } // dom ready @@ -430,7 +409,6 @@ }, 5000); } - let disableButtonForRequest = false; setTimeout(function () { diff --git a/snippets/shx-loading-screen.liquid b/snippets/shx-loading-screen.liquid new file mode 100644 index 0000000..eb26f75 --- /dev/null +++ b/snippets/shx-loading-screen.liquid @@ -0,0 +1,7 @@ +{% assign content_type = content_type | default: 'body' %} + +{% if content_type == 'body' %} + +{% elsif content_type == 'head' %} + +{% endif %} \ No newline at end of file