From 98d92d6946a6c7d25ac4a36c30a0313526b7e1f4 Mon Sep 17 00:00:00 2001 From: Spencer Flagg Date: Mon, 15 Nov 2021 16:54:24 +0100 Subject: [PATCH] v1.0.1 - contact form needs testing --- src/_data/reviews.js | 29 +++- src/_data/site.json | 8 +- src/_includes/blurb.ejs | 8 +- src/_includes/contact.ejs | 13 +- src/_includes/download.ejs | 8 +- src/_includes/footer.ejs | 4 +- src/_includes/hero.ejs | 2 +- src/_includes/info.ejs | 8 +- src/_includes/layouts/base.ejs | 145 +++++++++++++---- src/_includes/pricing.ejs | 2 +- src/_includes/screenshots.ejs | 3 +- src/_includes/system-icons/circulatory.svg | 46 ++++++ src/_includes/system-icons/digestive.svg | 45 ++++++ src/_includes/system-icons/endocrine.svg | 49 ++++++ src/_includes/system-icons/integumentary.svg | 49 ++++++ src/_includes/system-icons/ligamentous.svg | 48 ++++++ src/_includes/system-icons/lymphatic.svg | 5 + src/_includes/system-icons/muscular.svg | 51 ++++++ src/_includes/system-icons/nervous.svg | 47 ++++++ src/_includes/system-icons/respiratory.svg | 46 ++++++ src/_includes/system-icons/skeletal.svg | 62 +++++++ src/_includes/system-icons/urogenital.svg | 49 ++++++ src/_includes/systems.ejs | 11 +- src/assets/styles/_blurb.css | 31 +++- src/assets/styles/_contact.css | 54 ++++++- src/assets/styles/_download.css | 4 + src/assets/styles/_footer.css | 14 ++ src/assets/styles/_hero.css | 10 +- src/assets/styles/_info.css | 4 + src/assets/styles/_nav.css | 4 + src/assets/styles/_pricing.css | 4 + src/assets/styles/_reviews.css | 10 +- src/assets/styles/_screenshots.css | 4 + src/assets/styles/_systems.css | 37 ++++- src/assets/styles/main.css | 9 ++ src/posts/2020-02-02-my-first-post.md | 19 --- src/posts/2020-03-03-my-second-post.md | 19 --- ...eventy-starter-boilerplate-presentation.md | 151 ------------------ src/posts/2020-06-06-my-third-post.md | 19 --- src/posts/2020-07-07-my-forth-post.md | 19 --- src/posts/2020-08-08-my-fifth-post.md | 19 --- src/posts/2020-08-08-my-first-post.md | 7 + 42 files changed, 847 insertions(+), 329 deletions(-) create mode 100644 src/_includes/system-icons/circulatory.svg create mode 100644 src/_includes/system-icons/digestive.svg create mode 100644 src/_includes/system-icons/endocrine.svg create mode 100644 src/_includes/system-icons/integumentary.svg create mode 100644 src/_includes/system-icons/ligamentous.svg create mode 100644 src/_includes/system-icons/lymphatic.svg create mode 100644 src/_includes/system-icons/muscular.svg create mode 100644 src/_includes/system-icons/nervous.svg create mode 100644 src/_includes/system-icons/respiratory.svg create mode 100644 src/_includes/system-icons/skeletal.svg create mode 100644 src/_includes/system-icons/urogenital.svg delete mode 100644 src/posts/2020-02-02-my-first-post.md delete mode 100644 src/posts/2020-03-03-my-second-post.md delete mode 100644 src/posts/2020-05-05-eleventy-starter-boilerplate-presentation.md delete mode 100644 src/posts/2020-06-06-my-third-post.md delete mode 100644 src/posts/2020-07-07-my-forth-post.md delete mode 100644 src/posts/2020-08-08-my-fifth-post.md create mode 100644 src/posts/2020-08-08-my-first-post.md diff --git a/src/_data/reviews.js b/src/_data/reviews.js index 9051641..ac6022d 100644 --- a/src/_data/reviews.js +++ b/src/_data/reviews.js @@ -1,6 +1,23 @@ -module.exports = [ - { name: 'Bob S', quote: 'Sed ut perspiciatis, unde omnis iste natus error sit voluptatem accusantium doloremque laudantium', stars: 3, site: 'Google Play', link: '' }, - { name: 'Phil C', quote: 'otam rem aperiam eaque ipsa, quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt', stars: 3.5, site: 'App Store', link: '' }, - { name: 'Henk W', quote: 'Nam libero tempore, cum soluta nobis est eligendi optio, cumque nihil impedit, quo minus id', stars: 4, site: 'App Store', link: '' }, - { name: 'Jaap M', quote: 'Nemo enim ipsam voluptatem, quia voluptas sit, aspernatur aut odit aut fugit', stars: 5, site: 'Google Play', link: '' } - ] \ No newline at end of file +module.exports = [ + { + name: 'Andre Taris', + quote: 'I am a designer and researcher and as part of TU Delft’s medical design major you get to do a surgical level anatomy class at Erasmus hospital. A world first and leader in this type of collab this involved full dissection training of us medical designers and common procedure run throughs. Laparoscopic training and this is more thorough than most doctors gets hands on. This app aids at that level', + stars: 5, + site: 'App Store', + link: '' + }, + { + name: 'Anthony Horsley', + quote: 'I\'m homeschooled and this is awesome!', + stars: 5, + site: 'App Store', + link: '' + }, + { + name: 'Tom van Vugt', + quote: 'As a physical therapist this is one of the better apps out there for learning human anatomy, I tried multiple, but this one is easy to use and runs smoothly with lots of options.', + stars: 5, + site: 'App Store', + link: '' + } +] \ No newline at end of file diff --git a/src/_data/site.json b/src/_data/site.json index d0155f3..622699c 100644 --- a/src/_data/site.json +++ b/src/_data/site.json @@ -1,8 +1,8 @@ { - "site_name": "Visual Anatomy 3d", - "title": "Visual Anatomy 3d", + "site_name": "Visual Anatomy 3D", + "title": "Visual Anatomy 3D", "description": "Learn human anatomy quickly and easily by zooming, panning, hiding layers and interacting in real time.", - "url": "http://www.humananatomy3d.app/", + "url": "https://humananatomy3d.app/", "locale": "en", "author": "Spencer Flagg" -} +} \ No newline at end of file diff --git a/src/_includes/blurb.ejs b/src/_includes/blurb.ejs index a3d77f3..1ebac85 100644 --- a/src/_includes/blurb.ejs +++ b/src/_includes/blurb.ejs @@ -1,8 +1,12 @@

