diff --git a/web/app/assets/javascripts/application.js b/web/app/assets/javascripts/application.js index 1210d1d7a..4fb8c04f7 100644 --- a/web/app/assets/javascripts/application.js +++ b/web/app/assets/javascripts/application.js @@ -29,6 +29,7 @@ //= require jquery.hoverIntent //= require jquery.dotdotdot //= require jquery.pulse +//= require jquery.browser //= require AAA_Log //= require globals //= require AAB_message_factory diff --git a/web/app/controllers/spikes_controller.rb b/web/app/controllers/spikes_controller.rb index 682c8dccb..29bc4337b 100644 --- a/web/app/controllers/spikes_controller.rb +++ b/web/app/controllers/spikes_controller.rb @@ -21,4 +21,7 @@ class SpikesController < ApplicationController render :layout => 'web' end + def launch_app + render :layout => 'web' + end end diff --git a/web/app/views/spikes/launch_app.html.haml b/web/app/views/spikes/launch_app.html.haml new file mode 100644 index 000000000..00fee5fd6 --- /dev/null +++ b/web/app/views/spikes/launch_app.html.haml @@ -0,0 +1,13 @@ +- provide(:title, 'Launch App') + + +.content-wrapper + %h2 Launch App Test + + + :javascript + $(function () { + + + + })() \ No newline at end of file diff --git a/web/app/views/users/welcome.html.haml b/web/app/views/users/welcome.html.haml index e29dbbd08..996d3b13a 100644 --- a/web/app/views/users/welcome.html.haml +++ b/web/app/views/users/welcome.html.haml @@ -7,9 +7,9 @@ = link_to "Already have an account?", signin_path, class: "signin", id: "signin" - content_for :after_black_bar do - - if @jamfest_2014 + - unless @jamfest_2014 .jamfest{style: 'top:-70px;position:relative'} - %a{ href: event_path(@jamfest_2014.slug), style: 'font-size:24px' } + %a{ href: '#', style: 'font-size:20px; margin-top:11px' } Listen to the terrific band performances from Virtual Jam Fest 2014! %div{style: "padding-top:20px;"} .right diff --git a/web/config/routes.rb b/web/config/routes.rb index eb4d82e4b..9f95134a5 100644 --- a/web/config/routes.rb +++ b/web/config/routes.rb @@ -75,6 +75,8 @@ SampleApp::Application.routes.draw do # route to spike controller (proof-of-concepts) match '/facebook_invite', to: 'spikes#facebook_invite' + match '/launch_app', to: 'spikes#launch_app' + # junk pages match '/help', to: 'static_pages#help' diff --git a/web/vendor/assets/javascripts/jquery.browser.js b/web/vendor/assets/javascripts/jquery.browser.js new file mode 100644 index 000000000..c7742a78e --- /dev/null +++ b/web/vendor/assets/javascripts/jquery.browser.js @@ -0,0 +1,112 @@ +/*! + * jQuery Browser Plugin v0.0.5 + * https://github.com/gabceb/jquery-browser-plugin + * + * Original jquery-browser code Copyright 2005, 2013 jQuery Foundation, Inc. and other contributors + * http://jquery.org/license + * + * Modifications Copyright 2013 Gabriel Cebrian + * https://github.com/gabceb + * + * Released under the MIT license + * + * Date: 2013-07-29T17:23:27-07:00 + */ + +(function( jQuery, window, undefined ) { + "use strict"; + + var matched, browser; + + jQuery.uaMatch = function( ua ) { + ua = ua.toLowerCase(); + + var match = /(opr)[\/]([\w.]+)/.exec( ua ) || + /(chrome)[ \/]([\w.]+)/.exec( ua ) || + /(version)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(ua) || + /(webkit)[ \/]([\w.]+)/.exec( ua ) || + /(opera)(?:.*version|)[ \/]([\w.]+)/.exec( ua ) || + /(msie) ([\w.]+)/.exec( ua ) || + ua.indexOf("trident") >= 0 && /(rv)(?::| )([\w.]+)/.exec( ua ) || + ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec( ua ) || + []; + + var platform_match = /(ipad)/.exec( ua ) || + /(iphone)/.exec( ua ) || + /(android)/.exec( ua ) || + /(windows phone)/.exec(ua) || + /(win)/.exec( ua ) || + /(mac)/.exec( ua ) || + /(linux)/.exec( ua ) || + []; + + return { + browser: match[ 3 ] || match[ 1 ] || "", + version: match[ 2 ] || "0", + platform: platform_match[0] || "" + }; + }; + + matched = jQuery.uaMatch( window.navigator.userAgent ); + browser = {}; + + if ( matched.browser ) { + browser[ matched.browser ] = true; + browser.version = matched.version; + browser.versionNumber = parseInt(matched.version); + } + + if ( matched.platform ) { + browser[ matched.platform ] = true; + } + +// These are all considered mobile platforms, meaning they run a mobile browser + if ( browser.android || browser.ipad || browser.iphone || browser[ "windows phone" ] ) { + browser.mobile = true; + } + +// These are all considered desktop platforms, meaning they run a desktop browser + if ( browser.mac || browser.linux || browser.win ) { + browser.desktop = true; + } + +// Chrome, Opera 15+ and Safari are webkit based browsers + if ( browser.chrome || browser.opr || browser.safari ) { + browser.webkit = true; + } + +// IE11 has a new token so we will assign it msie to avoid breaking changes + if ( browser.rv ) + { + var ie = 'msie'; + + matched.browser = ie; + browser[ie] = true; + } + +// Opera 15+ are identified as opr + if ( browser.opr ) + { + var opera = 'opera'; + + matched.browser = opera; + browser[opera] = true; + } + +// Stock Android browsers are marked as safari on Android. + if ( browser.safari && browser.android ) + { + var android = 'android'; + + matched.browser = android; + browser[android] = true; + } + +// Assign the name and platform variable + browser.name = matched.browser; + browser.platform = matched.platform; + + + jQuery.browser = browser; + +})( jQuery, window ); \ No newline at end of file