Untitled

 avatar
unknown
plain_text
2 years ago
10 kB
6
Indexable
<script>
(function () {
  try {
    /* main variables */
    var debug = 0;
    var variation_name = "";
    var $;
    /* all Pure helper functions */

    waitForElement = function (selector, trigger, delayInterval, delayTimeout) {
      var interval = setInterval(function () {
        if (
          document &&
          document.querySelector(selector) &&
          document.querySelectorAll(selector).length > 0
        ) {
          clearInterval(interval);
          trigger();
        }
      }, delayInterval);
      setTimeout(function () {
        clearInterval(interval);
      }, delayTimeout);
    }

    var certifiedicon = '' +
      '<div class="eg-certified-container">' +
      '<div>' +
      '<div class="eg-certified-icon">' +
      '<img src="https://i.ibb.co/nPw0RhK/ISO-9001-V1.png">' +
      '</div>' +
      '<h5>Certified</h5>' +
      '</div>' +
      '<div class="eg-certified-image">' +
      '<div>' +
      '<div class="eg-brand-logo">' +
      '<div>' +
      '<img src="https://i.ibb.co/dfwG96F/tsg-logo.png">' +
      '</div>' +
      '<p>QUALITY MANAGEMENT SYSTEM</p>' +
      '</div>' +
      '<div class="eg-iso-certified">' +
      '<img src="https://i.ibb.co/nPw0RhK/ISO-9001-V1.png">' +
      '</div>' +
      '</div>' +
      '</div>'
    '</div>'

    var certifiedimage = '' +
      '<div class="eg-certified-image">' +
      '<div>' +
      '<div class="eg-brand-logo">' +
      '<div>' +
      '<img src="https://i.ibb.co/dfwG96F/tsg-logo.png">' +
      '</div>' +
      '<p>QUALITY MANAGEMENT SYSTEM</p>' +
      '</div>' +
      '<div class="eg-iso-certified">' +
      '<img src="https://i.ibb.co/nPw0RhK/ISO-9001-V1.png">' +
      '</div>' +
      '</div>' +
      '</div>'
    
    var certifiedimage2 = '' +
      '<div class="eg-certified-image">' +
      '<div>' +
      '<div class="eg-brand-logo">' +
      '<div>' +
      '<img src="https://thespanishgroup.org/wp-content/themes/translations/uploads/1/4/8/2/14823004/1382166907.png">' +
      '</div>' +
      '<p>QUALITY MANAGEMENT SYSTEM</p>' +
      '</div>' +
      '<div class="eg-iso-certified">' +
      '<img src="https://i.ibb.co/nPw0RhK/ISO-9001-V1.png">' +
      '</div>' +
      '</div>' +
      '</div>'

    /* Variation Init */
    init = function () {
      if (!document.querySelector(".eg-certified-image")) {

        if (window.location.href.includes("/translations")) {
          document.querySelector(".template_banner .image-container").insertAdjacentHTML("afterbegin", certifiedimage);
          document.body.classList.add("eg-translation");
        }

        if (window.location.href.indexOf("/")) {
          document.querySelector(".template_banner > .container .banner_text").insertAdjacentHTML("beforeend", certifiedimage);
          document.body.classList.add("eg-home");
          document.querySelector("#footer > .container > div:first-child > div:nth-child(2) ").insertAdjacentHTML("beforeend", certifiedimage2);
          document.querySelectorAll("#footer > .container > div:first-child > div:nth-child(1) ").forEach(function (e) {
            e.insertAdjacentElement("beforeend", document.querySelector("#footer > .container > div:first-child > div:nth-child(2) > a"))
          });
        }
      }
    }


    initquote = function () {
      if (!document.querySelector(".certifiedicon")) {
        if (window.location.href.includes("/quotes")) {
          document.body.classList.add("eg-home");
          document.querySelector("#main > .container > div > div:nth-child(2) > div > div:first-child").insertAdjacentHTML("afterend", certifiedicon)
        }

        if (window.location.href.includes("/billing")) {
          document.body.classList.add("eg-home");
          document.querySelector("#header-img + .container .format-text > div:first-child").insertAdjacentHTML("afterend", certifiedicon)
        }
      }
    }

    /* Initialize variation */
    waitForElement('#footer > .container > div:first-child > div:nth-child(2)', init, 50, 15000);
    waitForElement('.template_banner .image-container', init, 100, 15000);
    waitForElement('#main > .container > div > div:nth-child(2) > div > div:first-child', initquote, 100, 15000);
    waitForElement('#header-img + .container .format-text > div:first-child', initquote, 100, 15000);

  } catch (e) {
    if (debug) console.log(e, "error in Test" + variation_name);
  }
})();






  </script>
<style>
 /*html body .eg-certified-image {
    max-width: fit-content;
    background: #00000029;
    padding: 20px 35px 5px;
    border-radius: 35px 0px 35px 0px;
    border: 5px solid #000000;
}*/

/* homepage */

.eg-home .eg-certified-image>div {
    display: flex !important;
    flex-direction: row !important;
}

.eg-home .template_banner>.container .eg-certified-image {
    margin-top: 20px;
}

.eg-home .eg-certified-image .eg-iso-certified>img {
    width: 100% !important;
    max-width: 220px;
    height: 100% !important;
    max-height: 155px;
    min-width: 120px !important;
    margin-left: 10px !important;
}

.eg-home .eg-certified-image .eg-brand-logo img {
    width: 100% !important;
    max-width: 220px !important;
}