- Learn human anatomy quickly and easily by zooming, panning, hiding layers and interacting in real - time. + Complete and easy-to-use virtual guide for learning, understanding, and visualizing the complexities of human anatomy in 3D. + Includes information and images for each anatomical system and part, multiple options to interact with the 3D anatomy models (hiding, fading, etc), and much more. +

+

+ The <%= site.site_name %> app can be downloaded and tested for free, which contains the skeleton and ligaments, other anatomical systems can be purchased separately. + The anatomy app is available on most platforms (android, iOS, windows and mac) and can be used on your phone, tablet or desktop pc.

diff --git a/src/_includes/contact.ejs b/src/_includes/contact.ejs index 44bc191..c5d2812 100644 --- a/src/_includes/contact.ejs +++ b/src/_includes/contact.ejs @@ -5,18 +5,21 @@
- - your email address isn't valid πŸ‘† - - + + + Something went wrong. Try us on Twitter instead. + Thanks! We'll contact you shortly.
\ No newline at end of file diff --git a/src/_includes/download.ejs b/src/_includes/download.ejs index aef9e39..b9e1be9 100644 --- a/src/_includes/download.ejs +++ b/src/_includes/download.ejs @@ -5,7 +5,7 @@
- + <% include /store-icons/ios.svg %>

iOS @@ -14,7 +14,7 @@ go to store - + <% include /store-icons/android.svg %>

Android @@ -23,7 +23,7 @@ go to store - + <% include /store-icons/macos.svg %>

macOS @@ -32,7 +32,7 @@ go to store - + <% include /store-icons/windows.svg %>

