Send install link (like fig website)

This commit is contained in:
Thomas Smith 2023-02-24 18:32:20 -05:00
parent a22beba4ea
commit c37ddfbc06

View file

@ -1,10 +1,11 @@
<!-- Mobile CTA's --> <!-- Mobile CTA's -->
<div class="row mt-5 gx-3 mobile-ctas"> <div class="row mt-5 gx-3 mobile-ctas">
<div class="col-xl-6 col-lg-6 col-md-6 col-sm-6 col-6"> <div class="col-12 mb-2">
<button class="mbtn hbtn hb-fill-right" id="email-btn" style="width:100%;"><i class="icon-email-icon-www" style="position:relative; top:2px;"></i>Subscribe</button> <div class="klaviyo-form-WxjYGS"></div>
</div> </div>
<div class="col-xl-6 col-lg-6 col-md-6 col-sm-6 col-6"> <p class="text-center small light-gray">or</p>
<div class="col-12">
<button class="mbtn hbtn-light hb-light-fill-right mb-4" id="follow-button" style="width:100%; text-transform:uppercase;"><i class="icon-twitter" style="position:relative;top:2px;"></i>Follow Us</button> <button class="mbtn hbtn-light hb-light-fill-right mb-4" id="follow-button" style="width:100%; text-transform:uppercase;"><i class="icon-twitter" style="position:relative;top:2px;"></i>Follow Us</button>
</div> </div>
</div> </div>
@ -47,60 +48,29 @@
border-radius: 3px; border-radius: 3px;
height: 100% !important; height: 100% !important;
} }
.klaviyo-form{
padding: 0px !important;
border: none !important;
}
#email_62679624{
background-color: #1a1a1a !important;
border-radius: 0px !important;
text-align: center !important;
border-color: #949494 !important;
}
#email_62679624:hover{
border-color: #949494 !important;
}
#email_62679624:focus{
box-shadow:none !important;
}
.go3894874857{
height: 50px !important;
border-radius: 0px !important;
font-family: "inter", sans-serif !important;
}
</style> </style>
<script>
const emailBtn = document.getElementById("email-btn");
const subscribeCollapse = document.querySelector(".subscribe-collapse");
emailBtn.addEventListener("click", function() {
if (subscribeCollapse.style.display === "none") {
subscribeCollapse.style.display = "block";
} else {
subscribeCollapse.style.display = "none";
}
});
const subscribeForm = document.getElementById("subscribeForm");
const formResponse = document.getElementById("formResponse");
subscribeForm.addEventListener("submit", event => {
event.preventDefault();
const email = document.getElementById("email").value;
if (!email) {
formResponse.innerHTML =
'<p style="color: red">Please enter a valid email address.</p>';
return;
}
fetch("https://manage.klaviyo.com/api/v1/list/R2UVm3/members", {
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({
email: email,
api_key: "pk_231a258e61a40283566192ee59310c7af4"
})
})
.then(response => {
if (!response.ok) {
throw new Error("Failed to subscribe");
}
formResponse.innerHTML =
'<p style="color: green">Form submitted!</p>';
})
.catch(error => {
formResponse.innerHTML =
`<div class="mt-3 orange-bg p-2 flex" style="border-radius: 3px;">
<span class="small" style="color: #fff; display:block; margin-left:auto; margin-right:auto;">An error occurred. Please try again later.</span>
</div>`;
});
});
</script>
<!-- Deep-linking script for Twitter follow button --> <!-- Deep-linking script for Twitter follow button -->
<script> <script>
document.getElementById("follow-button").addEventListener("click", function() { document.getElementById("follow-button").addEventListener("click", function() {