feat: update

This commit is contained in:
rizaldy 2024-09-03 14:18:08 +07:00
parent aa4ac7706a
commit 00cb789253

View File

@ -91,7 +91,7 @@ layout: layouts/flo
<div class="c-faq__section"> <div class="c-faq__section">
<h5>Any tutorial on running a Navidrome server?</h5> <h5>Any tutorial on running a Navidrome server?</h5>
<p>Great! I wrote one here.</p> <p>Great! I wrote one <a target="_blank" rel="noopener norefer" href="https://dub.sh/flo-navidrome">here.</a></p>
</div> </div>
<div class="c-faq__section"> <div class="c-faq__section">
@ -120,7 +120,7 @@ layout: layouts/flo
<h2>Join the waitlist</h2> <h2>Join the waitlist</h2>
<p>Currently flo is in early preview and we'll let you know when we're on the App Store.</p> <p>Currently flo is in early preview and we'll let you know when we're on the App Store.</p>
<input id="email" type="email" placeholder="john@doe.com" required> <input id="email" type="email" placeholder="john@doe.com" required>
<button id="submit"">Submit</button> <button id="submit">Submit</button>
</div> </div>
</div> </div>
@ -135,22 +135,36 @@ const submitButton = document.getElementById('submit')
openModal.onclick = function() { openModal.onclick = function() {
modal.style.display = 'block' modal.style.display = 'block'
setTimeout(function() {
emailForm.focus()
}, 66)
} }
openModal2.onclick = function() { openModal2.onclick = function() {
modal.style.display = 'block' modal.style.display = 'block'
setTimeout(function() {
emailForm.focus()
}, 66)
} }
closeModal.onclick = function() { closeModal.onclick = function() {
modal.style.display = 'none' modal.style.display = 'none'
} }
window.onclick = function () { document.onclick = function () {
if (event.target === modal) { if (event.target === modal) {
modal.style.display = 'none' modal.style.display = 'none'
} }
} }
document.addEventListener('keydown', function(e) {
if (e.key === 'Escape' || e.keyCode === 27) {
modal.style.display = 'none'
}
})
submitButton.onclick = function() { submitButton.onclick = function() {
if (!emailForm.value.match(/^[^\s@]+@[^\s@]+\.[^\s@]+$/)) { if (!emailForm.value.match(/^[^\s@]+@[^\s@]+\.[^\s@]+$/)) {
window.alert("email doesnt seem valid") window.alert("email doesnt seem valid")