Windows diff --git a/src/_includes/footer.ejs b/src/_includes/footer.ejs index bae203f..9cc7aba 100644 --- a/src/_includes/footer.ejs +++ b/src/_includes/footer.ejs @@ -63,7 +63,7 @@ Play Store -
  • +
  • @@ -74,7 +74,7 @@ d="M9.363 5.365a9.466 9.466 0 0 1 2.637 -.365c4 0 7.333 2.333 10 7c-.778 1.361 -1.612 2.524 -2.503 3.488m-2.14 1.861c-1.631 1.1 -3.415 1.651 -5.357 1.651c-4 0 -7.333 -2.333 -10 -7c1.369 -2.395 2.913 -4.175 4.632 -5.341" /> Privacy Policy
  • -
  • diff --git a/src/_includes/hero.ejs b/src/_includes/hero.ejs index 35eb6b0..336e726 100644 --- a/src/_includes/hero.ejs +++ b/src/_includes/hero.ejs @@ -25,6 +25,6 @@ -

    muscles, bones, organs and blood vessels in 3D

    +

    Interactive human anatomy in real-time 3D

    \ No newline at end of file diff --git a/src/_includes/info.ejs b/src/_includes/info.ejs index 41ab9f8..34fd408 100644 --- a/src/_includes/info.ejs +++ b/src/_includes/info.ejs @@ -21,6 +21,9 @@
  • highly detailed
  • +
  • + fully searchable +
  • zoom, pan, and rotate in real time
  • @@ -28,7 +31,10 @@ show and hide layers
  • - get details for each body part + see details for each body part +
  • +
  • + add custom notes
  • diff --git a/src/_includes/layouts/base.ejs b/src/_includes/layouts/base.ejs index 8377448..2fff46e 100644 --- a/src/_includes/layouts/base.ejs +++ b/src/_includes/layouts/base.ejs @@ -129,16 +129,22 @@ const fromEmail = document.getElementById('fromEmail'); const message = document.getElementById('message'); - const alert = document.getElementById('emailError'); + const emailError = document.getElementById('emailError'); + const otherError = document.getElementById('otherError'); + const success = document.getElementById('success'); const contactSubmit = document.getElementById('contactSubmit'); - if (/(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9]))\.){3}(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9])|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])/.test(fromEmail.value)) { - contactSubmit.disabled = false; - alert.classList.remove('form-alert--visible'); - } else { - contactSubmit.disabled = true; - alert.classList.add('form-alert--visible'); - } + // if (/(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9]))\.){3}(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9])|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])/.test(fromEmail.value)) { + // contactSubmit.disabled = false; + // alert.classList.remove('form-alert--visible'); + // } else { + // contactSubmit.disabled = true; + // alert.classList.add('form-alert--visible'); + // } + + emailError.classList.remove('form-alert--visible'); + otherError.classList.remove('form-alert--visible'); + success.classList.remove('form-alert--visible'); }); @@ -146,33 +152,107 @@ const fromEmail = document.getElementById('fromEmail'); const message = document.getElementById('message'); - const alert = document.getElementById('emailError'); + const emailError = document.getElementById('emailError'); + const otherError = document.getElementById('otherError'); + const success = document.getElementById('success'); - var details = { - 'hash': md5(fromEmail.value + '89745378945667832'), - 'fromEmail': fromEmail.value, - 'message': message.value - }; + if (/(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9]))\.){3}(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9])|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])/.test(fromEmail.value)) { + /* succeeded */ + emailError.classList.remove('form-alert--visible'); - var formBody = []; - for (var property in details) { - var encodedKey = encodeURIComponent(property); - var encodedValue = encodeURIComponent(details[property]); - formBody.push(encodedKey + "=" + encodedValue); + var details = { + 'hash': md5(fromEmail.value + '89745378945667832'), + 'fromEmail': fromEmail.value, + 'message': message.value + }; + + var formBody = []; + for (var property in details) { + var encodedKey = encodeURIComponent(property); + var encodedValue = encodeURIComponent(details[property]); + formBody.push(encodedKey + "=" + encodedValue); + } + formBody = formBody.join("&"); + + try { + + fetch('https://humananatomy3d.app/app/php/email/v1/SendSupportMailFromWebsite.php', { mode: 'no-cors' }, { + method: 'POST', + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + }, + body: formBody, + }) + .then(response => { + if(response.status === 200){ + return response.json(); + } else { + otherError.classList.add('form-alert--visible'); + } + }) + .then(data => { + switch (data) { + case "succesSendingSupportEmail": + success.classList.add('form-alert--visible'); + emailError.classList.remove('form-alert--visible'); + otherError.classList.remove('form-alert--visible'); + fromEmail.value = ''; + message.value = ''; + break; + case "invalidEmailAdres": + emailError.classList.add('form-alert--visible'); + break; + case "failedSendingSupportEmail": + case "failedH": + otherError.classList.add('form-alert--visible'); + break; + default: + break; + } + console.log(data) + }); + + } catch (error) { + otherError.classList.add('form-alert--visible'); + } + + } else { + /* failed */ + emailError.classList.add('form-alert--visible'); } - formBody = formBody.join("&"); - - fetch('https://humananatomy3d.app/app/php/email/v1/SendSupportMailFromWebsite.php', { - method: 'POST', - headers: { - 'Content-Type': 'application/x-www-form-urlencoded', - }, - body: formBody, - }) - .then(response => response.json()) - .then(data => console.log(data)); }); + + // https://github.com/Modernizr/Modernizr/blob/master/feature-detects/css/flexgap.js + + function checkFlexGap() { + // create flex container with row-gap set + var flex = document.createElement("div"); + flex.style.display = "flex"; + flex.style.flexDirection = "column"; + flex.style.rowGap = "1px"; + + // create two, elements inside it + flex.appendChild(document.createElement("div")); + flex.appendChild(document.createElement("div")); + + // append to the DOM (needed to obtain scrollHeight) + document.body.appendChild(flex); + var isSupported = flex.scrollHeight === 1; // flex container should be 1px high from the row-gap + //flex.parentNode.removeChild(flex); + + return isSupported; + } + + console.log(checkFlexGap()); + + if (checkFlexGap()) { + document.documentElement.classList.add("flexbox-gap"); + } else { + document.documentElement.classList.add("no-flexbox-gap"); + } + + @@ -183,6 +263,7 @@