.eg-home.eg-certified-image .eg-brand-logo {
    width: 100% !important;
    max-width: 220px !important;
}

.eg-home .eg-certified-image .eg-brand-logo>p {
    display: block;
    width: fit-content;
    font-size: 14px !important;
    line-height: 1;
    text-align: center;
}

.eg-home .eg-certified-image>div {
    margin-bottom: 00px !important;
}

.eg-home .eg-certified-image>p {
    text-align: center;
    display: flex;
    justify-content: right;
    align-items: center;
    font-size: 14px;
}

.eg-home .eg-certified-image .eg-brand-logo {
    width: 100% !important;
    max-width: 88px !important;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-direction: column;
    margin-top: 0px !important;
}

.eg-home #footer .eg-certified-image .eg-brand-logo>div {
    display: flex;
    justify-content: center;
}

.eg-home #footer .eg-certified-image .eg-brand-logo img {
    width: 75% !important;
}

.eg-home .template_banner>.container .banner_text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

@media only screen and (max-width:1024px) {
    .eg-home .template_banner>.container .eg-certified-image {
        margin-bottom: 20px !important;
        margin-top: 20px;
    }

    .eg-home #footer>.container>div:first-child>div:first-child>a {
        margin: auto;
    }
}

/* homepage footer */

.eg-home #footer .eg-certified-image>p {
    text-align: center;
    display: flex;
    justify-content: right;
    align-items: center;
    font-size: 10px;
}

.eg-home #footer .eg-certified-image .eg-brand-logo>p {
    display: block;
    width: fit-content;
    font-size: 10px;
    line-height: 1;
    text-align: center;
}

.eg-home #footer .eg-certified-image {
    padding: 20px 20px 10px 20px !important;
    background: unset !important;
    margin-top: 10px !important;
}

.eg-home #footer .eg-certified-image .eg-iso-certified>img {
    max-height: 115px;
    min-width: 100px !important;
    margin-left: 0 !important;
}

.eg-home #footer>.container>div>div:nth-child(2) {
    display: flex;
    justify-content: center;
    flex-direction: column;
    align-items: center;
}

.eg-home #footer>.container>div:first-child>div:first-child>a {
    width: fit-content;
    display: flex;
    flex-direction: column;
    justify-content: end;
    align-items: end;
}

/* translation */

.eg-translation .eg-certified-image>div {
    display: flex;
    flex-direction: row;
}

.eg-translation .eg-certified-image .eg-iso-certified img {
    /*width: 60px;*/
    height: 90px;
}

.eg-translation .eg-certified-image .eg-brand-logo {
    width: 85px;
}

.eg-translation .eg-certified-image .eg-brand-logo img {
    width: 55px;
    height: 50px;
    margin-top: 4px;
}

.eg-translation .eg-certified-image .eg-brand-logo>div {
    display: flex;
    justify-content: center;
}

.eg-translation .eg-certified-image {
    max-width: fit-content;
    /*background: #00000029;*/
    padding: 0x 15px 0px 15px;
    border-radius: 30px 0px 30px 0px;
    border: 0px solid #000000;
    height: fit-content;
}

.eg-translation .eg-brand-logo>p {
    font-size: 10px !important;
    line-height: 11px;
    text-align: center;
}

.eg-translation .eg-certified-image>p {
    font-size: 7px !important;
    display: flex;
    justify-content: right;
    text-align: center;
}

@media only screen and (max-width:380px) {
    .eg-translation .eg-certified-image {
        padding: 5px 8px 5px 8px;
    }
}

/* quote */

.eg-home .eg-certified-container .eg-certified-icon img {
    /*width: 65px !important;*/
    display: block;
    height: 85px;
}

.eg-home .eg-certified-container>div:first-child {
    display: flex;
    flex-direction: row;
    align-items: center;
    margin-bottom: 15px !important;
}

.eg-home .eg-certified-container>div:first-child h5 {
    font-size: 22px !important;
    font-family: 'Roboto', sans-serif !important;
    font-weight: bold;
    margin-left: 32px;
}

.eg-home .eg-certified-container .eg-certified-image {
    margin-left: 65px;
}

.eg-home .eg-certified-container .eg-certified-image {
    padding: 15px 25px 5px 25px;
}

/* order */

.height-wrapper>.container>div>div:nth-child(3) .eg-certified-container h5 {
    font-size: 30px !important;
}

.eg-home .eg-certified-container {
    margin-top: 20px !important;
}

@media only screen and (min-width:767px) and (max-width:1023px) {
    .eg-home .eg-certified-container .eg-certified-image {
        margin-left: 120px;
    }

    .eg-home .eg-certified-container>div:first-child h5 {
        margin-left: 55px;
    }
}

@media only screen and (max-width:370px) {
    .eg-home .eg-certified-image .eg-brand-logo {
        width: 100% !important;
        max-width: 100px !important;
    }

    .eg-home .eg-certified-image .eg-brand-logo>p {
        display: block;
        width: fit-content;
        font-size: 14px !important;
        text-align: center;
    }

    .eg-home .eg-certified-container .eg-certified-image {
        padding: 15px 15px 5px !important;
    }
}
  html body.eg-translation .new-container .image-container {
    justify-content: center;
  }
  @media only screen and (max-width:767px) {
    html body.eg-translation .eg-certified-image {
      margin-bottom: 25px;
    }
  }
  </style>
Editor is loading...
Leave a Comment