diff --git a/app/assets/images/metamaps-intro-poster.webp b/app/assets/images/metamaps-intro-poster.webp new file mode 100644 index 00000000..641b72df Binary files /dev/null and b/app/assets/images/metamaps-intro-poster.webp differ diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index d669012a..11633bea 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -1,3 +1,4 @@ +// eslint-disable spaced-comment // This is a manifest file that'll be compiled into application.js, which will include all the files // listed below. // @@ -16,3 +17,4 @@ //= require_directory ./lib //= require ./webpacked/metamaps.bundle //= require ./Metamaps.ServerData +//= require homepageVimeoFallback diff --git a/app/assets/javascripts/homepageVimeoFallback.js b/app/assets/javascripts/homepageVimeoFallback.js new file mode 100644 index 00000000..e4f5a67a --- /dev/null +++ b/app/assets/javascripts/homepageVimeoFallback.js @@ -0,0 +1,29 @@ +/* global $ */ + +$(document).ready(function () { + if (window.location.pathname === '/') { + $.ajax({ + type: 'GET', + url: 'https://player.vimeo.com', + error: function (e) { + $('.homeVideo').hide() + $('.homeVideo').replaceWith($('', { + poster: '/assets/metamaps-intro-poster.webp', + width: '560', + height: '315', + class: 'homeVideo', + controls: '' + })) + $('.homeVideo').append($('', { + src: 'https://metamaps.cc/videos/metamaps-intro.mp4', + type: 'video/mp4' + })) + $('.homeVideo').append( + '
You can watch our instruction video at ' + + '' + + 'https://metamaps.cc/videos/metamaps-intro.mp4.' + ) + } + }) + }// if +}) diff --git a/public/404.html b/public/404.html index d07c1069..5c9ec093 100644 --- a/public/404.html +++ b/public/404.html @@ -120,7 +120,6 @@
Therefore there is nothing to see here, nothing to behold here, nothing to be here, maybe there is but definitely not here.
Therefore, move along! Nothing is ending here...
EXPLORE FEATURED MAPS - GO TO OUR BLOGMetamaps is offline!
Don't worry, this is intentional. We're probably just turning on some great new features.
-In the meantime, you can visit our blog, or aimlessly search YouTube until we're back online.
+In the meantime, you can visit our Twitter, or aimlessly search YouTube until we're back online.
GO TO OUR TWITTER FEED - GO TO OUR BLOG